Last active
October 27, 2016 10:17
-
-
Save oskarcalvo/d3b43b5a39c7bd751b1e4b21b449d3c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implement hook_action_info | |
* @return array array with the new actions | |
*/ | |
function module_name_action_info() { | |
return [ | |
'name_of_callback' => [ | |
'label' => t('Notify after comment'), | |
'type' => 'comment', | |
'configurable' => FALSE, | |
'triggers' => array('comment_insert'), | |
], | |
]; | |
} | |
/** | |
* @param object $comment | |
* @param array $context | |
* Array with components: | |
* - 'keywords': Keywords to look for. If the comment contains at least one | |
* of the keywords, it is unpublished. | |
*/ | |
function name_of_callback($comment) { | |
//Here be dragons | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment