芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/wp-content/themes/dexolix/inc/breadcrumb.php
' . $space; $link = apply_filters('dm_breadcrumb_link', '
%2$s
'); $current = apply_filters('dm_breadcrumb_current', '
%s
'); if (($on_front == 'page' && is_front_page()) || ($on_front == 'posts' && is_home())) { return; } $out = '
'; if ($on_front == "page" && is_home()) { $blog_title = isset($blog_page) ? get_the_title($blog_page) : __('Our Blog', 'dexolix'); $out .= sprintf($link, home_url(), __('Home', 'dexolix')) . $separator . sprintf($current, $blog_title); } else { $out .= sprintf($link, home_url(), __('Home', 'dexolix')); } if (is_singular()) { if (is_singular('post') && $blog_page > 0) { $out .= $separator . sprintf($link, get_permalink($blog_page), esc_attr(get_the_title($blog_page))); }else{ if ($post->post_parent > 0) { if (isset($post->ancestors)) { if (is_array($post->ancestors)) $ancestors = array_values($post->ancestors); else $ancestors = array($post->ancestors); } else { $ancestors = array($post->post_parent); } foreach (array_reverse($ancestors) as $key => $value) { $out .= $separator . sprintf($link, get_permalink($value), esc_attr(get_the_title($value))); } } $post_type = get_post_type(); if (get_post_type_archive_link($post_type)) { $post_type_obj = get_post_type_object($post_type); $out .= $separator . sprintf($link, get_post_type_archive_link($post_type), esc_attr($post_type_obj->labels->menu_name)); } } $out .= $separator . sprintf($current, get_the_title()); } else { if (is_post_type_archive()) { $post_type = get_post_type(); $post_type_obj = get_post_type_object($post_type); $out .= $separator . sprintf($current, $post_type_obj->labels->menu_name); } else if (is_tax()) { if (is_tax('download_tag') || is_tax('download_category')) { $post_type = get_post_type(); $post_type_obj = get_post_type_object($post_type); $out .= $separator . sprintf($link, get_post_type_archive_link($post_type), esc_attr($post_type_obj->labels->menu_name)); } $out .= $separator . sprintf($current, $wp_query->queried_object->name); } else if (is_category()) { $out .= $separator . __('
Category >
', 'dexolix') . sprintf($current, $wp_query->queried_object->name); } else if (is_tag()) { $out .= $separator . __('Tag: ', 'dexolix') . sprintf($current, $wp_query->queried_object->name); } else if (is_date()) { $out .= $separator; if (is_day()) { global $wp_locale; $out .= sprintf($link, get_month_link(get_query_var('year'), get_query_var('monthnum')), $wp_locale->get_month(get_query_var('monthnum')) . ' ' . get_query_var('year')); $out .= $separator . sprintf($current, get_the_date()); } else if (is_month()) { $out .= sprintf($current, single_month_title(' ', false)); } else if (is_year()) { $out .= sprintf($current, get_query_var('year')); } } else if (is_404()) { $out .= $separator . sprintf($current, __('Error 404', 'dexolix')); } elseif (is_search()) { if (have_posts()) { $out .= $separator . sprintf($current, get_search_query()); } else { $out .= $separator . sprintf($current, get_search_query()); } } } $out .= '
'; echo apply_filters('dexolix_breadcrumbs_out', $out); } } // Hooks into the Digital Store theme add_action('dexolix_before_template_header', 'dexolix_breadcrumbs');