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

PHP wpsc_has_breadcrumbs函数代码示例

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

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



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

示例1: wpsc_output_breadcrumbs

/**
* Output breadcrumbs if configured
* @return None - outputs breadcrumb HTML
*/
function wpsc_output_breadcrumbs($options = null)
{
    // Defaults
    $options = apply_filters('wpsc_output_breadcrumbs_options', $options);
    $options = wp_parse_args((array) $options, array('before-breadcrumbs' => '<div class="wpsc-breadcrumbs">', 'after-breadcrumbs' => '</div>', 'before-crumb' => '', 'after-crumb' => '', 'crumb-separator' => ' &raquo; ', 'show_home_page' => true, 'show_products_page' => true, 'echo' => true));
    $output = '';
    $products_page_id = wpsc_get_the_post_id_by_shortcode('[productspage]');
    $products_page = get_post($products_page_id);
    if (!wpsc_has_breadcrumbs()) {
        return;
    }
    $filtered_products_page = array('url' => get_option('product_list_url'), 'name' => apply_filters('the_title', $products_page->post_title));
    $filtered_products_page = apply_filters('wpsc_change_pp_breadcrumb', $filtered_products_page);
    // Home Page Crumb
    // If home if the same as products page only show the products-page link and not the home link
    if (get_option('page_on_front') != $products_page_id && $options['show_home_page']) {
        $output .= $options['before-crumb'];
        $output .= '<a class="wpsc-crumb" id="wpsc-crumb-home" href="' . get_option('home') . '">' . get_option('blogname') . '</a>';
        $output .= $options['after-crumb'];
    }
    // Products Page Crumb
    if ($options['show_products_page']) {
        if (!empty($output)) {
            $output .= $options['crumb-separator'];
        }
        $output .= $options['before-crumb'];
        $output .= '<a class="wpsc-crumb" id="wpsc-crumb-' . $products_page_id . '" href="' . $filtered_products_page['url'] . '">' . $filtered_products_page['name'] . '</a>';
        $output .= $options['after-crumb'];
    }
    // Remaining Crumbs
    while (wpsc_have_breadcrumbs()) {
        wpsc_the_breadcrumb();
        if (!empty($output)) {
            $output .= $options['crumb-separator'];
        }
        $output .= $options['before-crumb'];
        if (wpsc_breadcrumb_url()) {
            $output .= '<a class="wpsc-crumb" id="wpsc-crumb-' . wpsc_breadcrumb_slug() . '" href="' . wpsc_breadcrumb_url() . '">' . wpsc_breadcrumb_name() . '</a>';
        } else {
            $output .= '<span class="wpsc-crumb" id="wpsc-crumb-' . wpsc_breadcrumb_slug() . '">' . wpsc_breadcrumb_name() . '</span>';
        }
        $output .= $options['after-crumb'];
    }
    $output = $options['before-breadcrumbs'] . apply_filters('wpsc_output_breadcrumbs', $output, $options) . $options['after-breadcrumbs'];
    if ($options['echo']) {
        echo $output;
    } else {
        return $output;
    }
}
开发者ID:pankajsinghjarial,项目名称:SYLC,代码行数:54,代码来源:breadcrumbs.class.php


示例2: wpsc_output_breadcrumbs

/**
* Output breadcrumbs if configured
* @return None - outputs breadcrumb HTML
*/
function wpsc_output_breadcrumbs($options = array())
{
    $products_page_id = wpec_get_the_post_id_by_shortcode('[productspage]');
    $products_page = get_post($products_page_id);
    if (!wpsc_has_breadcrumbs()) {
        return;
    }
    $filtered_products_page = array('url' => get_option('product_list_url'), 'name' => $products_page->post_title);
    $filtered_products_page = apply_filters('wpsc_change_pp_breadcrumb', $filtered_products_page);
    // If home if the same as products apge only show the products-page link and not the home link
    if (get_option('page_on_front') != $products_page_id) {
        echo isset($options['before-breadcrumbs']) ? $options['before-breadcrumbs'] : '<div class="wpsc-breadcrumbs">';
        echo isset($options['before-crumb']) ? $options['before-crumb'] : '';
        echo '<a class="wpsc-crumb" id="wpsc-crumb-home" href="' . get_option('home') . '">' . get_option('blogname') . '</a>';
        echo isset($options['after-crumb']) ? $options['after-crumb'] : '';
        echo isset($options['crumb-separator']) ? $options['crumb-separator'] : ' &raquo; ';
    }
    echo isset($options['before-crumb']) ? $options['before-crumb'] : '';
    echo '<a class="wpsc-crumb" id="wpsc-crumb-' . $products_page_id . '" href="' . $filtered_products_page['url'] . '">' . $filtered_products_page['name'] . '</a>';
    echo isset($options['after-crumb']) ? $options['after-crumb'] : '';
    while (wpsc_have_breadcrumbs()) {
        wpsc_the_breadcrumb();
        echo isset($options['crumb-separator']) ? $options['crumb-separator'] : ' &raquo; ';
        echo isset($options['before-crumb']) ? $options['before-crumb'] : '';
        if (wpsc_breadcrumb_url()) {
            echo '<a class="wpsc-crumb" id="wpsc-crumb-' . wpsc_breadcrumb_slug() . '" href="' . wpsc_breadcrumb_url() . '">' . wpsc_breadcrumb_name() . '</a>';
        } else {
            echo wpsc_breadcrumb_name();
        }
        echo isset($options['after-crumb']) ? $options['after-crumb'] : '';
    }
    if (isset($options['after-breadcrumbs'])) {
        echo $options['after-breadcrumbs'];
    } else {
        echo '</div>';
    }
}
开发者ID:hornet9,项目名称:Morato,代码行数:41,代码来源:breadcrumbs.class.php


