You are here

node_recur.api.php in Node recur 7.2

Same filename and directory in other branches
  1. 7 node_recur.api.php

File

node_recur.api.php
View source
<?php

/**
 * Implements hook_node_recur_access_alter().
 *
 * Alter the access control for the node recur form
 *
 * @param &$access
 *   Boolean status of access for the current user.
 * @param $node
 *   The node being recurred.
 */
function hook_node_recur_access_alter(&$access, $node) {
  if ($node->type == 'story') {
    $access = TRUE;
  }
}

/**
 * Implements hook_node_recur_dates_alter().
 *
 * Modify the recurring dates before they are used to recur nodes.
 *
 * @param &$dates
 *   An array of start and end dates, keyed by 'start' and 'end'. The
 *   dates are in timestamp format.
 * @param $variables
 *   An array of variables supplied by and generated by the node recur
 *   form. The possible available values are:
 *     node: The node being recurred.
 *     start_date: The initial starting date of the node (ie, '2012-10-22 15:45:00').
 *     end_date: The initial ending date of the node, if one exists (ie, '2012-10-22 16:45:00').
 *     option: The recurring option selected.
 *     until: The date (timestamp) to recur until.
 *     days: An array of days selected, if the 'days' option was used.
 *     frequency: The selected frequency, if the 'rules' option was used.
 *     period: The selected period, if the 'rules' option was used.
 *     weekends: TRUE if weekends should be included, otherwise FALSE, if the 'rules' option was used.
 */
function hook_node_recur_dates_alter(&$dates, $variables) {
}