• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP yoast_breadcrumb函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中yoast_breadcrumb函数的典型用法代码示例。如果您正苦于以下问题:PHP yoast_breadcrumb函数的具体用法?PHP yoast_breadcrumb怎么用?PHP yoast_breadcrumb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了yoast_breadcrumb函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: novrian_breadcrumbs

/**
 * Yoast Breadcrumbs on Twitter Bootstrap
 *
 * @author Novrian <[email protected]>
 * @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 = '\&raquo\;';
    $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;
}
开发者ID:jbradach,项目名称:blueprint-wp,代码行数:35,代码来源:bread.php


示例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>');
    }
}
开发者ID:s3cur3,项目名称:ci-wp-core,代码行数:7,代码来源:breadbrumbs.php


示例3: lsx_breadcrumbs

/**
 * Yoast Breadcrumbs on Twitter Bootstrap
 * 
 * @author Novrian <[email protected]>
 * @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 = '\\&raquo\\;';
    // 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;
}
开发者ID:LinaPeterssonOberg,项目名称:exam,代码行数:34,代码来源:template-tags.php


示例4: yoast_breadcrumb

 function yoast_breadcrumb($output)
 {
     if (function_exists('yoast_breadcrumb')) {
         // Yoast Breadcrumbs
         $output = yoast_breadcrumb('', '', false);
     }
     return $output;
 }
开发者ID:TwoBeers,项目名称:shiword,代码行数:8,代码来源:breadcrumb.php


示例5: bfg_do_breadcrumbs

function bfg_do_breadcrumbs()
{
    if (function_exists('yoast_breadcrumb')) {
        yoast_breadcrumb('<p class="breadcrumbs">', '</p>');
    } else {
        genesis_do_breadcrumbs();
    }
}
开发者ID:MattRy,项目名称:bones-for-genesis-2-0,代码行数:8,代码来源:loops.php


示例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);
        }
    }
}
开发者ID:perkster,项目名称:bear-bones,代码行数:8,代码来源:yoast.php


示例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();
     }
 }
开发者ID:nhatnam1102,项目名称:wp-content,代码行数:13,代码来源:breadcrumbs.php


示例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 
    }
}
开发者ID:ungarh,项目名称:ungarh-tema,代码行数:17,代码来源:utils.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>';
     }
 }
开发者ID:TwoBeers,项目名称:wallow,代码行数:14,代码来源:breadcrumb.php


示例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);
     }
 }
开发者ID:sergey-h,项目名称:naman,代码行数:16,代码来源:breadcrumbs.php


示例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();
    }
}
开发者ID:AhmeddSayed,项目名称:MM_Portal,代码行数:21,代码来源:functions-extentions.php


示例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;
}
开发者ID:nilmadhab,项目名称:webtutplus,代码行数:16,代码来源:sf-template-parts.php


示例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 
        }
    }
}
开发者ID:TickleCode,项目名称:sparkling-child-yakitori,代码行数:17,代码来源:functions.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>');
            }
        }
    }
开发者ID:siteorigin,项目名称:vantage,代码行数:17,代码来源:breadcrumbs.php


示例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 
     }
 }
开发者ID:systemo-biz,项目名称:wpbss-u3,代码行数:17,代码来源:index.php


示例16: get_responsive_breadcrumb_lists

/**
 * Breadcrumb Lists
 * Load the plugin from the plugin that is installed.
 *
 */
function get_responsive_breadcrumb_lists()
{
    $responsive_options = get_option('responsive_theme_options');
    $yoast_options = get_option('wpseo_internallinks');
    if (1 == $responsive_options['breadcrumb']) {
        return;
    } elseif (function_exists('bcn_display')) {
        echo '<span class="breadcrumb" typeof="v:Breadcrumb">';
        bcn_display();
        echo '</span>';
    } 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_breadcrumb_lists();
    }
}
开发者ID:dtekcth,项目名称:datateknologer.se,代码行数:23,代码来源:functions-extentions.php


示例17: widget

    function widget($args, $instance) {
        extract( $args );
        echo $before_widget;
		if (function_exists( 'bcn_display')) {
			echo '<div class="breadcrumb" itemprop="breadcrumb">';
			bcn_display();
			echo '</div>';
		} elseif (function_exists('yoast_breadcrumb' )) {
			yoast_breadcrumb( '<div class="breadcrumb">', '</div>' );
		} elseif ( function_exists( 'breadcrumbs' ) ) {
			breadcrumbs();
		} elseif ( function_exists( 'crumbs' ) ) {
			crumbs();
		} else {
			$this->ultimatum_breadcrumb();
		}
        echo $after_widget;
    }
