User:Freakerz/Plugin Hooks

From Habari Project

Jump to: navigation, search

The information available on this page are based on revision 760.

Contents

Plugin types

Action plugin

Action plugins do something but do not alter the calling function's values.

Filter plugin

Filter plugins process passed data to then return it to the calling function, altering the value.

List of Plugin Hooks

admin/import.php

  • Line 9 - Plugins::filter('import_names', $import_names);
  • Line 23 - Plugins::filter('import_stage', '', @$_POST['importer'], @$_POST['stage'], @$_POST['step']);

classes/actionhandler.php

  • Line 31 - act() - Plugins::act( $before_action_method ); - 'before_' . $action_method
  • Line 35 - act() - Plugins::act( $after_action_method ); - 'after_' . $action_method

classes/adminhandler.php

  • Line 573 - get_main_menu() - Plugins::filter('main_menu', $mainmenus);

classes/ajaxhandler.php

  • Line 19 - act_ajax() - Plugins::act('ajax_' . $this->handler_vars['context'], $this);
  • Line 31 - act_auth_ajax() - Plugins::act('auth_ajax_' . $this->handler_vars['context'], $this);

classes/atomhandler.php

  • Line 21 - __construct() - Plugins::act('init_atom');
  • Line 124 - act_rsd() - Plugins::filter('rsd_api_list', $apis_list);
  • Line 171 - act_rsd() - Plugins::filter( 'rsd', $xml, $this->handler_vars );
  • Line 200 - act_introspection() - Plugins::filter( 'atom_introspection', $xml, $this->handler_vars );
  • Line 303 - get_comments() - Plugins::filter( 'atom_get_comments', $xml, $params, $this->handler_vars );
  • Line 352 - get_entry() - Plugins::filter( 'atom_get_entry', $xml, $slug, $this->handler_vars );
  • Line 385 - put_entry() - Plugins::filter( 'atom_put_entry', $xml, $slug, $this->handler_vars );
  • Line 541 - get_collection() - Plugins::filter( 'atom_get_collection', $xml, $params, $this->handler_vars );
  • Line 568 - post_collection - Plugins::filter( 'atom_post_collection', $xml, $this->handler_vars );

classes/comment.php

  • Line 174 - __get() - Plugins::filter( "comment_{$name}", $out );
  • Line 176 - __get() - Plugins::filter( "comment_{$name}_{$filter}", $out );

classes/cronjob.php

  • Line 93 - execute() - Plugins::filter( $this->callback, $result, $paramarray );

classes/feedbackhandler.php

  • Line 77 - act_add_comment() - Plugins::filter('spam_filter', $spam_rating, $comment, $this->handler_vars);
  • Line 78 - act_add_comment() - Plugins::filter('add_comment', $comment, $this->handler_vars, $spam_rating);

classes/formui.php

  • Line 180 - success() - Plugins::filter($this->success_callback, $result, $this);
  • Line 279 - validate() - Plugins::filter($validator, $valid, $this->value);

classes/logentry.php

  • Line 131 - insert() - Plugins::filter( 'insert_logentry', $this );

classes/plugins.php

  • Line 258 - activate_plugin() - Plugins::filter('activate_plugin', $ok, $file);
  • Line 266 - activate_plugin() - Plugins::act('plugin_activation', $file);
  • Line 267 - activate_plugin() - Plugins::act('plugin_activated', $file);
  • Line 279 - deactivate_plugin() - Plugins::filter('deactivate_plugin', $ok, $file);
  • Line 285 - deactivate_plugin() - Plugins::act('plugin_deactivation', $file);
  • Line 288 - deactivate_plugin() - Plugins::act('plugin_deactivated', $file);

classes/post.php

  • Line 266 - setslug() - Plugins::filter('set_slug', $value);
  • Line 371 - insert() - Plugins::act('post_update_' . $fieldname, $this, $value, $this->newfields[$fieldname] );
  • Line 380 - insert() - Plugins::act('post_inserted', $this);
  • Line 396 - update() - Plugins::act('post_update_' . $fieldname, $this, $this->fields[$fieldname], $value );
  • Line 422 - delete() - Plugins::act('post_delete', $this);
  • Line 488 - __get() - Plugins::filter( "post_{$name}", $out, $this );
  • Line 490 - __get() - Plugins::filter( "post_{$name}_{$filter}", $out, $this );

classes/remoterequest.php

  • Line 221 - __filter() - Plugins::filter( 'remoterequest', $data, $url );

classes/rewriterule.php

  • Line 101 - build() - Plugins::filter( 'rewrite_args', $args, $this->name );
  • Line 145 - arg_match() - Plugins::filter('rewrite_args', $args, $this->name );

classes/rewriterules.php

  • Line 22 - get_active() - Plugins::filter('rewrite_rules', $db_rules);

classes/site.php

  • Line 181 - get_url() - Plugins::filter( 'site_url_' . $name, $url );
  • Line 229 - get_path() - Plugins::filter( 'site_path_' . $name, $path );
  • Line 301 - get_dir() - Plugins::filter( 'site_dir_' . $name, $path );

classes/stack.php

  • Line 116 - get() - Plugins::filter( 'stack_out', $stack, $stack_name );

classes/theme.php

  • Line 102 - add_template_vars() - Plugins::act('add_template_vars', $this, Controller::get_handler()->handler_vars);
  • Line 155 - act_display() - Plugins::filter( 'template_user_filters', $user_filters );
  • Line 200 - act_display() - Plugins::filter( 'template_fallback', $fallback );
  • Line 386 - __call() - Plugins::act('theme_action', $action, $this, $user_filters);

classes/update.php

  • Line 61 - check() - Plugins::act('update_check');

classes/xmlrpcserver.php

  • Line 57 - system_listMethods() - Plugins::filter('xmlrpc_methods', $res);
Personal tools