Docs_Layout
Documentation Layout Class.
Namespace: WebberZone\Knowledge_Base\Pro\Frontend
Since: 3.1.0
Source: includes/frontend/class-docs-layout.php line 28
Methods
__construct()
Constructor.
Since: 3.1.0
Line: 47
public function __construct( );
is_kb_page()
Determine whether the current request is a knowledge base page.
Since: 3.1.0
Line: 87
public function is_kb_page( ): bool;
Returns: bool — True if a KB page.
docs_template()
Replace the template with the documentation layout for KB pages.
Follows the same override precedence as the free Template_Handler: theme folder -> wp-content/knowledgebase/templates -> plugin Pro templates.
Since: 3.1.0
Line: 109
public function docs_template( $template ): string;
| Type | Name | Description |
|---|---|---|
string | $template | Current template path. |
Returns: string — Modified template path.
enqueue_assets()
Enqueue documentation layout assets on KB pages.
Since: 3.1.0
Line: 153
public function enqueue_assets( );
add_body_class()
Add a body class on KB pages when the docs layout is active.
Since: 3.1.0
Line: 194
public function add_body_class( $classes ): array;
| Type | Name | Description |
|---|---|---|
array | $classes | Body classes. |
Returns: array — Modified body classes.
render_sidebar_nav() static
Render the left navigation sidebar (search + categorized nav tree).
Since: 3.1.0
Line: 206
static public function render_sidebar_nav( );
render_on_this_page() static
Render the right-hand “On this page” outline for the current article.
Since: 3.1.0
Line: 237
static public function render_on_this_page( );