PHP Class WPKB\Breadcrumbs\Crumbs

显示文件 Open project: ibericode/wp-knowledge-base

Public Methods

Method Description
__construct ( WP_Pos\WP_Post $archive_page = null ) Crumbs constructor.
__toString ( ) : string
build_html ( string $opening_element = '<p class="breadcrumb wpkb-breadcrumb">', string $closing_element = '</p>', string $separator = '&raquo;', string $prefix = 'You are here:' ) : string Build the HTML string for the breadcrumbs

Private Methods

Method Description
add_crumb ( string $link, string $title ) Adds a crumb to the breadcrumbs
add_term_crumb ( mixed $term, string $term_type ) : boolean
build_crumbs ( ) Build the array of crumbs

Method Details

__construct() public method

Crumbs constructor.
public __construct ( WP_Pos\WP_Post $archive_page = null )
$archive_page WP_Pos\WP_Post

__toString() public method

public __toString ( ) : string
return string

build_html() public method

Build the HTML string for the breadcrumbs
public build_html ( string $opening_element = '<p class="breadcrumb wpkb-breadcrumb">', string $closing_element = '</p>', string $separator = '&raquo;', string $prefix = 'You are here:' ) : string
$opening_element string
$closing_element string
$separator string
$prefix string
return string