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

PHP sf_woocommerce_activated函数代码示例

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

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



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

示例1: spb_register_assets

 function spb_register_assets()
 {
     $pb_assets = array();
     $path = dirname(__FILE__) . '/shortcodes/';
     $folders = scandir($path, 1);
     foreach ($folders as $file) {
         if ($file == '.' || $file == '..' || $file == '.DS_Store' || strpos($file, '.php') != true) {
             continue;
         }
         $file = substr($file, 0, -4);
         $pb_assets[$file] = SPB_SHORTCODES . $file . '.php';
     }
     $pb_assets = apply_filters('spb_assets_filter', $pb_assets);
     if (!sf_gravityforms_activated()) {
         unset($pb_assets['gravityforms']);
     }
     if (!sf_woocommerce_activated()) {
         unset($pb_assets['products']);
         unset($pb_assets['product-reviews']);
     }
     if (!sf_gopricing_activated()) {
         unset($pb_assets['gopricing']);
     }
     if (!sf_ninjaforms_activated()) {
         unset($pb_assets['ninjaforms']);
     }
     // Load Each Asset
     foreach ($pb_assets as $asset) {
         require_once $asset;
     }
 }
开发者ID:arobbins,项目名称:spellestate,代码行数:31,代码来源:sf-page-builder.php


示例2: content

 protected function content($atts, $content = null)
 {
     $title = $asset_type = $carousel = $product_size = $width = $sidebars = $el_class = $output = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'asset_type' => 'best-sellers', 'carousel' => 'no', 'product_size' => 'standard', 'item_count' => '8', 'category' => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     /* PRODUCT ITEMS
     			================================================== */
     if (sf_woocommerce_activated()) {
         $items = sf_product_items($asset_type, $category, $carousel, $product_size, $item_count, $width);
     } else {
         $items = __("Please install/activate WooCommerce.", "swift-framework-admin");
     }
     $el_class = $this->getExtraClass($el_class);
     $width = spb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="product_list_widget products-' . $product_size . ' woocommerce spb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="spb_wrapper">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="spb-heading"><span>' . $title . '</span></h3>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     if ($carousel == "yes") {
         global $sf_include_carousel;
         $sf_include_carousel = true;
     }
     global $sf_include_isotope, $sf_has_products;
     $sf_include_isotope = true;
     $sf_has_products = true;
     return $output;
 }
开发者ID:VeritasStrategies,项目名称:Poplin,代码行数:29,代码来源:products.php


示例3: sf_custom_styles


