Navigation implements Component
Restaurant navigation menu component.
Tags
Interfaces, Classes and Traits
- Component
- Represents a restaurant menu component that can be rendered.
Table of Contents
- $categories : array<string|int, WP_Term>
- $anchor_prefix : string
- __construct() : mixed
- render() : string
- Renders the component. HTML is returned, not echoed.
Properties
$categories
protected
array<string|int, WP_Term>
$categories
The categories to display in the navigation menu.
$anchor_prefix
private
string
$anchor_prefix
The prefix for anchor links in the navigation.
Methods
__construct()
public
__construct(array<string|int, mixed> $categories[, mixed $anchor_prefix = 'wro-cat-' ]) : mixed
Parameters
- $categories : array<string|int, mixed>
- $anchor_prefix : mixed = 'wro-cat-'
Return values
mixed —render()
Renders the component. HTML is returned, not echoed.
public
render() : string
Return values
string —The component output.