示例3: get_option

<?php

global $wpsc_query, $wpdb;
$image_width = get_option('single_view_image_width');
$image_height = get_option('single_view_image_height');
?>
<div id='products_page_container' class="wrap wpsc_container">
	
	
	<?php 
if (wpsc_has_breadcrumbs()) {
    ?>
		<div class='breadcrumb'>
			<a href='<?php 
    echo get_option('product_list_url');
    ?>
'><?php 
    echo get_option('blogname');
    ?>
</a> &raquo;
			<?php 
    while (wpsc_have_breadcrumbs()) {
        wpsc_the_breadcrumb();
        ?>
				<?php 
        if (wpsc_breadcrumb_url()) {
            ?>
 	   
					<a href='<?php 
            echo wpsc_breadcrumb_url();
            ?>
开发者ID:Jonathonbyrd,项目名称:wp-ecommerce,代码行数:31,代码来源:single_product.php


示例4: if

<?php
global $wpsc_query, $wpdb;
?>
<div id='products_page_container' class="wrap wpsc_container">

<?php if(wpsc_has_breadcrumbs()) : ?>
		<div class='breadcrumb'>
			<a href='<?php echo get_option('home'); ?>'><?php echo get_option('blogname'); ?></a> &raquo;
			<?php while (wpsc_have_breadcrumbs()) : wpsc_the_breadcrumb(); ?>
				<?php if(wpsc_breadcrumb_url()) :?> 	   
					<a href='<?php echo wpsc_breadcrumb_url(); ?>'><?php echo wpsc_breadcrumb_name(); ?></a> &raquo;
				<?php else: ?> 
					<?php echo wpsc_breadcrumb_name(); ?>
				<?php endif; ?> 
			<?php endwhile; ?>
		</div>
	<?php endif; ?>
	
	<?php do_action('wpsc_top_of_products_page'); // Plugin hook for adding things to the top of the products page, like the live search ?>

	<?php if(wpsc_display_categories()): ?>
	  <?php if(get_option('wpsc_category_grid_view') == 1) :?>
			<div class='wpsc_categories wpsc_category_grid'>
				<?php wpsc_start_category_query(array('category_group'=> get_option('wpsc_default_category'), 'show_thumbnails'=> 1)); ?>
					<a href="<?php wpsc_print_category_url();?>" class="wpsc_category_grid_item" title='<?php wpsc_print_category_name();?>'>
						<?php wpsc_print_category_image(45, 45); ?>
					</a>
					<?php wpsc_print_subcategory("", ""); ?>
				<?php wpsc_end_category_query(); ?>
				<div class='clear_category_group'></div>
			</div>
开发者ID:nerdfiles,项目名称:sideshowtramps.com,代码行数:31,代码来源:list_view.php


示例5: wpsc_output_breadcrumbs

/**
* Output breadcrumbs if configured
* @return None - outputs breadcrumb HTML
*/
function wpsc_output_breadcrumbs($options = null)
{
    /**
     * Filter the arguments passed to wpsc_output_breadcrumbs.
     *
     * @since 3.9.0
     * @param array $options {
     *     associative array of options for outputting the breadcrumbs to this page.
     *
     *     'before-breadcrumbs' string  HTML output to start the breadcrumb.
     *     'after-breadcrumbs'  string  HTML output at the end of the breadcrumb eg closing tag.
     *     'before-crumb'       string  output before each step in path, typically decorative.
     *     'after-crumb'        string  output after each step in path.
     *     'crumb-separator'    string  demarks space between steps in path.
     *     'show_home_page'     bool    Whether to include home page as step at start of path.
     *     'show_products_page' bool    Whether to include products-page as second step in path.
     *     'echo'               bool    if true, outputs constructed string; if false, returns constructed string.
     *     'products_page_id'   int     Override the page id used for products_page
     *     }
     *
     */
    // Defaults
    $options = apply_filters('wpsc_output_breadcrumbs_options', $options);
    $options = wp_parse_args((array) $options, array('before-breadcrumbs' => '<div class="wpsc-breadcrumbs">', 'after-breadcrumbs' => '</div>', 'before-crumb' => '', 'after-crumb' => '', 'crumb-separator' => ' &raquo; ', 'show_home_page' => true, 'show_products_page' => true, 'echo' => true, 'products_page_id' => wpsc_get_the_post_id_by_shortcode('[productspage]')));
    $output = '';
    $products_page_id = absint($options['products_page_id']);
    $products_page = get_post($products_page_id);
    if (!wpsc_has_breadcrumbs()) {
        return;
    }
    $filtered_products_page = array('url' => get_option('product_list_url'), 'name' => apply_filters('the_title', $products_page->post_title, $products_page_id));
    /**
     * Filter the values used to create the products-page step.
     *
     * Overrides the url and text show for the products-page step in breadcrumb.
     *
     * @since 3.9.0
     * @param array $filtered_products_page {
     *     associative array of options for outputting the breadcrumbs to this page.
     *
     *     'url'   string  Fully-qualified url to products-page.
     *     'name'  string  The name that will appear for the products-page in breadcrumb.
     *     }
     *
     */
    $filtered_products_page = apply_filters('wpsc_change_pp_breadcrumb', $filtered_products_page);
    // Home Page Crumb
    // If home if the same as products page only show the products-page link and not the home link
    if (get_option('page_on_front') != $products_page_id && $options['show_home_page']) {
        $output .= $options['before-crumb'];
        $output .= '<a class="wpsc-crumb" id="wpsc-crumb-home" href="' . get_option('home') . '">' . get_option('blogname') . '</a>';
        $output .= $options['after-crumb'];
    }
    // Products Page Crumb
    if ($options['show_products_page']) {
        if (!empty($output)) {
            $output .= $options['crumb-separator'];
        }
        $output .= $options['before-crumb'];
        $output .= '<a class="wpsc-crumb" id="wpsc-crumb-' . $products_page_id . '" href="' . $filtered_products_page['url'] . '">' . $filtered_products_page['name'] . '</a>';
        $output .= $options['after-crumb'];
    }
    // Remaining Crumbs
    while (wpsc_have_breadcrumbs()) {
        wpsc_the_breadcrumb();
        if (!empty($output)) {
            $output .= $options['crumb-separator'];
        }
        $output .= $options['before-crumb'];
        if (wpsc_breadcrumb_url()) {
            $output .= '<a class="wpsc-crumb" id="wpsc-crumb-' . wpsc_breadcrumb_slug() . '" href="' . wpsc_breadcrumb_url() . '">' . wpsc_breadcrumb_name() . '</a>';
        } else {
            $output .= '<span class="wpsc-crumb" id="wpsc-crumb-' . wpsc_breadcrumb_slug() . '">' . wpsc_breadcrumb_name() . '</span>';
        }
        $output .= $options['after-crumb'];
    }
    /**
     * Filter the assembled breadcrumb.
     *
     * @since 3.9.0
     * @param string $output The constructed breadcrumb string.
     * @param array $options {@see 'wpsc_output_breadcrumbs_options'}
     *
     */
    $output = $options['before-breadcrumbs'] . apply_filters('wpsc_output_breadcrumbs', $output, $options) . $options['after-breadcrumbs'];
    if ($options['echo']) {
        echo $output;
    } else {
        return $output;
    }
}
开发者ID:AngryBird3,项目名称:WP-e-Commerce,代码行数:95,代码来源:breadcrumbs.php


示例6: bbp_breadcrumb

        require_once NV_FILES . '/inc/social-icons.php';
        echo '</div><!-- / resize-social-wrap -->';
    }
    if ($NV_hidebreadcrumbs != 'yes') {
        echo '<div id="sub-tabs" class="columns ' . ($NV_socialicons == "yes" || $NV_textresize == "yes" ? 'six' : 'twelve') . '">';
        if (class_exists('bbPress') && is_bbpress()) {
            bbp_breadcrumb();
        } else {
            ?>
						<ul class="clearfix">
						<?php 
            // Woocommerce Breadcrumb
            if (function_exists('woocommerce_breadcrumb') && is_woocommerce()) {
                woocommerce_breadcrumb('delimiter= / &wrap_before=<div class="breadcrumb">');
            } elseif (function_exists('wpsc_has_breadcrumbs')) {
                if (wpsc_has_breadcrumbs() && !is_page()) {
                    ?>
										<div class='breadcrumb'>
											<li class="home">
												<a href='<?php 
                    echo get_option('product_list_url');
                    ?>
'><?php 
                    echo get_option('blogname');
                    ?>
</a>
												<span class="subbreak">/</span>
                                            </li>
											<?php 
                    while (wpsc_have_breadcrumbs()) {
                        wpsc_the_breadcrumb();
开发者ID:jgeletka,项目名称:simskin,代码行数:31,代码来源:header.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP wpsc_has_multi_adding函数代码示例发布时间:2022-05-23
下一篇:
PHP wpsc_get_template_file_path函数代码示例发布时间: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