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

PHP sf_theme_opts_name函数代码示例

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

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



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

示例1: lip_love_it_link

function lip_love_it_link($post_id = null, $echo = true, $text = "", $wrap_class = "")
{
    global $user_ID, $post;
    if (is_null($post_id)) {
        $post_id = $post->ID;
    }
    global $sf_options;
    $loveit_icon = "";
    if (isset($sf_options['loveit_icon'])) {
        $loveit_icon = $sf_options['loveit_icon'];
    }
    $loveit_text = $sf_options['loveit_text'];
    $icon = "";
    if (isset($loveit_icon) && $loveit_icon != "") {
        $icon = '<i class="' . $loveit_icon . '"></i>';
    } else {
        $icon = '<svg version="1.1" class="loveit-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
			 width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve">
		<g>
			<path fill="none" class="stroke" stroke="#252525" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
				M5.631,24H2.021C1.459,24,1,23.541,1,22.975V2.025C1,1.459,1.459,1,2.021,1h25.957C28.543,1,29,1.459,29,2.025v20.949
				C29,23.541,28.543,24,27.979,24h-3.316"/>
			<path fill="#252525" class="fill" d="M19.994,22.895c-0.053-0.888-0.436-1.71-1.043-2.214C18.438,20.253,17.756,20,17.074,20
				c-1.035,0-1.684,0.45-2.068,1.009C14.611,20.45,13.961,20,12.926,20c-0.682,0-1.363,0.253-1.875,0.681
				c-0.609,0.504-0.992,1.326-1.045,2.214c-0.043,0.757,0.139,1.908,1.248,3.082c1.875,2.007,3.367,3.618,3.389,3.629L15.006,30
				l0.361-0.395c0.012-0.011,1.504-1.622,3.381-3.629C19.857,24.803,20.037,23.651,19.994,22.895z"/>
		</g>
		</svg>';
    }
    // retrieve the total love count for this item
    $love_count = lip_get_love_count($post_id);
    if ($text != "") {
        $text = ' ' . $loveit_text;
    }
    if (sf_theme_opts_name() == "sf_atelier_options") {
        $text = "";
    }
    ob_start();
    // our wrapper DIV
    echo '<div class="love-it-wrapper ' . $wrap_class . '">';
    if (!lip_user_has_loved_post($user_ID, $post_id)) {
        echo '<a href="#" class="love-it" data-post-id="' . $post_id . '" data-user-id="' . $user_ID . '">' . $icon . '<span class="love-count"><data class="count" value="">' . $love_count . '</data>' . $text . '</span></a>';
    } else {
        echo '<a href="#" class="love-it loved" data-post-id="' . $post_id . '" data-user-id="' . $user_ID . '">' . $icon . '<span class="love-count"><data class="count" value="">' . $love_count . '</data>' . $text . '</span></a>';
    }
    // close our wrapper DIV
    echo '</div>';
    if ($echo) {
        echo apply_filters('lip_links', ob_get_clean());
    } else {
        return apply_filters('lip_links', ob_get_clean());
    }
}
开发者ID:Infernosaint,项目名称:WPSetupTest2,代码行数:53,代码来源:display-functions.php


