You are here

function node_rules_condition_info in Rules 6

Implementation of hook_rules_condition_info()

Related topics

File

rules/modules/node.rules.inc, line 106
rules integration for the node module

Code

function node_rules_condition_info() {
  $items = array();
  $defaults = array(
    'arguments' => array(
      'node' => array(
        'type' => 'node',
        'label' => t('Content'),
      ),
    ),
    'module' => 'Node',
  );
  $items['rules_condition_content_is_type'] = $defaults + array(
    'label' => t('Content has type'),
    'help' => t('Evaluates to TRUE, if the given content has one of the selected content types.'),
  );
  $items['rules_condition_content_is_published'] = $defaults + array(
    'label' => t('Content is published'),
  );
  $items['rules_condition_content_is_sticky'] = $defaults + array(
    'label' => t('Content is sticky'),
  );
  $items['rules_condition_content_is_promoted'] = $defaults + array(
    'label' => t('Content is promoted to frontpage'),
  );
  $items['rules_condition_content_is_new'] = $defaults + array(
    'label' => t('Content is new'),
    'help' => t('Evaluates to TRUE, if the given content has not been saved yet.'),
  );
  return $items;
}