Hook_Loader
Hook Loader class.
Centralizes all hook registrations and their callback implementations.
Namespace: WebberZone\Top_Ten
Since: 4.0.0
Source: includes/class-hook-loader.php line 29
Methods
__construct()
Constructor.
Since: 4.0.0
Line: 36
public function __construct( );
initiate_plugin()
Initialise the plugin translations and media.
Since: 3.3.0
Line: 77
public function initiate_plugin( ): void;
Returns: void
register_widgets()
Initialise the Top 10 widgets.
Since: 3.3.0
Line: 86
public function register_widgets( ): void;
Returns: void
register_rest_routes()
Function to register our new routes from the controller.
Since: 3.0.0
Line: 100
public function register_rest_routes( ): void;
Returns: void
parse_query()
Hook into WP_Query to check if tptn_query is set and is true. If so, we load the Top 10 query.
Since: 3.5.0
Line: 112
public function parse_query( $query ): void;
| Type | Name | Description |
|---|---|---|
\WP_Query | $query | The WP_Query object. |
Returns: void
activated_plugin()
Checks if another version of Top 10/Top 10 Pro is active and deactivates it.
Hooked on activated_plugin so other plugin is deactivated when current plugin is activated.
Since: 3.5.0
Line: 127
public function activated_plugin( $plugin, $network_wide ): void;
| Type | Name | Description |
|---|---|---|
string | $plugin | The plugin being activated. |
bool | $network_wide | Whether the plugin is being activated network-wide. |
Returns: void
plugin_deactivated_notice()
Displays a notice when either Top 10 or Top 10 Pro is automatically deactivated.
Since: 3.5.0
Line: 164
public function plugin_deactivated_notice( ): void;
Returns: void