Свойство | Тип | Описание | |
---|---|---|---|
$info | |||
$plugin_id |
Свойство | Тип | Описание | |
---|---|---|---|
$_added_templates |
Метод | Описание | |
---|---|---|
__construct ( ) | Pluggable constructor. | |
_configure_plugin_config ( array $actions, string $plugin_id ) : array | Registered to the plugin_config hook to supply a config via a plugin's configure() method | |
_configure_plugin_ui ( string $plugin_id, string $action ) | Registered to the plugin_ui hook to supply a config via a plugin's configure() method | |
_filter_rewrite_rules ( array $rules ) : array | Add the rewrite rules queued by add_rule() to the full rule set | |
_help_plugin_config ( array $actions, string $plugin_id ) : array | Registered to the plugin_config hook to supply help via a plugin's help() method | |
_help_plugin_ui ( string $plugin_id, string $action ) | Registered to the plugin_ui hook to supply help via a plugin's help() method | |
_plugin_available_templates ( array $list ) : array | Add plugin templates to the list of templates that are present in the current theme | |
_plugin_include_template_file ( string $file, string $name ) : string | Potentially serve a different file for the requested template name | |
add_rule ( mixed $rule, string $hook, Callback $fn = null ) | Add a rewrite rule that dispatches entirely to a plugin hook | |
get_db_schema ( ) : string | Gets a database schema associated with this pluggable | |
get_file ( ) : string | Gets the filename that contains this pluggable class | |
get_url ( boolean | string $trail = false ) : string | Get a fully-qualified URL directory that contains this pluggable class | |
get_version ( ) : string | Provide a method to return the version number from a pluggable's info | |
get_xml_text ( string $filename, SimpleXMLElement $node ) : mixed | string | Get the text associated to an info xml node, possibly using an href parameter | |
load ( ) | Called when a pluggable is loaded to register its actions and filters. | |
load_hooks ( mixed $object ) | Registers all of this class' action_ and filter_ functions with the Plugins dispatcher Registers xmlrpc_ functions with the Plugins dispatcher, and turns '__' into '.' for the purposes of matching dotted XMLRPC requests. | |
load_text_domain ( string $domain ) : boolean | Load a translation domain/file for this pluggable | |
plugin_id ( ) : string | Returns a unique id for this pluggable | |
upgrade ( ) | Execute the upgrade action on any pluggable that has a version number change Update the version number of the pluggable in the database to what is installed |
Метод | Описание | |
---|---|---|
add_rest_rule ( string $hook, |
Adds a RewriteRule to the REST handler for the rule provided | |
add_template ( string $name, string $filename, boolean $override = false ) | Adds a template to the default theme that is stored in a specified path. |
public __construct ( ) |
public _configure_plugin_ui ( string $plugin_id, string $action ) | ||
$plugin_id | string | The id of the plugin whose action was triggered |
$action | string | The action triggered |
public _filter_rewrite_rules ( array $rules ) : array | ||
$rules | array | The array of current RewriteRules |
Результат | array | The appended array of RewriteRules |
public _help_plugin_ui ( string $plugin_id, string $action ) | ||
$plugin_id | string | The id of the plugin whose action was triggered |
$action | string | The action triggered |
public _plugin_available_templates ( array $list ) : array | ||
$list | array | List of template names in the current theme |
Результат | array | The modified list of template names |
protected static add_rest_rule ( string $hook, |
||
$hook | string | The hook name to add a RewriteRule for |
$object | The pluggable object holding the hook | |
$fn | Callable | The hook function to use to dispatch the request |
public add_rule ( mixed $rule, string $hook, Callback $fn = null ) | ||
$rule | mixed | An old-style rewrite rule string, where quoted segments are literals and unquoted segments are variable names, OR a RewriteRule object |
$hook | string | The suffix of the hook function: action_plugin_act_{$suffix} |
$fn | Callback | A potential function/method to register directly to the newly created hook |
protected add_template ( string $name, string $filename, boolean $override = false ) | ||
$name | string | The name of the template that will be displayed, sans extension |
$filename | string | The full path of the template file used for the specified name |
$override | boolean | If false, allow a template with the same name in the active theme directory to override this one. If true, always override the active theme's template with this one. |
final public get_db_schema ( ) : string | ||
Результат | string | The database schema |
abstract public get_version ( ) : string | ||
Результат | string | The version of the pluggable |
public load ( ) |
public static load_hooks ( mixed $object ) | ||
$object | mixed | The object or class name to register the hooks of |
public load_text_domain ( string $domain ) : boolean | ||
$domain | string | The name of the domain to load |
Результат | boolean | true if data was successfully loaded, false otherwise |
public upgrade ( ) |