function twitter_actions_rules_condition_info in Twitter 7.4
Same name and namespace in other branches
- 7.6 twitter_actions/twitter_actions.rules.inc \twitter_actions_rules_condition_info()
- 7.3 twitter_actions/twitter_actions.rules.inc \twitter_actions_rules_condition_info()
- 7.5 twitter_actions/twitter_actions.rules.inc \twitter_actions_rules_condition_info()
Implements hook_rules_condition_info().
File
- twitter_actions/
twitter_actions.rules.inc, line 63 - Provides Rules integration in order to post tweets.
Code
function twitter_actions_rules_condition_info() {
$defaults = array(
'group' => t('Twitter'),
'parameter' => array(
'user' => array(
'type' => 'user',
'label' => t('User'),
'description' => t('The user to be checked for.'),
),
),
'named parameter' => TRUE,
'access callback' => 'rules_twitter_actions_access_callback',
);
$items['rules_core_twitter_conditions_user_has_linked'] = $defaults + array(
'label' => t('User has linked Twitter account'),
'help' => t('Evaluates to TRUE in case there is a record in the twitter_account for the provided user.'),
'base' => 'twitter_actions_has_linked',
);
$items['rules_core_twitter_conditions_text_is_under_140'] = array(
'group' => t('Twitter'),
'named parameter' => TRUE,
'parameter' => array(
'text' => array(
'type' => 'text',
'label' => t('Text to check'),
),
),
'label' => t('Text is under 140 characters'),
'help' => t('Returns TRUE if the length of the text is 140 or less.'),
'base' => 'twitter_actions_less_140',
);
return $items;
}