pfic
in package
FinalYes
The core plugin class.
- Define internationalisation, shortcodes, admin-specific hooks, common and public-facing site hooks.
- Instantiate all the classes that hook into core functions.
- Because of this design, it may have a high coupling count.
Tags
Table of Contents
Properties
- $basename : string
- The plugin basename.
- $loader : Loader
- The loader that's responsible for maintaining and registering all hooks that power the plugin.
Methods
- __construct() : void
- Define the core functionality of the plugin.
- load_last() : array<string|int, mixed>
- Load this plugin last.
- run() : void
- Run the loader to execute all of the hooks with WordPress.
- define_admin_hooks() : void
- Register all of the hooks related to the admin area functionality of the plugin.
- define_common_hooks() : void
- Register the hooks used in both the public and admin areas.
- define_public_hooks() : void
- Register all of the hooks related to the public-facing functionality of the plugin.
- define_shortcodes() : void
- Register the shortcodes.
Properties
$basename
The plugin basename.
private
string
$basename
= ''
Tags
$loader
The loader that's responsible for maintaining and registering all hooks that power the plugin.
private
Loader
$loader
Tags
Methods
__construct()
Define the core functionality of the plugin.
public
__construct() : void
- Load the dependencies.
- Define the locale (if used).
- Set the common, public and admin hooks.
- Set the shortcodes.
Tags
load_last()
Load this plugin last.
public
load_last(array<string|int, mixed> $plugins) : array<string|int, mixed>
Parameters
- $plugins : array<string|int, mixed>
-
Active plugins.
Tags
Return values
array<string|int, mixed> —The modified plugin array.
run()
Run the loader to execute all of the hooks with WordPress.
public
run() : void
Tags
define_admin_hooks()
Register all of the hooks related to the admin area functionality of the plugin.
private
define_admin_hooks() : void
Tags
define_common_hooks()
Register the hooks used in both the public and admin areas.
private
define_common_hooks() : void
Tags
define_public_hooks()
Register all of the hooks related to the public-facing functionality of the plugin.
private
define_public_hooks() : void
Tags
define_shortcodes()
Register the shortcodes.
private
define_shortcodes() : void