Hook_Loader
Hook Loader class.
Centralizes all hook registrations and their callback implementations.
Namespace: WebberZone\Contextual_Related_Posts
Since: 3.5.0
Source: includes/class-hook-loader.php line 27
Methods
__construct()
Constructor.
Since: 3.5.0
Line: 34
public function __construct( );
initiate_plugin()
Initialise the plugin translations and media.
Since: 3.5.0
Line: 101
public function initiate_plugin( ): void;
Returns: void
register_widgets()
Initialise the Contextual Related Posts widgets.
Since: 3.5.0
Line: 110
public function register_widgets( ): void;
Returns: void
register_rest_routes()
Function to register our new routes from the controller.
Since: 3.5.0
Line: 123
public function register_rest_routes( ): void;
Returns: void
content_filter()
Filter the content to add the related posts.
Since: 3.5.0
Line: 136
public function content_filter( string $content ): string;
| Type | Name | Description |
|---|---|---|
string |
$content |
Post content. |
Returns: string — Post content with related posts appended.
rss_filter()
Filter feed content to add related posts.
Since: 4.4.0
Line: 148
public function rss_filter( string $content ): string;
| Type | Name | Description |
|---|---|---|
string |
$content |
Post content. |
Returns: string — Post content with related posts appended.
parse_query()
Hook into WP_Query to check if crp_query is set and is true. If so, we load the CRP query.
Since: 3.5.0
Line: 159
public function parse_query( WP_Query $query ): void;
| Type | Name | Description |
|---|---|---|
\WP_Query |
$query |
The WP_Query object. |
Returns: void