PHP Класс Hookr_Plugin, hookr-plugin

Наследование: extends Hookr_Singleton
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
get_instance ( string $class = __CLASS__ ) : object Returns the Hookr_Plugin derived instance.

Описание методов

activate() публичный Метод

Executes during plugin activation.
public activate ( ) : void
Результат void

deactivate() публичный Метод

Executes during plugin deactivation.
public deactivate ( ) : void
Результат void

field_id() публичный Метод

Echos the element id attribute value.
См. также: self::get_field_id()
public field_id ( string $id )
$id string

field_name() публичный Метод

Echos the name attribute value.
См. также: self::get_field_name()
public field_name ( string $name )
$name string

get_field_id() публичный Метод

Creates an element id attribute value in WP's slug format.
public get_field_id ( string $id ) : string
$id string
Результат string

get_field_name() публичный Метод

Creates an name attribute value in array format.
public get_field_name ( string $name ) : string
$name string
Результат string

get_file() публичный Метод

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

get_instance() защищенный статический Метод

Returns the Hookr_Plugin derived instance.
protected static get_instance ( string $class = __CLASS__ ) : object
$class string
Результат object Instance of Hookr_Plugin

get_render() публичный Метод

Returns the contents of a rendered template.
См. также: self::render()
public get_render ( string $tpl, array $data = [] ) : string
$tpl string
$data array
Результат string

get_slug() публичный Метод

Returns the slug representing this class.
public get_slug ( ) : string
Результат string

init() публичный статический Метод

Plugin entry-point.
public static init ( )

load() публичный Метод

Executes after 'plugins_loaded' hook.
public load ( ) : void
Результат void

loaded() публичный Метод

Executes after 'init' hook.
public loaded ( ) : void
Результат void

render() публичный Метод

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