开发者ID:polaris610,项目名称:medicalhound,代码行数:18,代码来源:the-breadcrumb.php


示例18: genesis_do_breadcrumbs

/**
 * Display Breadcrumbs above the Loop. Concedes priority to popular breadcrumb
 * plugins.
 *
 * @since 0.1.6
 *
 * @return null Return null if a popular breadcrumb plugin is active
 */
function genesis_do_breadcrumbs()
{
    if ('posts' === get_option('show_on_front') && is_home() && !genesis_get_option('breadcrumb_home') || 'page' === get_option('show_on_front') && is_front_page() && !genesis_get_option('breadcrumb_front_page') || 'page' === get_option('show_on_front') && is_home() && !genesis_get_option('breadcrumb_posts_page') || is_single() && !genesis_get_option('breadcrumb_single') || is_page() && !genesis_get_option('breadcrumb_page') || (is_archive() || is_search()) && !genesis_get_option('breadcrumb_archive') || is_404() && !genesis_get_option('breadcrumb_404') || is_attachment() && !genesis_get_option('breadcrumb_attachment')) {
        return;
    }
    if (function_exists('bcn_display')) {
        echo '<div class="breadcrumb" itemprop="breadcrumb">';
        bcn_display();
        echo '</div>';
    } elseif (function_exists('yoast_breadcrumb')) {
        yoast_breadcrumb('<div class="breadcrumb">', '</div>');
    } elseif (function_exists('breadcrumbs')) {
        breadcrumbs();
    } elseif (function_exists('crumbs')) {
        crumbs();
    } else {
        genesis_breadcrumb();
    }
}
开发者ID:treydonovan,项目名称:innergame-anna,代码行数:27,代码来源:breadcrumb.php


示例19: add_to_context

function add_to_context($context)
{
    // Post type
    $context['post_type'] = get_post_type();
    // Media path
    $context['path_skin'] = get_template_directory_uri();
    $context['path_css'] = $context['path_skin'] . '/web/css/';
    $context['path_fonts'] = $context['path_skin'] . '/web/fonts/';
    $context['path_img'] = $context['path_skin'] . '/web/img/';
    $context['path_js'] = $context['path_skin'] . '/web/js/';
    // breadCrump
    if (function_exists('yoast_breadcrumb')) {
        $context['breadCrumbs'] = yoast_breadcrumb('<p>', '</p>', false);
    }
    $context['showBreadCrumbs'] = true;
    //$context['link_all_news'] = get_page_link(76);
    //$context['showNewsAllLink'] = false;
    $context['housing_url'] = get_permalink(46);
    return $context;
}
开发者ID:Gregcop1,项目名称:wp-dummy-twig,代码行数:20,代码来源:add_to_context.php


示例20: sf_breadcrumbs

    function sf_breadcrumbs($alt = false)
    {
        global $post, $sf_options;
        $remove_breadcrumbs = false;
        $breadcrumb_in_heading = 0;
        if (isset($sf_options['breadcrumb_in_heading'])) {
            $breadcrumb_in_heading = $sf_options['breadcrumb_in_heading'];
        }
        // Remove breadcrumbs
        if ($post && is_singular()) {
            $remove_breadcrumbs = sf_get_post_meta($post->ID, 'sf_no_breadcrumbs', true);
        }
        // Breadcrumb in heading
        if ($breadcrumb_in_heading && !$alt) {
            return;
        }
        if (!$remove_breadcrumbs) {
            if (function_exists('bcn_display')) {
                ?>
                    <div id="breadcrumbs">
                        <div class="container"><?php 
                bcn_display();
                ?>
</div>
                    </div>
                <?php 
            } else {
                if (function_exists('yoast_breadcrumb')) {
                    ?>
                    <div id="breadcrumbs">
                        <div class="container"><?php 
                    yoast_breadcrumb("", "");
                    ?>
</div>
                    </div>
                <?php 
                }
            }
        }
    }
开发者ID:arobbins,项目名称:spellestate,代码行数:40,代码来源:sf-breadcrumbs.php



注:本文中的yoast_breadcrumb函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP yourls__函数代码示例发布时间:2022-05-23
下一篇:
PHP ynbool函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap