本文整理汇总了PHP中yoast_breadcrumb函数的典型用法代码示例。如果您正苦于以下问题:PHP yoast_breadcrumb函数的具体用法?PHP yoast_breadcrumb怎么用?PHP yoast_breadcrumb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yoast_breadcrumb函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: novrian_breadcrumbs
/**
* Yoast Breadcrumbs on Twitter Bootstrap
*
* @author Novrian <me@novrian.info>
* @copyright (c) 2013. Novrian Y.F.
* @license MIT License
* @param string $sep Your custom separator
*/
function novrian_breadcrumbs($sep = '')
{
if (!function_exists('yoast_breadcrumb')) {
return null;
}
// Default Yoast Breadcrumbs Separator
// $old_sep = '\»\;';
$old_sep = '»';
// Get the crumbs
$crumbs = yoast_breadcrumb(null, null, false);
// Hilangkan wrapper <span xmlns:v />
$output = preg_replace("/^\\<span xmlns\\:v=\"http\\:\\/\\/rdf\\.data\\-vocabulary\\.org\\/#\"\\>/", "", $crumbs);
$output = preg_replace("/\\<\\/span\\>\$/", "", $output);
// Ambil Crumbs
$crumb = preg_split("/ (" . $old_sep . ") /", $output);
// Manipulasi string output tiap crumbs
$crumb = array_map(create_function('$crumb', '
if (preg_match(\'/\\<span\\40class=\\"breadcrumb_last\\"/\', $crumb)) {
return \'<li class="active">\' . $crumb . \'</li>\';
}
return \'<li>\' . $crumb . \' <span class="divider">' . $sep . '</span></li>\';
'), $crumb);
// Bangun output HTML
$output = '<div class="breadcrumbs-container text-right" xmlns:v="http://rdf.data-vocabulary.org/#"\\><ul class="breadcrumb">' . implode("", $crumb) . '</ul></div>';
// Print
echo $output;
}
示例2: printBreadcrumbs
function printBreadcrumbs()
{
$breadcrumbsShouldBePrinted = !(is_home() || is_archive() || is_search() || is_404() || is_page_template('template-blog.php') || is_page_template('template-landing.php')) && is_singular();
if ($breadcrumbsShouldBePrinted && function_exists('yoast_breadcrumb')) {
yoast_breadcrumb('<p id="breadcrumbs">', '</p>');
}
}
示例3: lsx_breadcrumbs
/**
* Yoast Breadcrumbs on Twitter Bootstrap
*
* @author Novrian <me@novrian.info>
* @copyright (c) 2013. Novrian Y.F.
* @license MIT License
* @param string $sep Your custom separator
*/
function lsx_breadcrumbs()
{
if (!function_exists('yoast_breadcrumb')) {
return null;
}
// Default Yoast Breadcrumbs Separator
$old_sep = '\\»\\;';
// Get the crumbs
$crumbs = yoast_breadcrumb(null, null, false);
// Remove wrapper <span xmlns:v />
$output = preg_replace("/^\\<span xmlns\\:v=\"http\\:\\/\\/rdf\\.data\\-vocabulary\\.org\\/#\"\\>/", "", $crumbs);
$output = preg_replace("/\\<\\/span\\><\\/span\\>\$/", "", $output);
$crumb = preg_split("/ (" . $old_sep . ") /", $output);
$crumb = array_map(create_function('$crumb', '
if (preg_match(\'/\\<span\\40class=\\"breadcrumb_last\\"/\', $crumb)) {
return \'<li class="active">\' . $crumb . \'</li>\';
}
return \'<li>\' . $crumb . \' </li>\';
'), $crumb);
if (function_exists('yoast_breadcrumb')) {
$output = '<div class="breadcrumbs-container" xmlns="http://rdf.data-vocabulary.org/#"> <ul class="breadcrumb">' . implode("", $crumb) . '</ul></div>';
$output = '<div class="breadcrumbs-container"> <ul class="breadcrumb">' . implode("", $crumb) . '</ul></div>';
}
// Print
echo $output;
}
示例4: yoast_breadcrumb
function yoast_breadcrumb($output)
{
if (function_exists('yoast_breadcrumb')) {
// Yoast Breadcrumbs
$output = yoast_breadcrumb('', '', false);
}
return $output;
}
示例5: bfg_do_breadcrumbs
function bfg_do_breadcrumbs()
{
if (function_exists('yoast_breadcrumb')) {
yoast_breadcrumb('<p class="breadcrumbs">', '</p>');
} else {
genesis_do_breadcrumbs();
}
}
示例6: bb_yoast_breadcrumb
function bb_yoast_breadcrumb($display = true)
{
if (function_exists('yoast_breadcrumb')) {
if (!is_front_page()) {
yoast_breadcrumb('<div class="yoast-breadcrumbs"><p id="breadcrumbs" class="yoast-breadcrumbs__links">', '</p></div>', $display);
}
}
}
示例7: wpex_display_breadcrumbs
function wpex_display_breadcrumbs()
{
// Yoast breadcrumbs
if (function_exists('yoast_breadcrumb')) {
return yoast_breadcrumb('<nav class="site-breadcrumbs clr"">', '</nav>');
// Built-in breadcrumbs
} else {
if (wpex_option('breadcrumbs', '1') !== '1') {
return;
}
echo wpex_breadcrumbs();
}
}
示例8: ungarh_breadcrumbs
/**
* Yoast breadcrumbs
*/
function ungarh_breadcrumbs()
{
if (function_exists('yoast_breadcrumb') && !is_front_page()) {
?>
<div class="site-breadcrumbs">
<div class="container">
<?php
yoast_breadcrumb();
?>
</div>
</div>
<?php
}
}
示例9: display
function display()
{
$output = '';
if (function_exists('bcn_display')) {
// Breadcrumb NavXT
$output = bcn_display(true);
} elseif (function_exists('yoast_breadcrumb')) {
// Yoast Breadcrumbs
$output = yoast_breadcrumb('', '', false);
}
if ($output) {
echo '<div id="breadcrumb-wrap" class="fixfloat">' . $output . '</div>';
}
}
示例10: wpex_display_breadcrumbs
function wpex_display_breadcrumbs($post_id = '')
{
// Get post id
$post_id = $post_id ? $post_id : wpex_get_the_id();
// Check if breadcrumbs are disabled
if (!wpex_breadcrumbs_enabled($post_id)) {
return;
}
// Yoast breadcrumbs
$yoast_options = get_option('wpseo_internallinks');
if (function_exists('yoast_breadcrumb') && $yoast_options['breadcrumbs-enable'] === true) {
return yoast_breadcrumb('<nav class="site-breadcrumbs clr">', '</nav>');
} else {
echo wpex_breadcrumbs($post_id);
}
}
示例11: responsive_mobile_get_breadcrumb_lists
/**
* Breadcrumb Lists
* Load the plugin from the plugin that is installed.
*
*/
function responsive_mobile_get_breadcrumb_lists()
{
$responsive_mobile_options = get_option('responsive_mobile_theme_options');
$yoast_options = get_option('wpseo_internallinks');
if (1 == $responsive_mobile_options['breadcrumb']) {
return;
} elseif (function_exists('bcn_display')) {
bcn_display();
} elseif (function_exists('breadcrumb_trail')) {
breadcrumb_trail();
} elseif (function_exists('yoast_breadcrumb') && true === $yoast_options['breadcrumbs-enable']) {
yoast_breadcrumb('<p id="breadcrumbs">', '</p>');
} elseif (!is_search()) {
responsive_mobile_breadcrumb_lists();
}
}
示例12: sf_breadcrumbs
function sf_breadcrumbs()
{
$breadcrumb_output = "";
if (function_exists('bcn_display')) {
$breadcrumb_output .= '<div class="breadcrumbs-wrap row"><div id="breadcrumbs" class="span12 alt-bg">';
$breadcrumb_output .= bcn_display(true);
$breadcrumb_output .= '</div></div>';
} else {
if (function_exists('yoast_breadcrumb')) {
$breadcrumb_output .= '<div class="breadcrumbs-wrap row"><div id="breadcrumbs" class="span12 alt-bg">';
$breadcrumb_output .= yoast_breadcrumb("", "", false);
$breadcrumb_output .= '</div></div>';
}
}
return $breadcrumb_output;
}
示例13: setbreadcrum
function setbreadcrum()
{
if (function_exists('yoast_breadcrumb')) {
// トップ以外に表示する。
if (!is_front_page()) {
?>
<script>
var breadcrumb ='<div class="yoast-breadcrumb"><?php
yoast_breadcrumb();
?>
</div>';
jQuery('.main-content-inner').prepend(breadcrumb);
</script>
<?php
}
}
}
示例14: vantage_display_breadcrumbs
function vantage_display_breadcrumbs()
{
if (!is_front_page() && siteorigin_setting('navigation_yoast_breadcrumbs')) {
if (function_exists('bcn_display')) {
?>
<div id="navxt-breadcrumbs">
<div class="full-container">
<?php
bcn_display();
?>
</div>
</div><?php
} elseif (function_exists('yoast_breadcrumb')) {
yoast_breadcrumb('<div id="yoast-breadcrumbs"><div class="full-container">', '</div></div>');
}
}
}
示例15: add_section
function add_section()
{
if (!get_theme_mod('support_yoast_bc_enable')) {
return;
}
if (function_exists('yoast_breadcrumb')) {
?>
<div class="container">
<div class="breadcrumb">
<?php
yoast_breadcrumb('<div id="breadcrumbs">', '</div>');
?>
</div>
</div>
<?php
}
}