Property | Type | Description | |
---|---|---|---|
$abort | |||
$actions | |||
$buffer | |||
$comments | |||
$context | |||
$error | |||
$hooks | |||
$scripts | |||
$settings | |||
$visible |
Method | Description | |
---|---|---|
abort ( mixed $mixed ) : mixed | Abort hook callback. | |
activate ( ) : void | Activate hook callback. | |
ajax ( ) | Ajax entrypoint | |
buffer ( string $buffer ) : string | Output buffer callback. | |
error ( mixed $mixed ) : mixed | Error callback. | |
get_file ( ) : string | Returns the plugin entry-point. | |
get_render ( string $tpl, array $data = [] ) : string | Renders & returns a template file. | |
init ( ) : object | Plugin init. | |
load ( ) : void | Load hook callback. | |
loaded ( ) : void | Loaded hook callback. | |
post_filter_buffer ( string $buffer ) : string | Post-filter buffer for any last-chance changes. | |
register_actions ( $actions ) : void | Registers the plugin actions. | |
register_menu ( object $wp_admin_bar ) : void | Registers the admin bar menu. | |
register_page ( ) : void | Registers the admin options page. | |
register_scripts ( ) : void | Registers the JS assets. | |
register_settings ( ) : void | Registers the plugin settings. | |
register_styles ( ) : void | Registers the CSS assets. | |
set_context_footer ( ) : void | Sets the runtime context to "footer" | |
set_context_header ( ) : void | Sets the runtime context to "header" | |
set_context_limbo ( ) : void | Sets the runtime context to "middle" (eventually) | |
set_context_middle ( $mixed = null ) : void | Sets the runtime context to "middle" | |
settings_fields ( ) : string | Renders the fields for use on the plugin options page. | |
settings_page ( ) : void. | Renders the plugin options page. | |
settings_validate ( array $args ) : array | Validates the settings posted from the plugin options page. | |
track_hook ( ) : void | Echos (if applicable) the hook's tag & stores instance. |
Method | Description | |
---|---|---|
__construct ( ) | ||
_filter_wildcard ( array $array ) : array | Utility method to filter wildcard tags. | |
ajax_detail ( ) : string | Ajax callback for hook details. | |
ajax_enable ( ) : string | Ajax callback for enabling/disabling | |
clear_cache ( $force = false ) : void | Clears the cache. | |
create_hook ( string $tag, array $args = [] ) : stdClass | Creates a generic hook instance. | |
create_key ( integer $index, char $char = 'h' ) : string | Converts index key to '__h00001' (raw) format. | |
create_node ( DOMNode | string $node, string $value = '' ) : DOMElement | Creates a new DOMElement. | |
decode_keys ( string $keys ) : array | Decodes string of keys into array. | |
encode_keys ( array $keys ) : string | Encodes an array of keys into a string. | |
filter_buffer ( string $buffer ) : string | Filters buffer by converting raw keys to inline annotations. | |
filter_ignore ( DOMDocument $dom, string $buffer ) : string | Filters the raw keys from nodes that are not rendered/off-canvas. | |
filter_keys ( DOMNode $node, integer $type = self::KEY_IGNORE ) : array | Returns a list of keys in a specific node. | |
filter_node ( DOMNode $node ) : void | Filters element nodes for actions/filters. | |
filter_nodes ( DOMNode $node ) | Filters nodes for actions/filters. | |
filter_text ( DOMDocument $dom, string $buffer ) : string | Filters the raw keys from text nodes. | |
get_cache ( null | string $key = null ) : null | json | Returns value of the cache. | |
get_cache_file ( string | null $key = null ) : string | Returns the cache filename. | |
get_child_node ( DOMNode $node, DOMXPath $xpath = null ) : DOMNode | Returns the child node to be annotated. | |
get_hook ( string $key ) : object | Returns a hook by key. | |
get_node_tag ( DOMNode $node ) : string | For a parent node, return the child's tag name. | |
get_request_key ( null | string $key = null ) : string | Returns a generic cache key. | |
get_setting ( string $key, string $val = '' ) : mixed | Return a specific setting from the plugin settings object. | |
get_settings ( ) : object | Returns the filters/runtime plugin settings object. | |
get_settings_default ( ) : object | Returns the plugin's default settings. | |
get_settings_empty ( ) : object | Returns an "empty" settings object. | |
get_settings_raw ( ) : array | Returns the "raw" plugin options (unmodified). | |
get_target_node ( DOMNode $node ) : DOMNode | Find the target node to be annotated. | |
has_key ( string $chunk ) : boolean | Returns whether or not a chunk of html/text contains a raw key. | |
ignore_node ( string $tag ) : boolean | Ignore the specific tag? | |
is_abort ( ) : boolean | Should the plugin abort? | |
is_enabled ( ) : boolean | Is the plugin enabled? | |
is_tag_ignore ( string $tag ) : boolean | Should the tag be ignored? | |
is_tag_watch ( string $tag ) : boolean | Is the tag being watched? | |
is_tools_page ( ) : boolean | Is the current request for the plugin options page? | |
is_update_page ( ) : boolean | Is the current request for the update page? | |
node_add_class ( DOMNode $node, string $class ) : void | Add a CSS class to the given node. | |
node_has_class ( DOMNode $node, string $class ) : boolean | Does the given node have CSS class? | |
parse_key ( string $key ) : integer | Converts raw string key into it's index. | |
parse_keys ( string $chunk ) : array | Returns the list of raw keys from a chunk of html/text. | |
post_filter_body ( DOMDocument $dom ) : void | Post-filters with various runtime attributes/element creation. | |
post_filter_comments ( string $buffer ) : string | Post-filters comments within buffer. | |
post_filter_html ( DOMDocument $dom ) : void | Post-filters with various runtime attributes. | |
post_filter_scripts ( string $buffer ) : string | Post-filters scripts within buffer. | |
pre_filter_body ( string $buffer ) : string | Pre-filters raw keys between to . | |
pre_filter_buffer ( string $buffer ) : string | Pre-filter buffer - calls self::pre_filter_* methods. | |
pre_filter_comments ( string $buffer ) : string | Pre-filters comments within buffer. | |
pre_filter_html ( string $buffer ) : string | Pre-filters raw keys from begining of document to . | |
pre_filter_nodes ( string $buffer ) : string | Pre-filters the nodes containing raw keys. | |
pre_filter_offcanvas ( string $buffer, string $chunk ) : string | Pre-filters raw keys from given chunk of html/text. | |
pre_filter_scripts ( string $buffer ) : string | Pre-filters scripts within buffer. | |
register_hooks ( ) : void | Registers the hooks. | |
set_cache ( mixed $val, null | string $key = null ) : boolean | Write a value to the cache. | |
set_node_attrs ( DOMNode $node, array $attrs = [] ) : void | Sets the attributes on a given DOMNode. | |
strip_keys ( string $buffer ) : string | Strip keys | |
track_visible ( string $tag ) | Sets the runtime visibility for the hooks. | |
unique_keys ( array $keys ) : array | Returns a unique raw key list. | |
unregister_hooks ( ) : void | Unregisters the hooks. |
protected _filter_wildcard ( array $array ) : array | ||
$array | array | |
return | array |
protected ajax_detail ( ) : string | ||
return | string |
protected ajax_enable ( ) : string | ||
return | string |
protected clear_cache ( $force = false ) : void | ||
return | void |
protected create_hook ( string $tag, array $args = [] ) : stdClass | ||
$tag | string | |
$args | array | |
return | stdClass |
protected create_key ( integer $index, char $char = 'h' ) : string | ||
$index | integer | |
$char | char | |
return | string |
protected create_node ( DOMNode | string $node, string $value = '' ) : DOMElement | ||
$node | DOMNode | string | |
$value | string | |
return | DOMElement |
protected decode_keys ( string $keys ) : array | ||
$keys | string | |
return | array |
protected encode_keys ( array $keys ) : string | ||
$keys | array | |
return | string |
protected filter_buffer ( string $buffer ) : string | ||
$buffer | string | |
return | string |
protected filter_ignore ( DOMDocument $dom, string $buffer ) : string | ||
$dom | DOMDocument | |
$buffer | string | |
return | string |
protected filter_keys ( DOMNode $node, integer $type = self::KEY_IGNORE ) : array | ||
$node | DOMNode | |
$type | integer | |
return | array | List of keys. |
protected filter_node ( DOMNode $node ) : void | ||
$node | DOMNode | |
return | void |
protected filter_nodes ( DOMNode $node ) | ||
$node | DOMNode |
protected filter_text ( DOMDocument $dom, string $buffer ) : string | ||
$dom | DOMDocument | |
$buffer | string | |
return | string |
protected get_child_node ( DOMNode $node, DOMXPath $xpath = null ) : DOMNode | ||
$node | DOMNode | |
$xpath | DOMXPath | |
return | DOMNode |
protected get_node_tag ( DOMNode $node ) : string | ||
$node | DOMNode | |
return | string |
protected get_settings ( ) : object | ||
return | object | The plugin settings object. |
protected get_settings_default ( ) : object | ||
return | object |
protected get_settings_empty ( ) : object | ||
return | object | The settigs object with empty values. |
protected get_settings_raw ( ) : array | ||
return | array | Plugin settings |
protected get_target_node ( DOMNode $node ) : DOMNode | ||
$node | DOMNode | |
return | DOMNode |
protected ignore_node ( string $tag ) : boolean | ||
$tag | string | |
return | boolean |
protected is_enabled ( ) : boolean | ||
return | boolean |
protected is_tag_ignore ( string $tag ) : boolean | ||
$tag | string | |
return | boolean |
protected is_tag_watch ( string $tag ) : boolean | ||
$tag | string | |
return | boolean |
protected is_tools_page ( ) : boolean | ||
return | boolean |
protected is_update_page ( ) : boolean | ||
return | boolean |
protected node_add_class ( DOMNode $node, string $class ) : void | ||
$node | DOMNode | |
$class | string | |
return | void |
protected node_has_class ( DOMNode $node, string $class ) : boolean | ||
$node | DOMNode | |
$class | string | |
return | boolean |
protected parse_keys ( string $chunk ) : array | ||
$chunk | string | |
return | array |
protected post_filter_body ( DOMDocument $dom ) : void | ||
$dom | DOMDocument | |
return | void |
public post_filter_buffer ( string $buffer ) : string | ||
$buffer | string | |
return | string |
protected post_filter_comments ( string $buffer ) : string | ||
$buffer | string | |
return | string |
protected post_filter_html ( DOMDocument $dom ) : void | ||
$dom | DOMDocument | |
return | void |
protected post_filter_scripts ( string $buffer ) : string | ||
$buffer | string | |
return | string |
protected pre_filter_body ( string $buffer ) : string | ||
$buffer | string | |
return | string |
protected pre_filter_buffer ( string $buffer ) : string | ||
$buffer | string | |
return | string |
protected pre_filter_comments ( string $buffer ) : string | ||
$buffer | string | |
return | string |
protected pre_filter_html ( string $buffer ) : string | ||
$buffer | string | |
return | string |
protected pre_filter_nodes ( string $buffer ) : string | ||
$buffer | string | |
return | string |
protected pre_filter_scripts ( string $buffer ) : string | ||
$buffer | string | |
return | string |
public register_actions ( $actions ) : void | ||
return | void |
protected register_hooks ( ) : void | ||
return | void |
public register_page ( ) : void | ||
return | void |
public register_scripts ( ) : void | ||
return | void |
public register_settings ( ) : void | ||
return | void |
public register_styles ( ) : void | ||
return | void |
public set_context_header ( ) : void | ||
return | void |
public set_context_limbo ( ) : void | ||
return | void |
public set_context_middle ( $mixed = null ) : void | ||
return | void |
protected set_node_attrs ( DOMNode $node, array $attrs = [] ) : void | ||
$node | DOMNode | |
$attrs | array | |
return | void |
public settings_fields ( ) : string | ||
return | string | The pre-rendered markup. |
public settings_page ( ) : void. | ||
return | void. |
public settings_validate ( array $args ) : array | ||
$args | array | The plugin settings. |
return | array |
protected strip_keys ( string $buffer ) : string | ||
$buffer | string | |
return | string |
public track_hook ( ) : void | ||
return | void |
protected track_visible ( string $tag ) | ||
$tag | string |
protected unique_keys ( array $keys ) : array | ||
$keys | array | |
return | array |
protected unregister_hooks ( ) : void | ||
return | void |