'>',
'show_current' => 1,
'show_on_home' => 0,
)
);
/* === OPTIONS === */
$text['home'] = __( 'Home', 'bizbuzz' ); // text for the 'Home' link
$text['category'] = __( 'Category : %s', 'bizbuzz' ); // phpcs:ignore
$text['tax'] = __( 'Archive : %s', 'bizbuzz' ); // phpcs:ignore
$text['search'] = __( 'Search results for: %s', 'bizbuzz' ); // phpcs:ignore
$text['tag'] = __( 'Posts tagged :%s', 'bizbuzz' ); // phpcs:ignore
$text['author'] = __( 'View all posts by %s', 'bizbuzz' ); // phpcs:ignore
$text['404'] = __( 'Error 404', 'bizbuzz' ); // text for the 404 page
$showCurrent = $args['show_current']; // 1 - show current post/page title in breadcrumbs, 0 - don't show
$showOnHome = $args['show_on_home']; // 1 - show breadcrumbs on the homepage, 0 - don't show
$delimiter = ' ' . $args['separator'] . ' '; // delimiter between crumbs
$before = ''; // tag before the current crumb
$after = ''; // tag after the current crumb
/* === END OF OPTIONS === */
global $post;
$homeLink = home_url( '/' );
$linkBefore = '';
$linkAfter = '';
$linkAttr = ' rel="v:url" property="v:title"';
$link = $linkBefore . '%2$s' . $linkAfter;
if ( is_home() || is_front_page() ) {
if ( $showOnHome == 1 ) {
?>
parent != 0 ) {
$cats = get_category_parents( $thisCat->parent, true, $delimiter );
$cats = str_replace( '
', '' . $linkAfter, $cats );
echo $cats; // phpcs:ignore
}
?>
parent != 0 ) {
$cats = get_category_parents( $thisCat->parent, true, $delimiter );
$cats = str_replace( '
', '' . $linkAfter, $cats );
echo $cats; // phpcs:ignore
}
?>
labels->singular_name ); // phpcs:ignore
if ( $showCurrent == 1 ) {
echo $delimiter;
?>
rewrite;
printf( $link, esc_url( $homeLink ) . '/' . $slug['slug'] . '/', $post_type->labels->singular_name ); // phpcs:ignore
if ( $showCurrent == 1 ) {
echo $delimiter;
?>
', '' . $linkAfter, $cats );
echo $cats; // phpcs:ignore
if ( $showCurrent == 1 ) {
?>
labels->singular_name ); ?>post_parent );
$cat = get_the_category( $parent->ID );
$cat = $cat[0];
$cats = get_category_parents( $cat, true, $delimiter );
$cats = str_replace( '
', '' . $linkAfter, $cats );
echo $cats; // phpcs:ignore
printf( $link, esc_url( get_permalink( $parent ) ), esc_html( $parent->post_title ) ); // phpcs:ignore
if ( $showCurrent == 1 ) {
echo $delimiter;
?>
post_parent ) {
if ( $showCurrent == 1 ) {
?>
post_parent ) {
$parent_id = $post->post_parent;
$breadcrumbs = array();
while ( $parent_id ) {
$page = get_page( $parent_id );
$breadcrumbs[] = sprintf( $link, esc_url( get_permalink( $page->ID ) ), esc_html( get_the_title( $page->ID ) ) );
$parent_id = $page->post_parent;
}
$breadcrumbs = array_reverse( $breadcrumbs );
for ( $i = 0; $i < count( $breadcrumbs ); $i++ ) {
echo $breadcrumbs[ $i ]; // phpcs:ignore
if ( $i != count( $breadcrumbs ) - 1 ) {
echo $delimiter; // phpcs:ignore
}
}
if ( $showCurrent == 1 ) {
echo $delimiter;
?>
display_name ) );?>