WC_Breadcrumb
in package
Breadcrumb class.
Table of Contents
- $crumbs : array<string|int, mixed>
- Breadcrumb trail.
- add_crumb() : mixed
- Add a crumb so we don't get lost.
- generate() : array<string|int, mixed>
- Generate breadcrumb trail.
- get_breadcrumb() : array<string|int, mixed>
- Get the breadcrumb.
- reset() : mixed
- Reset crumbs.
- add_crumbs_404() : mixed
- 404 trail.
- add_crumbs_attachment() : mixed
- Attachment trail.
- add_crumbs_author() : mixed
- Add a breadcrumb for author archives.
- add_crumbs_category() : mixed
- Category trail.
- add_crumbs_date() : mixed
- Add crumbs for date based archives.
- add_crumbs_home() : mixed
- Is home trail.
- add_crumbs_page() : mixed
- Page trail.
- add_crumbs_post_type_archive() : mixed
- Post type archive trail.
- add_crumbs_product_category() : mixed
- Product category trail.
- add_crumbs_product_tag() : mixed
- Product tag trail.
- add_crumbs_shop() : mixed
- Shop breadcrumb.
- add_crumbs_single() : mixed
- Single post trail.
- add_crumbs_tag() : mixed
- Tag trail.
- add_crumbs_tax() : mixed
- Add crumbs for taxonomies
- endpoint_trail() : mixed
- Endpoints.
- paged_trail() : mixed
- Add a breadcrumb for pagination.
- prepend_shop_page() : mixed
- Prepend the shop page to shop breadcrumbs.
- search_trail() : mixed
- Add a breadcrumb for search results.
- term_ancestors() : mixed
- Add crumbs for a term.
Properties
$crumbs
Breadcrumb trail.
protected
array<string|int, mixed>
$crumbs
= array()
Methods
add_crumb()
Add a crumb so we don't get lost.
public
add_crumb(string $name[, string $link = '' ]) : mixed
Parameters
- $name : string
-
Name.
- $link : string = ''
-
Link.
Return values
mixed —generate()
Generate breadcrumb trail.
public
generate() : array<string|int, mixed>
Return values
array<string|int, mixed> — of breadcrumbsget_breadcrumb()
Get the breadcrumb.
public
get_breadcrumb() : array<string|int, mixed>
Return values
array<string|int, mixed> —reset()
Reset crumbs.
public
reset() : mixed
Return values
mixed —add_crumbs_404()
404 trail.
protected
add_crumbs_404() : mixed
Return values
mixed —add_crumbs_attachment()
Attachment trail.
protected
add_crumbs_attachment() : mixed
Return values
mixed —add_crumbs_author()
Add a breadcrumb for author archives.
protected
add_crumbs_author() : mixed
Return values
mixed —add_crumbs_category()
Category trail.
protected
add_crumbs_category() : mixed
Return values
mixed —add_crumbs_date()
Add crumbs for date based archives.
protected
add_crumbs_date() : mixed
Return values
mixed —add_crumbs_home()
Is home trail.
protected
add_crumbs_home() : mixed
.
Return values
mixed —add_crumbs_page()
Page trail.
protected
add_crumbs_page() : mixed
Return values
mixed —add_crumbs_post_type_archive()
Post type archive trail.
protected
add_crumbs_post_type_archive() : mixed
Return values
mixed —add_crumbs_product_category()
Product category trail.
protected
add_crumbs_product_category() : mixed
Return values
mixed —add_crumbs_product_tag()
Product tag trail.
protected
add_crumbs_product_tag() : mixed
Return values
mixed —add_crumbs_shop()
Shop breadcrumb.
protected
add_crumbs_shop() : mixed
Return values
mixed —add_crumbs_single()
Single post trail.
protected
add_crumbs_single(int $post_id[, string $permalink = '' ]) : mixed
Parameters
- $post_id : int
-
Post ID.
- $permalink : string = ''
-
Post permalink.
Return values
mixed —add_crumbs_tag()
Tag trail.
protected
add_crumbs_tag() : mixed
Return values
mixed —add_crumbs_tax()
Add crumbs for taxonomies
protected
add_crumbs_tax() : mixed
Return values
mixed —endpoint_trail()
Endpoints.
protected
endpoint_trail() : mixed
Return values
mixed —paged_trail()
Add a breadcrumb for pagination.
protected
paged_trail() : mixed
Return values
mixed —prepend_shop_page()
Prepend the shop page to shop breadcrumbs.
protected
prepend_shop_page() : mixed
Return values
mixed —search_trail()
Add a breadcrumb for search results.
protected
search_trail() : mixed
Return values
mixed —term_ancestors()
Add crumbs for a term.
protected
term_ancestors(int $term_id, string $taxonomy) : mixed
Parameters
- $term_id : int
-
Term ID.
- $taxonomy : string
-
Taxonomy.