//.........这里部分代码省略.........
					.col-sm-offset-7 {
					  margin-left: 58.333333333333336%;
					}
					.col-sm-offset-6 {
					  margin-left: 50%;
					}
					.col-sm-offset-5 {
					  margin-left: 41.66666666666667%;
					}
					.col-sm-offset-4 {
					  margin-left: 33.33333333333333%;
					}
					.col-sm-offset-3 {
					  margin-left: 25%;
					}
					.col-sm-offset-2 {
					  margin-left: 16.666666666666664%;
					}
					.col-sm-offset-1 {
					  margin-left: 8.333333333333332%;
					}
					#container.boxed-layout, .boxed-layout #header-section .is-sticky #main-nav.sticky-header, .boxed-layout #header-section.header-6 .is-sticky #header.sticky-header {
						width: ' . $site_boxedwidth . 'px;
					}
					#swift-slider {
						min-width: ' . $site_contwidth . 'px;
					}
					.visible-xs, .visible-sm, .visible-xs.visible-sm {
						display:none!important;
					}
					' . "\n";
        }
        // FONT STYLES
        if (sf_woocommerce_activated()) {
            $font_directory = get_template_directory_uri() . '/css/font';
            $shop_icon_style = $sf_options['shop_icon_style'];
            if ($shop_icon_style == "stroke") {
                echo "@font-face {\n\t\t\t\t\t\tfont-family: 'si-shop-one';\n\t\t\t\t\t\tsrc:url('" . $font_directory . "/si-shop-one.eot?-7oeevn');\n\t\t\t\t\t\tsrc:url('" . $font_directory . "/si-shop-one.eot?#iefix-7oeevn') format('embedded-opentype'),\n\t\t\t\t\t\t\turl('" . $font_directory . "/si-shop-one.woff?-7oeevn') format('woff'),\n\t\t\t\t\t\t\turl('" . $font_directory . "/si-shop-one.ttf?-7oeevn') format('truetype'),\n\t\t\t\t\t\t\turl('" . $font_directory . "/si-shop-one.svg?-7oeevn#atelier') format('svg');\n\t\t\t\t\t\tfont-weight: normal;\n\t\t\t\t\t\tfont-style: normal;\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-cart, .sf-icon-add-to-cart, .sf-icon-variable-options, .sf-icon-soldout {\n\t\t\t\t\t\tfont-family: 'si-shop-one'!important;\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-cart:before {\n\t\t\t\t\t\tcontent: '\\e609';\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-add-to-cart:before {\n\t\t\t\t\t\tcontent: '\\e608';\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-variable-options:before {\n\t\t\t\t\t\tcontent: '\\e600';\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-soldout:before {\n\t\t\t\t\t\tcontent: '\\e601';\n\t\t\t\t\t}\n\t\t\t\t\t.shopping-bag-item a > span.num-items {\n\t\t\t\t\t\tline-height: 20px!important;\n\t\t\t\t\t}\n\t\t\t\t\t#mobile-menu ul li.shopping-bag-item > a span.num-items {\n\t\t\t\t\t  right: 21px;\n\t\t\t\t\t}\n\t\t\t\t\t.wishlist-item > a > i {\n\t\t\t\t\t\tvertical-align: -6px!important;\n\t\t\t\t\t}\n\t\t\t\t\t";
            } else {
                if ($shop_icon_style == "fill") {
                    echo "@font-face {\n\t\t\t\t\t\tfont-family: 'si-shop-two';\n\t\t\t\t\t\tsrc:url('" . $font_directory . "/si-shop-two.eot?-7oeevn');\n\t\t\t\t\t\tsrc:url('" . $font_directory . "/si-shop-two.eot?#iefix-7oeevn') format('embedded-opentype'),\n\t\t\t\t\t\t\turl('" . $font_directory . "/si-shop-two.woff?-7oeevn') format('woff'),\n\t\t\t\t\t\t\turl('" . $font_directory . "/si-shop-two.ttf?-7oeevn') format('truetype'),\n\t\t\t\t\t\t\turl('" . $font_directory . "/si-shop-two.svg?-7oeevn#atelier') format('svg');\n\t\t\t\t\t\tfont-weight: normal;\n\t\t\t\t\t\tfont-style: normal;\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-cart, .sf-icon-add-to-cart, .sf-icon-variable-options, .sf-icon-soldout {\n\t\t\t\t\t\tfont-family: 'si-shop-two'!important;\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-cart:before {\n\t\t\t\t\t\tcontent: '\\e600';\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-add-to-cart:before {\n\t\t\t\t\t\tcontent: '\\e601';\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-variable-options:before {\n\t\t\t\t\t\tcontent: '\\e602';\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-soldout:before {\n\t\t\t\t\t\tcontent: '\\e603';\n\t\t\t\t\t}\n\t\t\t\t\t#mobile-menu ul li.shopping-bag-item > a span.num-items {\n\t\t\t\t\t\tright: 24px;\n\t\t\t\t\t\tmargin-top: -9px;\n\t\t\t\t\t}\n\t\t\t\t\t.wishlist-item > a > i {\n\t\t\t\t\t\tvertical-align: -6px!important;\n\t\t\t\t\t}\n\t\t\t\t\t";
                } else {
                    if ($shop_icon_style == "basket") {
                        echo "@font-face {\n\t\t\t\t\t\tfont-family: 'si-shop-three';\n\t\t\t\t\t\tsrc:url('" . $font_directory . "/si-shop-three.eot?-7oeevn');\n\t\t\t\t\t\tsrc:url('" . $font_directory . "/si-shop-three.eot?#iefix-7oeevn') format('embedded-opentype'),\n\t\t\t\t\t\t\turl('" . $font_directory . "/si-shop-three.woff?-7oeevn') format('woff'),\n\t\t\t\t\t\t\turl('" . $font_directory . "/si-shop-three.ttf?-7oeevn') format('truetype'),\n\t\t\t\t\t\t\turl('" . $font_directory . "/si-shop-three.svg?-7oeevn#atelier') format('svg');\n\t\t\t\t\t\tfont-weight: normal;\n\t\t\t\t\t\tfont-style: normal;\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-cart, .sf-icon-add-to-cart, .sf-icon-variable-options, .sf-icon-soldout {\n\t\t\t\t\t\tfont-family: 'si-shop-three'!important;\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-variable-options:before {\n\t\t\t\t\t\tcontent: '\\e600';\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-cart:before {\n\t\t\t\t\t\tcontent: '\\e601';\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-add-to-cart:before {\n\t\t\t\t\t\tcontent: '\\e602';\n\t\t\t\t\t}\n\t\t\t\t\t.sf-icon-soldout:before {\n\t\t\t\t\t\tcontent: '\\e603';\n\t\t\t\t\t}\n\t\t\t\t\t.shopping-bag-item > a > span.num-items {\n\t\t\t\t\t\tmargin-top: -20px;\n\t\t\t\t\t\tright: 1px;\n\t\t\t\t\t}\n\t\t\t\t\t#mobile-menu ul li.shopping-bag-item > a span.num-items {\n\t\t\t\t\t  right: 21px;\n\t\t\t\t\t}\n\t\t\t\t\t.mobile-header-opts > nav {\n\t\t\t\t\t\tvertical-align: 0;\n\t\t\t\t\t}\n\t\t\t\t\t";
                    }
                }
            }
        }
        if ($form_styling == "minimal") {
            echo 'input[type="text"], input[type="email"], input[type="password"], textarea, select, .wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea, .wpcf7 select, .ginput_container input[type="text"], .ginput_container input[type="email"], .ginput_container textarea, .ginput_container select, .mymail-form input[type="text"], .mymail-form input[type="email"], .mymail-form textarea, .mymail-form select, input[type="date"], input[type="tel"], input[type="number"], select {
            	padding: 10px 0;
            	border-left-width: 0!important;
            	border-right-width: 0!important;
            	border-top-width: 0!important;
            	height: 40px;
            	background-color: transparent!important;
            	}
            	textarea, .wpcf7 textarea {
            	height: auto;
            	}
            	select {
            	background-position: 100%;
            	}
            	#commentform label {
            	display: none;
            	}
开发者ID:brycefrees,项目名称:DivisionWest,代码行数:67,代码来源:sf-custom-styles.php


示例4: home_url

			<div class="container clearfix">
				<i class="ss-search"></i>
				<form method="get" class="search-form" action="<?php 
echo home_url();
?>
/"><input type="text" placeholder="<?php 
_e("Search for something...", "swiftframework");
?>
" name="s" autocomplete="off" /></form>
				<a id="header-search-close" href="#"><i class="ss-delete"></i></a>
			</div>
		</div>
		
		<?php 
// SUPER SEARCH
if (sf_woocommerce_activated() && $ss_enable) {
    echo sf_super_search();
}
?>
		
		<?php 
// MOBILE MENU
echo sf_mobile_menu();
?>
		
		<!--// OPEN #container //-->
		<?php 
if ($page_layout == "fullwidth") {
    ?>
		<div id="container">
		<?php 
开发者ID:roycocup,项目名称:enclothed,代码行数:31,代码来源:header.php


示例5: sf_page_heading


//.........这里部分代码省略.........
                        <div class="page-heading fancy-heading <?php 
                    echo esc_attr($page_heading_el_class);
                    ?>
 clearfix" data-height="<?php 
                    echo esc_attr($page_title_height);
                    ?>
" <?php 
                    echo $article_heading_bg;
                    ?>
>
                    <?php 
                }
                ?>

                    <?php 
                if ($page_title_style == "fancy" && $page_design_style == "hero-content-split") {
                    sf_post_split_heading_buttons();
                }
                ?>

                    <?php 
                if ($page_title_style == "fancy-tabbed") {
                    ?>
                    <div class="tabbed-heading-wrap">
                    <?php 
                }
                ?>

                    <div class="heading-text container" data-textalign="<?php 
                echo esc_attr($page_title_text_align);
                ?>
