Category_Prefixer implements Registerable, Service
Responsible for prefixing the names of protected and private categories.
Tags
Interfaces, Classes and Traits
- Registerable
- Service
Table of Contents
- prefix_category() : mixed
- prefix_category_breadcrumb() : array<string|int, mixed>
- Add 'Protected' or 'Private' to category name in breadcrumb.
- prefix_category_menu_items() : mixed
- prefix_category_title() : mixed
- prefix_term_in_widget() : string
- Prefix the category name in the product category widget.
- register() : mixed
Methods
prefix_category()
public
static prefix_category(mixed $term_title[, mixed $term_id = false ]) : mixed
Parameters
- $term_title : mixed
- $term_id : mixed = false
Return values
mixed —prefix_category_breadcrumb()
Add 'Protected' or 'Private' to category name in breadcrumb.
public
static prefix_category_breadcrumb(mixed $breadcrumb) : array<string|int, mixed>
Parameters
- $breadcrumb : mixed
Return values
array<string|int, mixed> —The updated breadcrumb trail
prefix_category_menu_items()
public
static prefix_category_menu_items(mixed $menu_items, mixed $menu, mixed $args) : mixed
Parameters
- $menu_items : mixed
- $menu : mixed
- $args : mixed
Return values
mixed —prefix_category_title()
public
static prefix_category_title(mixed $term_title) : mixed
Parameters
- $term_title : mixed
Return values
mixed —prefix_term_in_widget()
Prefix the category name in the product category widget.
public
static prefix_term_in_widget(string $term_title, object $term) : string
Parameters
- $term_title : string
-
The term title.
- $term : object
-
The term object.
Return values
string —The updated term title.
register()
public
register() : mixed