[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/gp-includes/ -> plugin.php (summary)

(no description)

File Size: 100 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

GP_Plugin:: (8 methods):
  __construct()
  get_option()
  update_option()
  add_action()
  add_filter()
  _call_wp_plugin_api_function()
  remove_action()
  remove_filter()


Class: GP_Plugin  - X-Ref

GlotPress plugin base class. It is supposed to be inherited.

__construct()   X-Ref
If you override the constructor, always call the parent one.


get_option( $key )   X-Ref
Retrieve an option, specific to your plugin.

You don't have to prefix the key or to tie its name to your plugin.

param: string $key
return: mixed the value of the option, or null if it wasn't found

update_option( $key, $value )   X-Ref
Update an option, specific to your plugin.

You don't have to prefix the key or to tie its name to your plugin.

param: string $key
param: mixed $value Can be anything serializable
return: bool

add_action( $action_name, $args = array()   X-Ref
Adds a method in this class as an action with the same name.

For example $this->add_action( 'init', ... ) will add $this->init() as an init action

param: string $action_name The name of the action and the method.
param: array $args Two keys are supported:

add_filter( $filter_name, $args = array()   X-Ref
Adds a method in this class as a filter with the same name.

For example $this->add_filter( 'the_content', ... ) will add $this->the_content() as a the_content filter

param: string $filter_name The name of the filter and the method.
param: array $args Two keys are supported:

_call_wp_plugin_api_function( $wp_function, $tag, $args = array()   X-Ref
No description

remove_action( $action_name, $args = array()   X-Ref
No description

remove_filter( $filter_name, $args = array()   X-Ref
No description



Generated: Thu May 24 03:59:35 2012 Hosted by follow the white rabbit.