示例2: sf_woo_header_add_to_cart_fragment

    function sf_woo_header_add_to_cart_fragment($fragments)
    {
        global $woocommerce, $sf_options;
        ob_start();
        $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>');
        $extra_class = "";
        if ($cart_count != "0") {
            $extra_class .= "cart-not-empty ";
        }
        ?>

            <li class="parent shopping-bag-item <?php 
        echo $extra_class;
        ?>
">

                <?php 
        if ($show_cart_count) {
            ?>

                    <a class="cart-contents" href="<?php 
            echo esc_url($woocommerce->cart->get_cart_url());
            ?>
"
                       title="<?php 
            _e('View your shopping cart', 'swiftframework');
            ?>
">
                       <?php 
            echo apply_filters('sf_header_cart_icon', '<i class="ss-cart"></i>');
            echo $cart_total;
            ?>
<span class="num-items cart-count-enabled"><?php 
            echo $cart_count_text_alt;
            ?>
</span></a>

                <?php 
        } else {
            ?>

                    <a class="cart-contents" href="<?php 
            echo esc_url($woocommerce->cart->get_cart_url());
            ?>
"
                       title="<?php 
            _e('View your shopping cart', 'swiftframework');
            ?>
"><?php 
            echo apply_filters('sf_header_cart_icon', '<i class="ss-cart"></i>');
            echo $cart_total;
            ?>
<span class="num-items"><?php 
            echo $cart_count_text_alt;
            ?>
</span></a>

                <?php 
        }
        ?>

                <ul class="sub-menu">
                    <li>

                        <div class="shopping-bag" data-empty-bag-txt="<?php 
        _e('Your cart is empty.', 'swiftframework');
        ?>
" data-singular-item-txt="<?php 
        _e('item in the cart', 'swiftframework');
        ?>
" data-multiple-item-txt="<?php 
        _e('items in the cart', 'swiftframework');
        ?>
">

                          <div class="loading-overlay"><i class="sf-icon-loader"></i></div>

                            <?php 
        if ($cart_count != "0") {
            ?>

                                <div
                                    class="bag-header"><?php 
            echo $cart_count_text;
            ?>
 <?php 
//.........这里部分代码省略.........
开发者ID:Infernosaint,项目名称:WPSetupTest2,代码行数:101,代码来源:sf-woocommerce.php


示例3: sf_product_items

    function sf_product_items($atts)
    {
        extract(shortcode_atts(array('title' => '', 'asset_type' => '', 'category' => '', 'products' => '', 'display_layout' => '', 'display_type' => '', 'carousel' => '', 'multi_masonry' => '', 'fullwidth' => '', 'gutters' => '', 'columns' => '', 'item_count' => '', 'order_by' => '', 'order' => '', 'button_enabled' => '', 'width' => ''), $atts));
        global $woocommerce, $woocommerce_loop, $sf_sidebar_config, $sf_carouselID, $sf_options, $sf_product_multimasonry, $sf_product_display_layout;
        if ($sf_carouselID == "") {
            $sf_carouselID = 1;
        } else {
            $sf_carouselID++;
        }
        if (is_singular('portfolio')) {
            $sf_sidebar_config = "no-sidebars";
        }
        $list_class = "";
        $product_display_type = $sf_options['product_display_type'];
        if ($display_type != "") {
            $product_display_type = $display_type;
        }
        if ($fullwidth == "yes") {
            $list_class .= 'products-full-width ';
        }
        if ($gutters == "no" || $product_display_type == "gallery-bordered") {
            $list_class .= 'no-gutters ';
        }
        if ($multi_masonry == "yes" && $product_display_type != "preview-slider" && $asset_type != "categories") {
            $carousel = "no";
            $list_class .= 'multi-masonry-items ';
            $sf_product_multimasonry = true;
        } else {
            $sf_product_multimasonry = false;
        }
        if ($display_layout != '') {
            $sf_product_display_layout = $display_layout;
        }
        if ($carousel == "no" && $multi_masonry == "no") {
            $list_class .= 'product-grid ';
        }
        $list_class .= 'product-type-' . $product_display_type . ' ';
        $woocommerce_loop['style-override'] = $product_display_type;
        $args = array();
        $sf_prev_icon = apply_filters('sf_carousel_prev_icon', '<i class="ss-navigateleft"></i>');
        $sf_next_icon = apply_filters('sf_carousel_next_icon', '<i class="ss-navigateright"></i>');
        // CATEGORY ASSET OUTPUT
        if ($asset_type == "categories") {
            ob_start();
            $hide_empty = 1;
            $category_id = '';
            $ids = array();
            if ($category != "") {
                $category = str_replace("0,", "", $category);
                $categories = explode(',', $category);
                foreach ($categories as $term) {
                    $category_term = get_term_by('slug', $term, 'product_cat');
                    $category_id = $category_term->term_id;
                    array_push($ids, $category_id);
                }
            }
            $args = array('hide_empty' => $hide_empty, 'pad_counts' => true, 'include' => $ids);
            $product_categories = get_terms('product_cat', $args);
            if ($hide_empty) {
                foreach ($product_categories as $key => $category) {
                    if ($category->count == 0) {
                        unset($product_categories[$key]);
                    }
                }
            }
            if ($item_count) {
                $product_categories = array_slice($product_categories, 0, $item_count);
            }
            ob_start();
            if ($product_categories) {
                if ($carousel == "yes") {
                    ?>

	                    <div class="product-carousel carousel-wrap <?php 
                    echo $list_class;
                    ?>
">

	                        <ul class="products list-<?php 
                    echo $asset_type;
                    ?>
 carousel-items gutters" id="carousel-<?php 
                    echo $sf_carouselID;
                    ?>
" data-columns="<?php 
                    echo $columns;
                    ?>
">

	                            <?php 
                    foreach ($product_categories as $category) {
                        wc_get_template('content-product_cat.php', array('category' => $category));
                    }
                    ?>

	                        </ul>

	                        <?php 
                    if (sf_theme_opts_name() != "sf_atelier_options") {
                        ?>
//.........这里部分代码省略.........
开发者ID:arobbins,项目名称:spellestate,代码行数:101,代码来源:sf-products.php


示例4: sf_page_heading


//.........这里部分代码省略.........
        }
        // Fancy heading image
        if (($page_title_style == "fancy" || $page_title_style == "fancy-tabbed") && $fancy_title_image_url == "") {
            foreach ($fancy_title_image as $detail_image) {
                if (isset($detail_image['url'])) {
                    $fancy_title_image_url = $detail_image['url'];
                    break;
                }
            }
            if (!$fancy_title_image) {
                $fancy_title_image = get_post_thumbnail_id();
                $fancy_title_image_url = wp_get_attachment_url($fancy_title_image, 'full');
            }
        }
        // Page Title Hidden
        if (!$show_page_title) {
            $page_heading_el_class = "page-heading-hidden";
        }
        // Breadcrumb in heading
        if ($breadcrumb_in_heading) {
            $page_heading_el_class .= " page-heading-breadcrumbs";
        }
        if ($page_title_style == "fancy-tabbed") {
            $page_title_text_align = "left";
        }
        // Return if product & inner heading
        if (function_exists('is_product') && is_product() && sf_theme_supports('product-inner-heading') && ($page_title_style == "standard" || $page_title_style == "")) {
            return;
        }
        // Dont' allow fancy-tabbed on product pages
        if (function_exists('is_product') && is_product() && sf_theme_supports('product-inner-heading') && $page_title_style == "fancy-tabbed") {
            $page_title_style = "fancy";
        }
        if ($page_title_style == "fancy" && sf_theme_opts_name() == "sf_atelier_options" && !(function_exists('is_product') && is_product())) {
            $extra_styles = 'height: ' . $page_title_height . 'px;';
        }
        if (isset($sf_options['minimal_checkout'])) {
            if (function_exists('is_checkout') && is_checkout()) {
                global $woocommerce;
                if ($sf_options['minimal_checkout']) {
                    ?>

		            	<div class="minimal-checkout-return container"><a href="<?php 
                    echo esc_url($woocommerce->cart->get_cart_url());
                    ?>
"><?php 
                    _e("Return to cart", "swiftframework");
                    ?>
</a></div>

		        	<?php 
                }
            }
        }
        if (!is_home()) {
            ?>
                <?php 
            if ($page_title_style == "fancy" || $page_title_style == "fancy-tabbed") {
                ?>

                    <div class="fancy-heading-wrap <?php 
                echo esc_attr($page_title_style);
                ?>
-style">

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


示例5: widget

    function widget($args, $instance)
    {
        global $post, $sf_options;
        extract($args);
        $remove_dates = $sf_options['remove_dates'];
        // Widget Options
        $title = apply_filters('widget_title', $instance['title']);
        // Title
        $number = $instance['number'];
        // Number of posts to show
        $category = $instance['category'];
        // Category to show
        if ($category == "All") {
            $category = "all";
        }
        if ($category == "all") {
            $category = '';
        }
        $category_slug = str_replace('_', '-', $category);
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        $video_icon = apply_filters('sf_video_icon', '<i class="ss-video"></i>');
        $audio_icon = apply_filters('sf_audio_icon', '<i class="ss-music"></i>');
        $picture_icon = apply_filters('sf_picture_icon', '<i class="ss-picture"></i>');
        $post_icon = apply_filters('sf_post_icon', '<i class="ss-file"></i>');
        $recent_posts = new WP_Query(array('post_type' => 'post', 'posts_per_page' => $number, 'category_name' => $category_slug));
        $thumb_width = apply_filters('sf_widget_posts_thumb_width', 94);
        $thumb_height = apply_filters('sf_widget_posts_thumb_height', 75);
        if ($recent_posts->have_posts()) {
            ?>

                <ul class="recent-posts-list">

                    <?php 
            while ($recent_posts->have_posts()) {
                $recent_posts->the_post();
                $thumb_type = sf_get_post_meta($post->ID, 'sf_thumbnail_type', true);
                $post_title = get_the_title();
                $post_author = get_the_author_link();
                $post_date = get_the_date();
                $post_categories = get_the_category_list();
                $post_comments = get_comments_number();
                $post_permalink = get_permalink();
                $thumb_image = get_post_thumbnail_id();
                $thumb_img_url = wp_get_attachment_url($thumb_image, 'widget-image');
                $image = sf_aq_resize($thumb_img_url, $thumb_width, $thumb_height, true, false);
                $image_alt = esc_attr(sf_get_post_meta($thumb_image, '_wp_attachment_image_alt', true));
                ?>
                        <?php 
                if ($image) {
                    ?>
                        <li class="has-image">
                            <a href="<?php 
                    echo esc_url($post_permalink);
                    ?>
" class="recent-post-image">
                                <img src="<?php 
                    echo esc_url($image[0]);
                    ?>
" width="<?php 
                    echo esc_attr($image[1]);
                    ?>
" height="<?php 
                    echo esc_attr($image[2]);
                    ?>
" alt="<?php 
                    echo esc_attr($image_alt);
                    ?>
"/>
                            </a>
                        <?php 
                } else {
                    ?>
                        <li>
                        <?php 
                }
                ?>

                            <div class="recent-post-details">
                                <a class="recent-post-title" href="<?php 
                echo esc_url($post_permalink);
                ?>
"
                                   title="<?php 
                echo esc_attr($post_title);
                ?>
"><?php 
                echo esc_attr($post_title);
                ?>
</a>
                                 
                                <?php 
                if (sf_theme_opts_name() == "sf_uplift_options") {
                    echo '<div class="excerpt">' . sf_excerpt(20) . '</div>';
                    if (!$remove_dates) {
                        echo '<div class="blog-item-details">' . sprintf(__('<time datetime="%1$s">%2$s</time>', 'swiftframework'), get_the_date('Y-m-d'), get_the_date()) . '</div>';
                    }
                } else {
//.........这里部分代码省略.........
开发者ID:arobbins,项目名称:spellestate,代码行数:101,代码来源:widget-posts.php


示例6: sf_post_pagination

    function sf_post_pagination()
    {
        global $sf_options, $sf_sidebar_config;
        $blog_page = __($sf_options['blog_page'], 'swiftframework');
        $single_author = $sf_options['single_author'];
        $remove_dates = $sf_options['remove_dates'];
        $pagination_style = "standard";
        if (isset($sf_options['pagination_style'])) {
            $pagination_style = $sf_options['pagination_style'];
        }
        $prev_post = get_next_post();
        $next_post = get_previous_post();
        $has_both = false;
        if (sf_theme_opts_name() == "sf_joyn_options" && $pagination_style == "fs-arrow") {
            return;
        }
        if (!empty($next_post) && !empty($prev_post)) {
            $has_both = true;
        }
        ?>

    	    <?php 
        if (!empty($next_post) || !empty($prev_post)) {
            ?>
			    <?php 
            if ($has_both) {
                ?>
			    <div class="post-pagination prev-next clearfix">
			    <?php 
            } else {
                ?>
			    <div class="post-pagination clearfix">
			        <?php 
            }
            ?>

					<?php 
            if (!empty($prev_post)) {
                $author_id = $prev_post->post_author;
                $author_name = get_the_author_meta('display_name', $author_id);
                $author_url = get_author_posts_url($author_id);
                $post_date = get_the_date();
                $post_date_str = get_the_date('Y-m-d');
                $post_categories = get_the_category_list(', ', '', $prev_post->ID);
                ?>
					    <a class="prev-article col-sm-4" href="<?php 
                echo get_permalink($prev_post->ID);
                ?>
">
					        <h4><?php 
                _e("Newer", 'swiftframework');
                ?>
</h4>
					        <h3><?php 
                echo esc_attr($prev_post->post_title);
                ?>
</h3>
					    </a>
					<?php 
            } else {
                ?>
						<div class="pagination-spacer col-sm-4"></div>
					<?php 
            }
            ?>

					<?php 
            if ($blog_page != "") {
                ?>
						<div class="blog-button col-sm-4">
					        <a class="sf-button medium rounded black bordered" href="<?php 
                echo get_permalink($blog_page);
                ?>
">
					        	<span class="text"><?php 
                _e("View all posts", "swiftframework");
                ?>
</span>
					        </a>
					    </div>
					<?php 
            }
            ?>

					<?php 
            if (!empty($next_post)) {
                $author_id = $next_post->post_author;
                $author_name = get_the_author_meta('display_name', $author_id);
                $author_url = get_author_posts_url($author_id);
                $post_date = get_the_date();
                $post_date_str = get_the_date('Y-m-d');
                $post_categories = get_the_category_list(', ', '', $next_post->ID);
                ?>
					    <a class="next-article col-sm-4" href="<?php 
                echo get_permalink($next_post->ID);
                ?>
">
					        <h4><?php 
                _e("Older", 'swiftframework');
                ?>
//.........这里部分代码省略.........
开发者ID:shimion,项目名称:wishlistshimion,代码行数:101,代码来源:sf-theme-functions.php


示例7: sf_get_recent_post_item


//.........这里部分代码省略.........
                 $recent_post_figure .= "<li><a " . $link_config . "><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$alt}' /></a></li>";
             }
             $recent_post_figure .= '</ul></div>';
         } else {
             if ($thumb_img_url == "" && $thumb_type != "none") {
                 $thumb_img_url = "default";
             }
             $image = sf_aq_resize($thumb_img_url, $thumb_width, $thumb_height, true, false);
             if ($image) {
                 $recent_post_figure .= '<img itemprop="image" src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $item_title . '" />';
                 $recent_post_figure .= '<a ' . $link_config . '></a>';
                 $recent_post_figure .= '<div class="figcaption-wrap"></div>';
                 if ($display_type == "showcase") {
                     $recent_post_figure .= '<figcaption><div class="thumb-info">';
                     $recent_post_figure .= '<h5><span class="post-date updated">' . $post_date . '</span></h5>';
                     $recent_post_figure .= '<h4>' . $item_title . '</h4>';
                     $recent_post_figure .= '</div></figcaption>';
                 } else {
                     $recent_post_figure .= '<figcaption><div class="thumb-info thumb-info-alt">';
                     $recent_post_figure .= '<i class="' . $item_icon . '"></i>';
                     $recent_post_figure .= '</div></figcaption>';
                 }
             }
         }
     }
     $recent_post_figure .= '</figure>';
     $recent_post_figure .= '</div>';
     if ($display_type == "bold") {
         $recent_post .= $recent_post_figure;
         $recent_post .= '<div class="details-wrap">';
         if ($thumb_type == "none") {
             $recent_post .= '<h2><a ' . $post_permalink_config . '>' . $item_title . '</a></h2>';
         } else {
             $recent_post .= '<h3><a ' . $post_permalink_config . '>' . $item_title . '</a></h3>';
         }
         $recent_post .= sf_get_post_details($post->ID, true);
         $recent_post .= '</div>';
     } else {
         if ($display_type == "list") {
             $recent_post .= '<a class="list-post-link" href="' . $post_permalink . '"></a>';
             if ($image) {
                 $recent_post_figure .= '<figure class="animated-overlay">';
                 $recent_post_figure .= '<img itemprop="image" src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $item_title . '" />';
                 $recent_post_figure .= '<a ' . $link_config . '></a>';
                 $recent_post_figure .= '<div class="figcaption-wrap"></div>';
                 $recent_post_figure .= '<figcaption><div class="thumb-info thumb-info-alt">';
                 $recent_post_figure .= '<i class="' . $item_icon . '"></i>';
                 $recent_post_figure .= '</div></figcaption>';
                 $recent_post_figure .= '</figure>';
             }
             $recent_post .= '<div class="details-wrap">';
             $recent_post .= '<h4>' . $item_title . '</h4>';
             $recent_post .= '<div class="post-item-details">';
             $recent_post .= '<span class="post-date updated">' . $post_date . '</span>';
             $recent_post .= '</div>';
             $recent_post .= '</div>';
         } else {
             if ($display_type == "bright") {
                 $recent_post .= '<div class="details-wrap">';
                 $recent_post .= '<div class="author-avatar">' . get_avatar(get_the_author_meta('ID'), '140') . '</div>';
                 $recent_post .= '<h6 class="post-item-author"><span class="author">' . sprintf('<a href="%2$s" rel="author" itemprop="author">%1$s</a>', $post_author, get_author_posts_url(get_the_author_meta('ID'))) . '</span></h6>';
                 $recent_post .= '<h2><a ' . $post_permalink_config . '>' . $item_title . '</a></h2>';
                 $recent_post .= '<div class="post-item-details">';
                 $recent_post .= '<span class="post-date updated">' . $post_date . '</span>';
                 $recent_post .= '</div>';
                 $recent_post .= '</div>';
             } else {
                 if ($display_type == "bold") {
                     $recent_post .= $recent_post_figure;
                     $recent_post .= '<div class="details-wrap">';
                     if ($thumb_type == "none") {
                         $recent_post .= '<h2><a ' . $post_permalink_config . '>' . $item_title . '</a></h2>';
                     } else {
                         $recent_post .= '<h3><a ' . $post_permalink_config . '>' . $item_title . '</a></h3>';
                     }
                     $recent_post = sf_get_post_details($post->ID, true);
                     $recent_post .= '</div>';
                 } else {
                     if ($display_type == "showcase") {
                         $recent_post .= $recent_post_figure;
                     } else {
                         $recent_post .= $recent_post_figure;
                         $recent_post .= '<div class="details-wrap">';
                         $recent_post .= '<h5><a ' . $post_permalink_config . '>' . $item_title . '</a></h5>';
                         $recent_post .= sf_get_post_details($post->ID, true);
                         if ($excerpt_length != "0" && $excerpt_length != "") {
                             $recent_post .= '<div class="excerpt">' . $post_excerpt . '</div>';
                         }
                         if (sf_theme_opts_name() == "sf_atelier_options" && $display_type == "standard-row") {
                             $recent_post .= '<a class="read-more-button" href="' . get_permalink() . '">' . __("Read more", "swiftframework") . '</a>';
                         }
                         $recent_post .= '</div>';
                     }
                 }
             }
         }
     }
     $recent_post .= '</div>';
     return $recent_post;
 }
开发者ID:Infernosaint,项目名称:WPSetupTest2,代码行数:101,代码来源:sf-post-formats.php


示例8: sf_page_classes

 function sf_page_classes()
 {
     // Get options
     global $sf_options, $post, $sf_catalog_mode;
     $enable_responsive = $sf_options['enable_responsive'];
     $is_responsive = "responsive-fluid";
     if (!$enable_responsive) {
         $is_responsive = "responsive-fixed";
     }
     $enable_rtl = $sf_options['enable_rtl'];
     $design_style = sf_get_option('design_style_type', 'minimal');
     $page_header_type = $page_slider = $page_header_alt_logo = $page_style = $page_design_style = "";
     $header_layout = $sf_options['header_layout'];
     if (isset($_GET['header'])) {
         $header_layout = $_GET['header'];
     }
     $page_layout = $sf_options['page_layout'];
     $enable_page_shadow = $sf_options['enable_page_shadow'];
     $enable_page_transitions = $sf_options['enable_page_transitions'];
     $page_transition = $sf_options['page_transition'];
     $enable_header_shadow = false;
     $mobile_two_click = false;
     if (isset($sf_options['enable_header_shadow'])) {
         $enable_header_shadow = $sf_options['enable_header_shadow'];
     }
     $product_image_shadows = true;
     if (isset($sf_options['product_image_shadows'])) {
         $product_image_shadows = $sf_options['product_image_shadows'];
     }
     if (isset($sf_options['enable_mobile_two_click'])) {
         $mobile_two_click = $sf_options['enable_mobile_two_click'];
     }
     $enable_mini_header = $sf_options['enable_mini_header'];
     $enable_mini_header_resize = $sf_options['enable_mini_header_resize'];
     $header_search_type = $sf_options['header_search_type'];
     $mobile_header_layout = $sf_options['mobile_header_layout'];
     $mobile_header_shown = $sf_options['mobile_header_shown'];
     $mobile_header_sticky = $sf_options['mobile_header_sticky'];
     $mobile_menu_type = "slideout";
     $enable_sticky_header_hide = false;
     $enable_newsletter_sub_bar = $enable_newsletter_sub_bar_page = false;
     if (isset($sf_options['mobile_menu_type'])) {
         $mobile_menu_type = $sf_options['mobile_menu_type'];
     }
     $enable_articleswipe = 0;
     if (isset($sf_options['enable_articleswipe'])) {
         $enable_articleswipe = $sf_options['enable_articleswipe'];
     }
     $home_preloader = false;
     if (isset($sf_options['home_preloader'])) {
         $home_preloader = $sf_options['home_preloader'];
     }
     if (isset($sf_options['enable_sticky_header_hide'])) {
         $enable_sticky_header_hide = $sf_options['enable_sticky_header_hide'];
     }
     if (isset($sf_options['enable_newsletter_sub_bar'])) {
         $enable_newsletter_sub_bar = $sf_options['enable_newsletter_sub_bar'];
     }
     if ($post && is_singular() && !is_search()) {
         $page_header_type = sf_get_post_meta($post->ID, 'sf_page_header_type', true);
         $page_header_alt_logo = sf_get_post_meta($post->ID, 'sf_page_header_alt_logo', true);
         $page_slider = sf_get_post_meta($post->ID, 'sf_page_slider', true);
         $page_design_style = sf_get_post_meta($post->ID, 'sf_page_design_style', true);
         $enable_newsletter_sub_bar_page = sf_get_post_meta($post->ID, 'sf_enable_newsletter_bar', true);
     }
     if (isset($sf_options['enable_newsletter_sub_bar_globally'])) {
         $enable_newsletter_sub_bar_page = $sf_options['enable_newsletter_sub_bar_globally'];
     }
     // Shop page check
     $shop_page = false;
     if (function_exists('is_shop') && is_shop() || function_exists('is_product_category') && is_product_category()) {
         $shop_page = true;
     }
     if ($shop_page) {
         if (isset($sf_options['woo_page_header'])) {
             $page_header_type = $sf_options['woo_page_header'];
         }
     }
     if (($page_header_type == "naked-light" || $page_header_type == "naked-dark") && ($header_layout == "header-vert" || $header_layout == "header-vert-right")) {
         $header_layout = apply_filters('sf_naked_default_header', "header-1");
     }
     // Create variables
     $page_class = $header_wrap_class = $logo_class = $shop_icon_style = "";
     // Design Style
     if (isset($_GET['design_style'])) {
         $design_style = $_GET['design_style'];
     }
     $page_class .= $design_style . "-design ";
     // Theme Specific
     if (sf_theme_opts_name() == "sf_atelier_options") {
         //$page_class .= 'ss-parallax-disabled ';
     }
     // Header Layout
     if ($page_header_type == "standard-overlay") {
         $page_class .= "header-overlay ";
     } else {
         if ($header_layout == "header-5") {
             $page_class .= "header-5-overlay ";
         }
     }
//.........这里部分代码省略.........
开发者ID:brycefrees,项目名称:DivisionWest,代码行数:101,代码来源:sf-head.php


示例9: widget

    function widget($args, $instance)
    {
        global $post, $sf_options;
        extract($args);
        $remove_dates = $sf_options['remove_dates'];
        // Widget Options
        $title = apply_filters('widget_title', $instance['title']);
        // Title
        $post_id = $instance['post_id'];
        // Post ID
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        if (function_exists('icl_object_id')) {
            $post_id = icl_object_id($post_id, 'post', true);
        }
        $infocus_post = get_post($post_id);
        ?>

            <div class="infocus-item">

                <?php 
        $post_title = $infocus_post->post_title;
        $post_permalink = get_post_permalink($infocus_post);
        $thumb_image = rwmb_meta('sf_thumbnail_image', 'type=image&size=full', $post_id);
        $thumb_video = sf_get_post_meta($post_id, 'sf_thumbnail_video_url', true);
        foreach ($thumb_image as $detail_image) {
            $thumb_img_url = $detail_image['url'];
            break;
        }
        if (!$thumb_image) {
            $thumb_image = get_post_thumbnail_id($post_id);
            $thumb_img_url = wp_get_attachment_url($thumb_image, 'full');
        }
        $image = sf_aq_resize($thumb_img_url, 300, 225, true, false);
        $image_alt = esc_attr(sf_get_post_meta($thumb_image, '_wp_attachment_image_alt', true));
        ?>
                <figure class="animated-overlay overlay-alt">

                	<?php 
        if (sf_theme_opts_name() == "sf_atelier_options") {
            $post_date_month = get_the_date('M');
            $post_date_day = get_the_date('d');
            ?>
                	<div class="date-overlay narrow-date-block"><span class="month"><?php 
            echo $post_date_month;
            ?>
</span><span class="day"><?php 
            echo $post_date_day;
            ?>
</span></div>
                	<?php 
        }
        ?>

                    <?php 
        if ($thumb_video != "") {
            ?>
                        <?php 
            echo sf_video_embed($thumb_video, 300, 200);
            ?>
                    <?php 
        } else {
            if ($image) {
                ?>
                        <img src="<?php 
                echo $image[0];
                ?>
" width="<?php 
                echo $image[1];
                ?>
"
                             height="<?php 
                echo $image[2];
                ?>
" alt="<?php 
                echo $image_alt;
                ?>
"/>
                        <a href="<?php 
                echo $post_permalink;
                ?>
" class="infocus-image"></a>
                        <div class="figcaption-wrap"></div>
                        <figcaption>
                            <div class="thumb-info thumb-info-alt">
                                <?php 
                echo apply_filters('sf_next_icon', '<i class="ss-navigateright"></i>');
                ?>
                            </div>
                        </figcaption>
                    <?php 
            }
        }
        ?>
                </figure>

                <div class="infocus-title clearfix">

//.........这里部分代码省略.........
开发者ID:arobbins,项目名称:spellestate,代码行数:101,代码来源:widget-infocus.php


示例10: _e

?>
</option>
        <option value="shortcode-social"><?php 
_e('Social', 'swiftframework');
?>
</option>
        <option value="shortcode-social-share"><?php 
_e('Social share', 'swiftframework');
?>
</option>
        <option value="shortcode-tables"><?php 
_e('Table', 'swiftframework');
?>
</option>
        <?php 
if (sf_theme_opts_name() != "sf_atelier_options") {
    ?>
        <option value="shortcode-tooltip"><?php 
    _e('Tooltip', 'swiftframework');
    ?>
</option>
        <?php 
}
?>
        <option value="shortcode-typography"><?php 
_e('Typography', 'swiftframework');
?>
</option>
    </select>
</div>
开发者ID:Infernosaint,项目名称:WPSetupTest2,代码行数:30,代码来源:interface.php


示例11: sf_get_wishlist

 function sf_get_wishlist()
 {
     global $wpdb, $yith_wcwl, $woocommerce;
     if (!$yith_wcwl || !$woocommerce) {
         return;
     }
     $wishlist_output = "";
     if (is_user_logged_in()) {
         $user_id = get_current_user_id();
     }
     $wishlist_icon = apply_filters('sf_view_wishlist_icon', '<i class="ss-star"></i>');
     $count = array();
     if (is_user_logged_in()) {
         $count = $wpdb->get_results($wpdb->prepare('SELECT COUNT(*) as `cnt` FROM `' . YITH_WCWL_TABLE . '` WHERE `user_id` = %d', $user_id), ARRAY_A);
         $count = $count[0]['cnt'];
     } else {
         $count[0]['cnt'] = count(yith_getcookie('yith_wcwl_products'));
         $count = $count[0]['cnt'];
     }
     if (is_array($count)) {
         $count = 0;
     }
     if (sf_theme_opts_name() == "sf_atelier_options" || sf_theme_opts_name() == "sf_uplift_options") {
         $wishlist_output .= '<li class="parent wishlist-item"><a class="wishlist-link" href="' . $yith_wcwl->get_wishlist_url() . '" title="' . __("View your wishlist", "swiftframework") . '"><span class="menu-item-title">' . __("Wishlist", "swiftframework") . '</span> ' . apply_filters('sf_wishlist_menu_icon', '<i class="ss-star"></i>') . '<span class="count">' . $count . '</span><span class="star"></span></a>';
     } else {
         $wishlist_output .= '<li class="parent wishlist-item"><a class="wishlist-link" href="' . $yith_wcwl->get_wishlist_url() . '" title="' . __("View your wishlist", "swiftframework") . '">' . apply_filters('sf_wishlist_menu_icon', '<i class="ss-star"></i>') . '<span class="count">' . $count . '</span><span class="star"></span></a>';
     }
     $wishlist_output .= '<ul class="sub-menu">';
     $wishlist_output .= '<li>';
     $wishlist_output .= '<div class="wishlist-bag">';
     $current_page = 1;
     $limit_sql = '';
     $count_limit = 0;
     if (is_user_logged_in()) {
         $wishlist = $wpdb->get_results($wpdb->prepare("SELECT * FROM `" . YITH_WCWL_TABLE . "` WHERE `user_id` = %s" . $limit_sql, $user_id), ARRAY_A);
     } else {
         $wishlist = yith_getcookie('yith_wcwl_products');
     }
     $wishlist_output .= '<div class="bag-contents">';
     $wishlist_output .= do_action('yith_wcwl_before_wishlist');
     if (count($wishlist) > 0) {
         foreach ($wishlist as $values) {
             if ($count_limit < 3) {
                 if (!is_user_logged_in()) {
                     if (isset($values['add-to-wishlist']) && is_numeric($values['add-to-wishlist'])) {
                         $values['prod_id'] = $values['add-to-wishlist'];
                         $values['ID'] = $values['add-to-wishlist'];
                     } else {
                         if (isset($values['product_id'])) {
                             $values['prod_id'] = $values['product_id'];
                             $values['ID'] = $values['product_id'];
                         } else {
                             $values['ID'] = $values['prod_id'];
                         }
                     }
                 }
                 $product_obj = get_product($values['prod_id']);
                 if ($product_obj !== false && $product_obj->exists()) {
                     $wishlist_output .= '<div id="wishlist-' . $values['ID'] . '" class="bag-product clearfix prod-' . $values['prod_id'] . '">';
                     if (has_post_thumbnail($product_obj->id)) {
                         $image_link = wp_get_attachment_url(get_post_thumbnail_id($product_obj->id));
                         $image = wp_get_attachment_image_src(get_post_thumbnail_id($product_obj->id), 'thumbnail');
                         if ($image) {
                             $wishlist_output .= '<figure><a class="bag-product-img" href="' . esc_url(get_permalink(apply_filters('woocommerce_in_cart_product', $values['prod_id']))) . '"><img itemprop="image" src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" /></a></figure>';
                         }
                     }
                     $wishlist_output .= '<div class="bag-product-details">';
                     $wishlist_output .= '<div class="bag-product-title"><a href="' . esc_url(get_permalink(apply_filters('woocommerce_in_cart_product', $values['prod_id']))) . '">' . apply_filters('woocommerce_in_cartproduct_obj_title', $product_obj->get_title(), $product_obj) . '</a></div>';
                     if (get_option('woocommerce_display_cart_prices_excluding_tax') == 'yes') {
                         $wishlist_output .= '<div class="bag-product-price">' . apply_filters('woocommerce_cart_item_price_html', woocommerce_price($product_obj->get_price_excluding_tax()), $values, '') . '</div>';
                     } else {
                         $wishlist_output .= '<div class="bag-product-price">' . apply_filters('woocommerce_cart_item_price_html', woocommerce_price($product_obj->get_price()), $values, '') . '</div>';
                     }
                     $wishlist_output .= '</div>';
                     $wishlist_output .= '</div>';
                 }
                 $count_limit++;
             }
         }
     } else {
         $wishlist_output .= '<div class="wishlist-empty">' . __('Your wishlist is empty.', 'swiftframework') . '</div>';
     }
     $wishlist_output .= '</div>';
     if (count($wishlist) > 0) {
         $wishlist_output .= '<div class="bag-buttons">';
     } else {
         $wishlist_output .= '<div class="bag-buttons no-items">';
     }
     $wishlist_output .= '<a class="sf-button standard sf-icon-reveal wishlist-button" href="' . $yith_wcwl->get_wishlist_url() . '">' . $wishlist_icon . '<span class="text">' . __('View Wishlist', 'swiftframework') . '</span></a>';
     $wishlist_output .= '</div>';
     $wishlist_output .= '</div>';
     $wishlist_output .= '</li>';
     $wishlist_output .= '</ul>';
     $wishlist_output .= '</li>';
     return $wishlist_output;
 }
开发者ID:arobbins,项目名称:spellestate,代码行数:96,代码来源:sf-header.php


示例12: sf_post_pagination

    function sf_post_pagination()
    {
        global $sf_options, $sf_sidebar_config;
        $single_author = $sf_options['single_author'];
        $remove_dates = $sf_options['remove_dates'];
        $pagination_style = "standard";
        if (isset($sf_options['pagination_style'])) {
            $pagination_style = $sf_options['pagination_style'];
        }
        $enable_category_navigation = $sf_options['enable_category_navigation'];
        $prev_post = get_next_post($enable_category_navigation, '', 'category');
        $next_post = get_previous_post($enable_category_navigation, '', 'category');
        $has_both = false;
        if (sf_theme_opts_name() == "sf_joyn_options" && $pagination_style == "fs-arrow") {
            return;
        }
     

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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