">
                        <?php 
                if (sf_woocommerce_activated() && is_woocommerce()) {
                    ?>

                            <?php 
                    if (is_product()) {
                        ?>

                                <h1 class="entry-title" <?php 
                        echo $article_heading_text;
                        ?>
><?php 
                        echo $page_title;
                        ?>
</h1>

                            <?php 
                    } else {
                        ?>

                                <h1 class="entry-title" <?php 
                        echo $article_heading_text;
                        ?>
><?php 
                        woocommerce_page_title();
                        ?>
</h1>

                            <?php 
                    }
                    ?>

                        <?php 
                } else {
开发者ID:Infernosaint,项目名称:WPSetupTest2,代码行数:67,代码来源:sf-page-heading.php


示例6: sf_custom_get_attribute_taxonomies

function sf_custom_get_attribute_taxonomies()
{
    $transient_name = 'wc_attribute_taxonomies';
    $attribute_taxonomies = "";
    if (sf_woocommerce_activated()) {
        if (false === ($attribute_taxonomies = get_transient($transient_name))) {
            global $wpdb;
            $attribute_taxonomies = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies");
            set_transient($transient_name, $attribute_taxonomies);
        }
    }
    return apply_filters('woocommerce_attribute_taxonomies', $attribute_taxonomies);
}
开发者ID:arobbins,项目名称:spellestate,代码行数:13,代码来源:sf-supersearch.php


示例7: sf_enqueue_styles

 function sf_enqueue_styles()
 {
     global $sf_options, $is_IE;
     $enable_min_styles = $sf_options['enable_min_styles'];
     $enable_responsive = $sf_options['enable_responsive'];
     $enable_rtl = $sf_options['enable_rtl'];
     //$upload_dir = wp_upload_dir();
     //FONTELLO ICONS
     //            if ( get_option('sf_fontello_icon_codes') && get_option('sf_fontello_icon_codes') != '' ){
     //				wp_register_style('sf-fontello',  $upload_dir['baseurl'] . '/redux/custom-icon-fonts/fontello_css/fontello-embedded.css', array(), NULL, 'all');
     //				wp_enqueue_style('sf-fontello');
     //		    }
     wp_register_style('sf-style', get_stylesheet_directory_uri() . '/style.css', array(), NULL, 'all');
     wp_register_style('bootstrap', SF_LOCAL_PATH . '/css/bootstrap.min.css', array(), NULL, 'all');
     wp_register_style('fontawesome', SF_LOCAL_PATH . '/css/font-awesome.min.css', array(), NULL, 'all');
     wp_register_style('sf-main', SF_LOCAL_PATH . '/css/main.css', array(), NULL, 'all');
     wp_register_style('sf-rtl', SF_LOCAL_PATH . '/rtl.css', array(), NULL, 'all');
     wp_register_style('sf-rtl-min', SF_LOCAL_PATH . '/rtl.min.css', array(), NULL, 'all');
     wp_register_style('sf-woocommerce', SF_LOCAL_PATH . '/css/sf-woocommerce.css', array(), NULL, 'all');
     wp_register_style('sf-responsive', SF_LOCAL_PATH . '/css/responsive.css', array(), NULL, 'all');
     wp_register_style('sf-responsive-min', SF_LOCAL_PATH . '/css/responsive.css', array(), NULL, 'all');
     wp_register_style('sf-combined-min', SF_LOCAL_PATH . '/css/sf-combined.min.css', array(), NULL, 'all');
     if ($enable_min_styles && !$is_IE) {
         wp_enqueue_style('sf-combined-min');
         if (is_rtl() || $enable_rtl || isset($_GET['RTL'])) {
             wp_enqueue_style('sf-rtl-min');
         }
         if ($enable_responsive) {
             wp_enqueue_style('sf-responsive-min');
         }
         wp_enqueue_style('sf-style');
     } else {
         wp_enqueue_style('bootstrap');
         wp_enqueue_style('fontawesome');
         wp_enqueue_style('sf-main');
         if (sf_woocommerce_activated()) {
             wp_enqueue_style('sf-woocommerce');
         }
         if (is_rtl() || $enable_rtl || isset($_GET['RTL'])) {
             wp_enqueue_style('sf-rtl');
         }
         if ($enable_responsive) {
             wp_enqueue_style('sf-responsive');
         }
         wp_enqueue_style('sf-style');
     }
 }
开发者ID:arobbins,项目名称:spellestate,代码行数:47,代码来源:functions.php


示例8: sf_get_cart

    function sf_get_cart()
    {
        $cart_output = "";
        // Check if WooCommerce is active
        if (sf_woocommerce_activated()) {
            global $woocommerce, $sf_options;
            $show_cart_count = false;
            if (isset($sf_options['show_cart_count'])) {
                $show_cart_count = $sf_options['show_cart_count'];
            }
            $cart_total = "";
            if (sf_theme_opts_name() == "sf_atelier_options") {
                $cart_total = '<span class="menu-item-title">' . __("Cart", "swiftframework") . '</span>';
            }
            if ($woocommerce->tax_display_cart == 'excl') {
                $cart_total .= wc_price($woocommerce->cart->get_total());
            } else {
                $cart_total .= wc_price($woocommerce->cart->cart_contents_total + $woocommerce->cart->tax_total);
            }
            $cart_count = $woocommerce->cart->cart_contents_count;
            $cart_count_text = sf_product_items_text($cart_count);
            $cart_count_text_alt = sf_product_items_text($cart_count, true);
            $view_cart_icon = apply_filters('sf_view_cart_icon', '<i class="ss-view"></i>');
            $checkout_icon = apply_filters('sf_checkout_icon', '<i class="ss-creditcard"></i>');
            $go_to_shop_icon = apply_filters('sf_go_to_shop_icon', '<i class="ss-cart"></i>');
            if ($show_cart_count) {
                $cart_output .= '<li class="parent shopping-bag-item"><a class="cart-contents" href="' . $woocommerce->cart->get_cart_url() . '" title="' . __("View your shopping cart", "swiftframework") . '">' . apply_filters('sf_header_cart_icon', '<i class="ss-cart"></i>') . $cart_total . '<span class="num-items cart-count-enabled">' . $cart_count_text_alt . '</span></a>';
            } else {
                $cart_output .= '<li class="parent shopping-bag-item"><a class="cart-contents" href="' . $woocommerce->cart->get_cart_url() . '" title="' . __("View your shopping cart", "swiftframework") . '">' . apply_filters('sf_header_cart_icon', '<i class="ss-cart"></i>') . $cart_total . '<span class="num-items">' . $cart_count_text_alt . '</span></a>';
            }
            $cart_output .= '<ul class="sub-menu">';
            $cart_output .= '<li>';
            $cart_output .= '<div class="shopping-bag">';
            $cart_output .= '<div class="loading-overlay"><i class="sf-icon-loader"></i></div>';
            if ($cart_count != "0") {
                $cart_output .= '<div class="bag-header">' . $cart_count_text . ' ' . __('in the cart', 'swiftframework') . '</div>';
                $cart_output .= '<div class="bag-contents">';
                foreach ($woocommerce->cart->cart_contents as $cart_item_key => $cart_item) {
                    $_product = apply_filters('woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key);
                    $price = apply_filters('woocommerce_cart_item_price', $woocommerce->cart->get_product_price($_product), $cart_item, $cart_item_key);
                    $product_title = $_product->get_title();
                    $product_short_title = strlen($product_title) > 25 ? substr($product_title, 0, 22) . '...' : $product_title;
                    if ($_product->exists() && $cart_item['quantity'] > 0) {
                        $cart_output .= '<div class="bag-product clearfix">';
                        $cart_output .= '<figure><a class="bag-product-img" href="' . get_permalink($cart_item['product_id']) . '">' . $_product->get_image() . '</a></figure>';
                        $cart_output .= '<div class="bag-product-details">';
                        $cart_output .= '<div class="bag-product-title"><a href="' . get_permalink($cart_item['product_id']) . '">' . apply_filters('woocommerce_cart_widget_product_title', $product_short_title, $_product) . '</a></div>';
                        $cart_output .= '<div class="bag-product-price">' . __("Unit Price:", "swiftframework") . '
	                        ' . $price . '</div>';
                        $cart_output .= '<div class="bag-product-quantity">' . __('Quantity:', 'swiftframework') . ' ' . $cart_item['quantity'] . '</div>';
                        $cart_output .= '</div>';
                        $cart_output .= '<a href="#" class="remove remove-product" title="' . __('Remove this item', 'swiftframework') . '">&times;</a>';
                        $cart_output .= '</div>';
                    }
                }
                $cart_output .= '</div>';
                if (sf_theme_opts_name() == "sf_atelier_options") {
                    $cart_output .= '<div class="bag-total">';
                    $cart_output .= '<span class="total-title">' . __("Total", "swiftframework") . '</span>';
                    $cart_output .= '<span class="total-amount">' . $cart_total . '</span>';
                    $cart_output .= '</div>';
                }
                $cart_output .= '<div class="bag-buttons">';
                $cart_output .= '<a class="sf-button standard sf-icon-reveal bag-button" href="' . esc_url($woocommerce->cart->get_cart_url()) . '">' . $view_cart_icon . '<span class="text">' . __('View cart', 'swiftframework') . '</span></a>';
                $cart_output .= '<a class="sf-button standard sf-icon-reveal checkout-button" href="' . esc_url($woocommerce->cart->get_checkout_url()) . '">' . $checkout_icon . '<span class="text">' . __('Proceed to checkout', 'swiftframework') . '</span></a>';
                $cart_output .= '</div>';
            } else {
                $cart_output .= '<div class="bag-empty">' . __('Your cart is empty.', 'swiftframework') . '</div>';
            }
            $cart_output .= '</div>';
            $cart_output .= '</li>';
            $cart_output .= '</ul>';
            $cart_output .= '</li>';
        }
        return $cart_output;
    }
开发者ID:shimion,项目名称:wishlistshimion,代码行数:76,代码来源:sf-header.php


示例9: sf_get_woo_product_filters_array

function sf_get_woo_product_filters_array()
{
    global $woocommerce;
    $attribute_array = array();
    $transient_name = 'wc_attribute_taxonomies';
    if (sf_woocommerce_activated()) {
        if (false === ($attribute_taxonomies = get_transient($transient_name))) {
            global $wpdb;
            $attribute_taxonomies = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies");
            set_transient($transient_name, $attribute_taxonomies);
        }
        $attribute_taxonomies = apply_filters('woocommerce_attribute_taxonomies', $attribute_taxonomies);
        $attribute_array['product_cat'] = __('Product Category', 'swiftframework');
        $attribute_array['price'] = __('Price', 'swiftframework');
        if ($attribute_taxonomies) {
            foreach ($attribute_taxonomies as $tax) {
                $attribute_array[$tax->attribute_name] = $tax->attribute_name;
            }
        }
    }
    return $attribute_array;
}
开发者ID:nhatnam1102,项目名称:wp-content,代码行数:22,代码来源:sf-theme-functions.php


示例10: sf_page_classes


//.........这里部分代码省略.........
         $page_class .= "page-transitions page-transition-" . $page_transition . " ";
         if ($page_transition == "loading-bar") {
             $page_class .= "loading-bar-transition ";
         }
     }
     // Page Style
     if ($page_design_style != "") {
         $page_class .= $page_design_style . ' ';
     }
     // Header Shadow
     if ($enable_header_shadow) {
         $page_class .= "header-shadow ";
     }
     // Product Shadow
     if ($product_image_shadows) {
         $page_class .= "product-shadows ";
     }
     // Page Header Type
     if ($page_header_type != "") {
         $page_class .= 'header-' . $page_header_type . ' ';
     }
     // Page Header Logo
     if ($page_header_alt_logo) {
         $page_class .= 'logo-alt-version ';
     }
     if (is_singular('post') && $post) {
         $post_header_type = sf_get_post_meta($post->ID, 'sf_page_header_type', true);
         $fw_media_display = sf_get_post_meta($post->ID, 'sf_fw_media_display', true);
         $page_title_style = sf_get_post_meta($post->ID, 'sf_page_title_style', true);
         if ($page_title_style == "fancy" || $fw_media_display == "fw-media-title" || $fw_media_display == "fw-media") {
             $page_class .= 'header-' . $post_header_type . ' ';
         }
     }
     if (function_exists('is_product') && is_product()) {
         $product_layout = sf_get_post_meta($post->ID, 'sf_product_layout', true);
         $page_class .= 'product-' . $product_layout . ' ';
     }
     // Layout
     if (isset($_GET['layout'])) {
         $page_layout = $_GET['layout'];
     }
     $page_class .= "layout-" . $page_layout . " ";
     // Article Swipe
     if ($enable_articleswipe) {
         $page_class .= 'article-swipe ';
     }
     if ($home_preloader && (is_home() || is_front_page()) && !is_paged()) {
         $page_class .= 'sf-preloader ';
     }
     if ($enable_newsletter_sub_bar && (is_home() || is_front_page()) && !is_paged() || $enable_newsletter_sub_bar_page) {
         $page_class .= 'has-newsletter-bar ';
     }
     // Page Heading
     if ($post && is_singular()) {
         $show_page_title = sf_get_post_meta($post->ID, 'sf_page_title', true);
         $remove_breadcrumbs = sf_get_post_meta($post->ID, 'sf_no_breadcrumbs', true);
         $page_title_style = sf_get_post_meta($post->ID, 'sf_page_title_style', true);
         if (function_exists('is_product') && is_product() && sf_theme_supports('product-inner-heading') && $page_title_style == "fancy-tabbed") {
             $page_title_style = "fancy";
         }
         if ($show_page_title) {
             $page_class .= 'page-heading-' . $page_title_style . ' ';
         }
     }
     $shop_page = false;
     if (function_exists('is_shop') && is_shop() || function_exists('is_product_category') && is_product_category()) {
         $shop_page = true;
     }
     if ($shop_page) {
         $show_page_title = $sf_options['woo_show_page_heading'];
         $page_title_style = $sf_options['woo_page_heading_style'];
         if ($show_page_title) {
             $page_class .= 'page-heading-' . $page_title_style . ' ';
         }
     }
     if (sf_woocommerce_activated()) {
         if (isset($sf_options['shop_icon_style'])) {
             $shop_icon_style = $sf_options['shop_icon_style'];
         }
         $page_class .= 'shop-icon-' . $shop_icon_style . ' ';
         if (isset($sf_options['minimal_checkout'])) {
             if ($sf_options['minimal_checkout']) {
                 $page_class .= 'minimal-checkout ';
             }
         }
     }
     if ($sf_options['disable_mobile_animations']) {
         $page_class .= "disable-mobile-animations ";
     }
     $global_filters = false;
     if (isset($sf_options['enable_woo_global_filters'])) {
         $global_filters = $sf_options['enable_woo_global_filters'];
         if ($global_filters) {
             $page_class .= 'woo-global-filters-enabled ';
         }
     }
     // Return array of classes
     $class_array = array("page-layout" => $page_layout, "page" => $page_class, "header-layout" => $header_layout, "header-wrap" => $header_wrap_class, "logo" => $logo_class, "search-type" => $header_search_type);
     return $class_array;
 }
开发者ID:brycefrees,项目名称:DivisionWest,代码行数:101,代码来源:sf-head.php


示例11: _e

<fieldset>

<h4><?php 
_e('Select a shortcode', 'swiftframework');
?>
</h4>

<div class="option">
    <label for="shortcode-select"><?php 
_e('Shortcode', 'swiftframework');
?>
</label>
    <select id="shortcode-select" name="shortcode-select">
        <option value="0"></option>
        <?php 
if (sf_woocommerce_activated() && sf_theme_opts_name() == "sf_atelier_options") {
    ?>
        <option value="shortcode-addtocart-button"><?php 
    _e('Add to Cart Button', 'swiftframework');
    ?>
</option>
        <?php 
}
?>
        <option value="shortcode-buttons"><?php 
_e('Button', 'swiftframework');
?>
</option>
        <option value="shortcode-chart"><?php 
_e('Chart', 'swiftframework');
?>
开发者ID:Infernosaint,项目名称:WPSetupTest2,代码行数:31,代码来源:interface.php


示例12: sf_get_cart

    function sf_get_cart()
    {
        $cart_output = "";
        // Check if WooCommerce is active
        if (sf_woocommerce_activated()) {
            global $woocommerce, $sf_options;
            $show_cart_count = false;
            if (isset($sf_options['show_cart_count'])) {
                $show_cart_count = $sf_options['show_cart_count'];
            }
            if (sf_theme_opts_name() == "sf_atelier_options") {
                $cart_total = '<span class="menu-item-title">' . __("Cart", "swiftframework") . '</span>';
            } else {
                $cart_total = WC()->cart->get_cart_total();
            }
            $cart_count = $woocommerce->cart->cart_contents_count;
            $cart_count_text = sf_product_items_text($cart_count);
            $cart_count_text_alt = sf_product_items_text($cart_count, true);
            $view_cart_icon = apply_filters('sf_view_cart_icon', '<i class="ss-view"></i>');
            $checkout_icon = apply_filters('sf_checkout_icon', '<i class="ss-creditcard"></i>');
            $go_to_shop_icon = apply_filters('sf_go_to_shop_icon', '<i class="ss-cart"></i>');
            if ($show_cart_count) {
                $cart_output .= '<li class="parent shopping-bag-item"><a class="cart-contents" href="' . $woocommerce->cart->get_cart_url() . '" title="' . __("View your shopping cart", "swiftframework") . '">' . apply_filters('sf_header_cart_icon', '<i class="ss-cart"></i>') . '<span class="cart-text">' . __("Cart", "swiftframework") . '</span>' . $cart_total . '<span class="num-items cart-count-enabled">' . $cart_count_text_alt . '</span></a>';
            } else {
                $cart_output .= '<li class="parent shopping-bag-item"><a class="cart-contents" href="' . $woocommerce->cart->get_cart_url() . '" title="' . __("View your shopping cart", "swiftframework") . '">' . apply_filters('sf_header_cart_icon', '<i class="ss-cart"></i>') . '<span class="cart-text">' . __("Cart", "swiftframework") . '</span>' . $cart_total . '<span class="num-items">' . $cart_count_text_alt . '</span></a>';
            }
            $cart_output .= '<ul class="sub-menu">';
            $cart_output .= '<li>';
            $cart_output .= '<div class="shopping-bag" data-empty-bag-txt="' . __('Your cart is empty.', 'swiftframework') . '" data-singular-item-txt="' . __('item in the cart', 'swiftframework') . '" data-multiple-item-txt="' . __('items in the cart', 'swiftframework') . '">';
            $cart_output .= '<div class="loading-overlay"><i class="sf-icon-loader"></i></div>';
            if ($cart_count != "0") {
                $cart_output .= '<div class="bag-header">' . $cart_count_text . ' ' . __('in the cart', 'swiftframework') . '</div>';
                $cart_output .= '<div class="bag-contents">';
                foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item) {
                    $_product = apply_filters('woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key);
                    $product_id = apply_filters('woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key);
                    if ($_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters('woocommerce_cart_item_visible', true, $cart_item, $cart_item_key)) {
                        $product_price = apply_filters('woocommerce_cart_item_price', WC()->cart->get_product_price($_product), $cart_item, $cart_item_key);
                        $product_title = $_product->get_title();
                        $product_short_title = strlen($product_title) > 25 ? substr($product_title, 0, 22) . '...' : $product_title;
                        $cart_output .= '<div class="bag-product clearfix product-id-' . $cart_item['product_id'] . '">';
                        $cart_output .= '<figure><a class="bag-product-img" href="' . get_permalink($cart_item['product_id']) . '">' . $_product->get_image() . '</a></figure>';
                        $cart_output .= '<div class="bag-product-details">';
                        $cart_output .= '<div class="bag-product-title"><a href="' . get_permalink($cart_item['product_id']) . '">' . apply_filters('woocommerce_cart_widget_product_title', $product_short_title, $_product) . '</a></div>';
                        $cart_output .= '<div class="bag-product-price">' . __("Unit Price:", 'swiftframework') . '
	                        ' . $product_price . '</div>';
                        $cart_output .= '<div class="bag-product-quantity">' . __('Quantity:', 'swiftframework') . ' ' . apply_filters('woocommerce_widget_cart_item_quantity', '<span class="quantity">' . sprintf('%s &times; %s', $cart_item['quantity'], $product_price) . '</span>', $cart_item, $cart_item_key) . '</div>';
                        $cart_output .= '</div>';
                        $cart_output .= apply_filters('woocommerce_cart_item_remove_link', sprintf('<a href="%s" class="remove remove-product" title="%s" data-ajaxurl="' . admin_url('admin-ajax.php') . '" data-product-qty="' . $cart_item['quantity'] . '"  data-product-id="%s" data-product_sku="%s">&times;</a>', esc_url(WC()->cart->get_remove_url($cart_item_key)), __('Remove this item', 'swiftframework'), esc_attr($product_id), esc_attr($_product->get_sku())), $cart_item_key);
                        $cart_output .= '</div>';
                    }
                }
                $cart_output .= '</div>';
                if (sf_theme_opts_name() == "sf_atelier_options" || sf_theme_opts_name() == "sf_uplift_options") {
                    $cart_output .= '<div class="bag-total">';
                    if (class_exists('Woocommerce_German_Market')) {
                        $cart_output .= '<span class="total-title">' . __("Total incl. tax", "swiftframework") . '</span>';
                    } else {
                        $cart_output .= '<span class="total-title">' . __("Total", "swiftframework") . '</span>';
                    }
                    $cart_output .= '<span class="total-amount">' . WC()->cart->get_cart_total() . '</span>';
                    $cart_output .= '</div>';
                }
                $cart_output .= '<div class="bag-buttons">';
                $cart_output .= '<a class="sf-button standard sf-icon-reveal bag-button" href="' . esc_url($woocommerce->cart->get_cart_url()) . '">' . $view_cart_icon . '<span class="text">' . __('View cart', 'swiftframework') . '</span></a>';
                $cart_output .= '<a class="sf-button standard sf-icon-reveal checkout-button" href="' . esc_url($woocommerce->cart->get_checkout_url()) . '">' . $checkout_icon . '<span class="text">' . __('Checkout', 'swiftframework') . '</span></a>';
                $cart_output .= '</div>';
            } else {
                $cart_output .= '<div class="bag-empty">' . __('Your cart is empty.', 'swiftframework') . '</div>';
            }
            $cart_output .= '</div>';
            $cart_output .= '</li>';
            $cart_output .= '</ul>';
            $cart_output .= '</li>';
        }
        return $cart_output;
    }
开发者ID:arobbins,项目名称:spellestate,代码行数:77,代码来源:sf-header.php


示例13: sf_get_cart

    function sf_get_cart()
    {
        $cart_output = "";
        // Check if WooCommerce is active
        if (sf_woocommerce_activated()) {
            global $woocommerce;
            $cart_total = $woocommerce->cart->get_cart_total();
            $cart_count = $woocommerce->cart->cart_contents_count;
            $cart_count_text = sf_product_items_text($cart_count);
            $cart_output .= '<li class="parent shopping-bag-item"><a class="cart-contents" href="' . $woocommerce->cart->get_cart_url() . '" title="' . __("View your shopping cart", "swiftframework") . '"><i class="ss-cart"></i>' . $cart_total . '</a>';
            $cart_output .= '<ul class="sub-menu">';
            $cart_output .= '<li>';
            $cart_output .= '<div class="shopping-bag">';
            if ($cart_count != "0") {
                $cart_output .= '<div class="bag-header">' . $cart_count_text . ' ' . __('in the shopping bag', 'swiftframework') . '</div>';
                $cart_output .= '<div class="bag-contents">';
                foreach ($woocommerce->cart->cart_contents as $cart_item_key => $cart_item) {
                    $bag_product = $cart_item['data'];
                    $product_title = $bag_product->get_title();
                    $product_short_title = strlen($product_title) > 25 ? substr($product_title, 0, 22) . '...' : $product_title;
                    if ($bag_product->exists() && $cart_item['quantity'] > 0) {
                        $cart_output .= '<div class="bag-product clearfix">';
                        $cart_output .= '<figure><a class="bag-product-img" href="' . get_permalink($cart_item['product_id']) . '">' . $bag_product->get_image() . '</a></figure>';
                        $cart_output .= '<div class="bag-product-details">';
                        $cart_output .= '<div class="bag-product-title"><a href="' . get_permalink($cart_item['product_id']) . '">' . apply_filters('woocommerce_cart_widget_product_title', $product_short_title, $bag_product) . '</a></div>';
                        $cart_output .= '<div class="bag-product-price">' . __("Unit Price:", "swiftframework") . ' 
	                        ' . woocommerce_price($bag_product->get_price()) . '</div>';
                        $cart_output .= '<div class="bag-product-quantity">' . __('Quantity:', 'swiftframework') . ' ' . $cart_item['quantity'] . '</div>';
                        $cart_output .= '</div>';
                        $cart_output .= apply_filters('woocommerce_cart_item_remove_link', sprintf('<a href="%s" class="remove" title="%s">&times;</a>', esc_url($woocommerce->cart->get_remove_url($cart_item_key)), __('Remove this item', 'woocommerce')), $cart_item_key);
                        $cart_output .= '</div>';
                    }
                }
                $cart_output .= '</div>';
                $cart_output .= '<div class="bag-buttons">';
                if (version_compare(WOOCOMMERCE_VERSION, "2.1.0") >= 0) {
                    $cart_url = apply_filters('woocommerce_get_checkout_url', WC()->cart->get_cart_url());
                    $checkout_url = apply_filters('woocommerce_get_checkout_url', WC()->cart->get_checkout_url());
                    $cart_output .= '<a class="sf-button standard sf-icon-reveal bag-button" href="' . esc_url($cart_url) . '"><i class="ss-view"></i><span class="text">' . __('View shopping bag', 'swiftframework') . '</span></a>';
                    $cart_output .= '<a class="sf-button standard sf-icon-reveal checkout-button" href="' . esc_url($checkout_url) . '"><i class="ss-creditcard"></i><span class="text">' . __('Proceed to checkout', 'swiftframework') . '</span></a>';
                } else {
                    $cart_output .= '<a class="sf-button standard sf-icon-reveal bag-button" href="' . esc_url($woocommerce->cart->get_cart_url()) . '"><i class="ss-view"></i><span class="text">' . __('View shopping bag', 'swiftframework') . '</span></a>';
                    $cart_output .= '<a class="sf-button standard sf-icon-reveal checkout-button" href="' . esc_url($woocommerce->cart->get_checkout_url()) . '"><i class="ss-creditcard"></i><span class="text">' . __('Proceed to checkout', 'swiftframework') . '</span></a>';
                }
                $cart_output .= '</div>';
            } else {
                $cart_output .= '<div class="bag-header">' . __("0 items in the shopping bag", "swiftframework") . '</div>';
                $cart_output .= '<div class="bag-empty">' . __('Unfortunately, your shopping bag is empty.', 'swiftframework') . '</div>';
                $shop_page_url = "";
                if (version_compare(WOOCOMMERCE_VERSION, "2.1.0") >= 0) {
                    $shop_page_url = get_permalink(wc_get_page_id('shop'));
                } else {
                    $shop_page_url = get_permalink(woocommerce_get_page_id('shop'));
                }
                $cart_output .= '<div class="bag-buttons">';
                $cart_output .= '<a class="sf-button standard sf-icon-reveal shop-button" href="' . esc_url($shop_page_url) . '"><i class="ss-cart"></i><span class="text">' . __('Go to the shop', 'swiftframework') . '</span></a>';
                $cart_output .= '</div>';
            }
            $cart_output .= '</div>';
            $cart_output .= '</li>';
            $cart_output .= '</ul>';
            $cart_output .= '</li>';
        }
        return $cart_output;
    }
开发者ID:roycocup,项目名称:enclothed,代码行数:65,代码来源:sf-header.php


示例14: content

 pr 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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