Plugin
class Plugin extends Container implements Plugin
Traits
Properties
static protected Plugin | $instance | The current globally available container (if any). | |
string | $slug | The slug of this plugin. | |
protected string | $file | Buld in FILE relative plugin. | |
protected string | $basePath | The base path for the plugin installation. | |
protected string | $baseUri | The base uri for the plugin installation. | |
protected array | $pluginData | Internal use where store the plugin data. | |
protected array | $provides | A key value pairs array with the list of providers. |
Methods
No description
Set the value of the method set{Name}Attribute
.
Extend the __isset method to check for the method get{Name}Attribute
.
Extend the __unset method to check for the method get{Name}Attribute
.
Determine if a get mutator exists for an attribute.
Get the value of an attribute using its mutator.
Determine if a set mutator exists for an attribute.
Set the value of an attribute using its mutator.
No description
No description
No description
No description
No description
No description
No description
No description
No description
Get / set the specified configuration value.
Get the base path of the plugin installation.
Return the absolute URL for the installation plugin.
No description
Gets the value of an environment variable. Supports boolean, empty and null.
No description
No description
Helper method to load (enqueue) styles.
Helper method to load (enqueue) styles.
Called when a plugin is activate; register_activation_hook()
Called when a plugin is deactivate; register_deactivation_hook()
Fires after WordPress has finished loading but before any headers are sent.
Return TRUE if an Ajax called
No description
Fires before the administration menu loads in the admin.
No description
No description
Details
at line 193
__get($name)
in HasAttributes at line 32
__set(string $name, mixed $value)
Set the value of the method set{Name}Attribute
.
in HasAttributes at line 45
__isset(string $name)
Extend the __isset method to check for the method get{Name}Attribute
.
in HasAttributes at line 58
__unset(string $name)
Extend the __unset method to check for the method get{Name}Attribute
.
in HasAttributes at line 72
bool
hasGetMutator(string $key)
Determine if a get mutator exists for an attribute.
in HasAttributes at line 83
protected mixed
mutateAttribute(string $key)
Get the value of an attribute using its mutator.
in HasAttributes at line 94
bool
hasSetMutator(string $key)
Determine if a set mutator exists for an attribute.
in HasAttributes at line 106
protected mixed
setMutatedAttributeValue(string $key, mixed $value)
Set the value of an attribute using its mutator.
at line 70
__construct($basePath)
at line 77
boot()
at line 155
protected
getOptionsAttribute()
at line 164
protected
getRequestAttribute()
at line 173
protected
getPluginBasenameAttribute()
at line 178
protected
getCssAttribute()
at line 183
protected
getJsAttribute()
at line 188
protected
getImagesAttribute()
at line 204
set_screen_option($status, $option, $value)
at line 223
mixed
config(array|string $key = null, mixed $default = null)
Get / set the specified configuration value.
If an array is passed as the key, we will assume you want to set an array of values.
at line 258
string
getBasePath()
Get the base path of the plugin installation.
at line 268
string
getBaseUri()
Return the absolute URL for the installation plugin.
at line 273
vendor($vendor = "wpbones")
at line 286
mixed
env(string $key, mixed $default = null)
Gets the value of an environment variable. Supports boolean, empty and null.
at line 299
View
view(null $key = null, null $data = null)
Return an instance of View/Contract.
at line 306
getPageUrl($pageSlug)
at line 311
provider($name)
at line 329
css(string|array $filename, array $deps = [], null $version = null)
Helper method to load (enqueue) styles.
For your convenience, the params $filename may be an array of file.
at line 353
js(string|array $filename, array $deps = [], null $version = null, bool $footer = true)
Helper method to load (enqueue) styles.
For your convenience, the params $filename may be an array of file.
at line 372
activation()
Called when a plugin is activate; register_activation_hook()
at line 451
deactivation()
Called when a plugin is deactivate; register_deactivation_hook()
at line 466
init()
Fires after WordPress has finished loading but before any headers are sent.
Most of WP is loaded at this stage, and the user is authenticated. WP continues to load on the init hook that follows (e.g. widgets), and many plugins instantiate themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).
If you wish to plug an action once WP is loaded, use the wp_loaded hook below.
at line 518
bool
isAjax()
Return TRUE if an Ajax called
at line 532
log()
at line 540
admin_menu()
Fires before the administration menu loads in the admin.