Developers: Small API change for rules integrations!

Events happening in the community are now at Drupal community events on www.drupal.org.
fago's picture

Attention developers, I've just committed a small API change to rules. Now you should use t() for help provided directly in your hook_rules_*_info implementation.

Example: The previous code

<?php
function node_rules_condition_info() {
 
$items = array();
 
$items['rules_condition_content_is_type'] = array(
   
'label' => t('Content has type'),
   
'arguments' => array(
     
'node' => array('type' => 'node', 'label' => t('Content')),
    ),
   
'module' => 'Node',
   
'help' => 'Evaluates to TRUE, if the given content has one of the selected content types.',
  );
  return
$items;
}
?>

should be changed to:
<?php
function node_rules_condition_info() {
 
$items = array();
 
$items['rules_condition_content_is_type'] = array(
   
'label' => t('Content has type'),
   
'arguments' => array(
     
'node' => array('type' => 'node', 'label' => t('Content')),
    ),
   
'module' => 'Node',
   
'help' => t('Evaluates to TRUE, if the given content has one of the selected content types.'),
  );
  return
$items;
}
?>

For more about providing help have a look at http://drupal.org/node/298545.

The change has been implemented to ease translation of the help strings - so these help strings get properly extracted into the translation template.
This change is not part of beta3, but will be of all further releases.

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week