KB_Homepage_Mode
KB Homepage Mode.
Namespace: WebberZone\Knowledge_Base\Pro
Since: 3.0.0
Source: includes/class-kb-homepage-mode.php line 21
Methods
__construct()
Constructor.
Since: 3.0.0
Line: 28
public function __construct( );
maybe_disable_redirect_canonical()
Disable canonical redirects when KB homepage mode is enabled.
This prevents redirect loops when we intentionally treat the homepage as the KB archive.
Since: 3.0.0
Line: 56
public function maybe_disable_redirect_canonical( $redirect_url, $requested_url ): string|false;
| Type | Name | Description |
|---|---|---|
string|false | $redirect_url | The redirect URL. |
string | $requested_url | The requested URL. |
Returns: string|false
maybe_set_kb_homepage_query()
Make the homepage behave like the Knowledge Base archive.
Since: 3.0.0
Line: 79
public function maybe_set_kb_homepage_query( $query );
| Type | Name | Description |
|---|---|---|
\WP_Query | $query | Main query object. |
maybe_redirect_kb_archive_to_homepage()
Redirect the Knowledge Base archive URL to the homepage when homepage mode is enabled.
Since: 3.0.0
Line: 127
public function maybe_redirect_kb_archive_to_homepage( );