PHP Class Hookr_Plugin, hookr-plugin

Inheritance: extends Hookr_Singleton
Exibir arquivo Open project: explodybits/hookr-plugin Class Usage Examples

Public Methods

Method Description
activate ( ) : void Executes during plugin activation.
deactivate ( ) : void Executes during plugin deactivation.
field_id ( string $id ) Echos the element id attribute value.
field_name ( string $name ) Echos the name attribute value.
get_field_id ( string $id ) : string Creates an element id attribute value in WP's slug format.
get_field_name ( string $name ) : string Creates an name attribute value in array format.
get_file ( ) Returns entry-point file for plugin.
get_render ( string $tpl, array $data = [] ) : string Returns the contents of a rendered template.
get_slug ( ) : string Returns the slug representing this class.
init ( ) Plugin entry-point.
load ( ) : void Executes after 'plugins_loaded' hook.
loaded ( ) : void Executes after 'init' hook.
render ( string $tpl, array $data = [] ) Echos the renderd template.

Protected Methods

Method Description
get_instance ( string $class = __CLASS__ ) : object Returns the Hookr_Plugin derived instance.

Method Details

activate() public method

Executes during plugin activation.
public activate ( ) : void
return void

deactivate() public method

Executes during plugin deactivation.
public deactivate ( ) : void
return void

field_id() public method

Echos the element id attribute value.
See also: self::get_field_id()
public field_id ( string $id )
$id string

field_name() public method

Echos the name attribute value.
See also: self::get_field_name()
public field_name ( string $name )
$name string

get_field_id() public method

Creates an element id attribute value in WP's slug format.
public get_field_id ( string $id ) : string
$id string
return string

get_field_name() public method

Creates an name attribute value in array format.
public get_field_name ( string $name ) : string
$name string
return string

get_file() public method

Returns entry-point file for plugin.
public get_file ( )

get_instance() protected static method

Returns the Hookr_Plugin derived instance.
protected static get_instance ( string $class = __CLASS__ ) : object
$class string
return object Instance of Hookr_Plugin

get_render() public method

Returns the contents of a rendered template.
See also: self::render()
public get_render ( string $tpl, array $data = [] ) : string
$tpl string
$data array
return string

get_slug() public method

Returns the slug representing this class.
public get_slug ( ) : string
return string

init() public static method

Plugin entry-point.
public static init ( )

load() public method

Executes after 'plugins_loaded' hook.
public load ( ) : void
return void

loaded() public method

Executes after 'init' hook.
public loaded ( ) : void
return void

render() public method

Echos the renderd template.
public render ( string $tpl, array $data = [] )
$tpl string
$data array