'PreApproved', 'url' => 'http://habariproject.org/', 'author' => 'Habari Community', 'authorurl' => 'http://habariproject.org/', 'version' => '1.0', 'description' => 'Automatically approve commenters that have approved comments in the database.', 'license' => 'Apache License 2.0', ); } /** * Register the PreApproved event type with the event log */ public function action_plugin_activation() { EventLog::register_type( 'PreApproved' ); } /** * Unregister the PreApproved event type on deactivation * @todo Should we be doing this? */ public function action_plugin_deactivation() { EventLog::unregister_type( 'PreApproved' ); } /** * function act_comment_insert_before * This function is executed when the action "comment_insert_before" * is invoked from a Comment object. * The parent class, Plugin, handles registering the action * and hook name using the name of the function to determine * where it will be applied. * You can still register functions as hooks without using * this method, but boy, is it handy. * @param Comment The comment that will be processed before storing it in the database. * @return Comment The comment result to store. **/ function action_comment_insert_before ( $comment ) { // This plugin ignores non-comments if( $comment->type != Comment::COMMENT ) { return $comment; } //