You are here

function hook_simplenews_scheduler_edition_node_alter in Simplenews Scheduler 7

Same name and namespace in other branches
  1. 8 simplenews_scheduler.api.php \hook_simplenews_scheduler_edition_node_alter()
  2. 6.2 simplenews_scheduler.api.php \hook_simplenews_scheduler_edition_node_alter()
  3. 2.0.x simplenews_scheduler.api.php \hook_simplenews_scheduler_edition_node_alter()

Alter the node object that was cloned from the template node before it gets saved.

The node is passed as node object and therefore passed by reference. This hook is for example usefull if you have fields in the template node that contain information about data that should get rendered dynamically into the edition node depenedent on the current schedule date.

Parameters

$edition_node: The cloned node object based on the scheduler node.

$scheduler_node: The original scheduler node object.

1 invocation of hook_simplenews_scheduler_edition_node_alter()
_simplenews_scheduler_new_edition in ./simplenews_scheduler.module
Create a new newsletter edition based on the master edition of this newsletter.

File

./simplenews_scheduler.api.php, line 21
Hooks provided by the Simplenews scheduler module.

Code

function hook_simplenews_scheduler_edition_node_alter($edition_node, $scheduler_node) {
  $node->title = 'Your newsletter from ' . REQUEST_TIME;
}