Recent

KB_Homepage_Mode class Pro only

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;
TypeNameDescription
string|false$redirect_urlThe redirect URL.
string$requested_urlThe 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 );
TypeNameDescription
\WP_Query$queryMain 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(  );