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

PHP woo_get_dynamic_values函数代码示例

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

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



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

示例1: woo_projects_maybe_remove_description

/**
 * Old Portfolio Layout
 * @since   1.0.0
 * @return  void
 */
function woo_projects_maybe_remove_description()
{
    $settings = woo_get_dynamic_values(array('projects_old_look' => 'false'));
    if ('false' == $settings['projects_old_look']) {
        return;
    }
    remove_action('projects_after_loop_item', 'projects_template_short_description', 10);
}
开发者ID:plusplusminus,项目名称:athol,代码行数:13,代码来源:functions.php


示例2: woo_load_featured_slider_js

function woo_load_featured_slider_js()
{
    if (is_home()) {
        //Slider settings
        $settings = array('featured_speed' => '7', 'featured_hover' => 'true', 'featured_action' => 'true', 'featured_touchswipe' => 'true', 'featured_animation_speed' => '0.6', 'featured_pagination' => 'false', 'featured_nextprev' => 'true', 'featured_animation' => 'fade');
        $settings = woo_get_dynamic_values($settings);
        if ($settings['featured_speed'] == '0') {
            $slideshow = 'false';
        } else {
            $slideshow = 'true';
        }
        if ($settings['featured_touchswipe']) {
            $touchSwipe = 'true';
        } else {
            $touchSwipe = 'false';
        }
        if ($settings['featured_hover']) {
            $pauseOnHover = 'true';
        } else {
            $pauseOnHover = 'false';
        }
        if ($settings['featured_action']) {
            $pauseOnAction = 'true';
        } else {
            $pauseOnAction = 'false';
        }
        if (!in_array($settings['featured_animation'], array('fade', 'slide'))) {
            $settings['featured_animation'] = 'fade';
        }
        $slideshowSpeed = (int) $settings['featured_speed'] * 1000;
        // milliseconds
        $animationDuration = (int) $settings['featured_animation_speed'] * 1000;
        // milliseconds
        $nextprev = $settings['featured_nextprev'];
        $manualControls = '';
        if ($settings['featured_pagination'] == 'true') {
            $pagination = 'true';
        } else {
            $pagination = 'false';
        }
        if ($settings['featured_animation'] == 'slide') {
            $smoothHeight = 'true';
        } else {
            $smoothHeight = 'false';
        }
        $data = array('animation' => $settings['featured_animation'], 'controlsContainer' => '.controls-container', 'smoothHeight' => $smoothHeight, 'directionNav' => $nextprev, 'controlNav' => $pagination, 'manualControls' => $manualControls, 'slideshow' => $slideshow, 'pauseOnHover' => $pauseOnHover, 'slideshowSpeed' => $slideshowSpeed, 'animationDuration' => $animationDuration, 'touch' => $touchSwipe, 'pauseOnHover' => $pauseOnHover, 'pauseOnAction' => $pauseOnAction);
        wp_localize_script('featured-slider', 'woo_localized_data', $data);
        wp_enqueue_script('featured-slider');
    }
    // End woo_load_featured_slider_js()
}
开发者ID:brian3t,项目名称:orchidmate,代码行数:51,代码来源:theme-js.php


示例3: wooframework_loop_columns

 function wooframework_loop_columns()
 {
     $settings = woo_get_dynamic_values(array('homepage_featured_products_columns' => 3));
     if (is_archive() && !is_home()) {
         global $woo_options;
         if (!isset($woo_options['woocommerce_product_columns'])) {
             $cols = 3;
         } else {
             $cols = $woo_options['woocommerce_product_columns'];
         }
     }
     if (is_home() || is_front_page()) {
         $cols = $settings['homepage_featured_products_columns'];
     }
     return intval($cols);
 }
开发者ID:sanjeevpraja,项目名称:wordpress-theme,代码行数:16,代码来源:theme-woocommerce.php


示例4: woo_featured_slider_loader

 function woo_featured_slider_loader()
 {
     $settings = woo_get_dynamic_values(array('featured' => 'true'));
     if (is_home() && $settings['featured'] == 'true') {
         get_template_part('includes/featured', 'slider');
     }
 }
开发者ID:gumbysgoo,项目名称:bestilblomster,代码行数:7,代码来源:theme-functions.php


示例5: woo_top_ad

    function woo_top_ad()
    {
        $settings = woo_get_dynamic_values(array('ad_top' => 'false', 'ad_top_adsense' => '', 'ad_top_image' => '', 'ad_top_url' => ''));
        if ('true' == $settings['ad_top']) {
            ?>
        <div id="topad">
			<?php 
            if ('' != $settings['ad_top_adsense']) {
                echo stripslashes($settings['ad_top_adsense']);
            } else {
                if ('' != $settings['ad_top_url'] && '' != $settings['ad_top_image']) {
                    $top_ad_image = $settings['ad_top_image'];
                    if (is_ssl()) {
                        $top_ad_image = str_replace('http://', 'https://', $top_ad_image);
                    }
                    ?>
				<a href="<?php 
                    echo esc_url($settings['ad_top_url']);
                    ?>
"><img src="<?php 
                    echo esc_url($top_ad_image);
                    ?>
" /></a>
			<?php 
                }
            }
            ?>
		</div><!-- /#topad -->
<?php 
        }
    }
开发者ID:jospintedjou,项目名称:wordpress,代码行数:31,代码来源:theme-actions.php


示例6: woo_modify_magazine_homepage_query

 function woo_modify_magazine_homepage_query($q)
 {
     if (!is_admin() && $q->is_main_query() && 0 < $q->query_vars['page_id'] && $q->query_vars['page_id'] == get_option('page_on_front') && 'template-magazine.php' == get_post_meta(intval($q->query_vars['page_id']), '_wp_page_template', true)) {
         $settings = woo_get_dynamic_values(array('magazine_limit' => get_option('posts_per_page')));
         $q->set('posts_per_page', intval($settings['magazine_limit']));
         $q->set('paged', intval($q->query_vars['page']));
         $q->parse_query();
     }
     return $q;
 }
开发者ID:pwillems,项目名称:mimosa-contents,代码行数:10,代码来源:theme-actions.php


示例7: woo_subscribe_connect

    function woo_subscribe_connect($widget = 'false', $title = '', $form = '', $social = '')
    {
        //Setup default variables, overriding them if the "Theme Options" have been saved.
        $settings = array('connect' => 'false', 'connect_title' => __('Subscribe', 'woothemes'), 'connect_related' => 'true', 'connect_content' => __('Subscribe to our e-mail newsletter to receive updates.', 'woothemes'), 'connect_newsletter_id' => '', 'connect_mailchimp_list_url' => '', 'feed_url' => '', 'connect_rss' => '', 'connect_twitter' => '', 'connect_facebook' => '', 'connect_youtube' => '', 'connect_flickr' => '', 'connect_linkedin' => '', 'connect_delicious' => '', 'connect_rss' => '', 'connect_googleplus' => '', 'connect_dribbble' => '', 'connect_instagram' => '', 'connect_vimeo' => '', 'connect_pinterest' => '');
        $settings = woo_get_dynamic_values($settings);
        // Setup title
        if ($widget != 'true') {
            $title = $settings['connect_title'];
        }
        // Setup related post (not in widget)
        $related_posts = '';
        if ($settings['connect_related'] == "true" and $widget != "true") {
            $related_posts = do_shortcode('[related_posts limit="5"]');
        }
        ?>
	<?php 
        if ($settings['connect'] == "true" or $widget == 'true') {
            ?>
	<aside id="connect">
		<h3><?php 
            if ($title) {
                echo stripslashes($title);
            } else {
                _e('Subscribe', 'woothemes');
            }
            ?>
</h3>

		<div <?php 
            if ($related_posts != '') {
                echo 'class="col-left"';
            }
            ?>
>
			<p><?php 
            if ($settings['connect_content'] != '') {
                echo stripslashes($settings['connect_content']);
            } else {
                _e('Subscribe to our e-mail newsletter to receive updates.', 'woothemes');
            }
            ?>
</p>

			<?php 
            if ($settings['connect_newsletter_id'] != "" and $form != 'on') {
                ?>
			<form class="newsletter-form<?php 
                if ($related_posts == '') {
                    echo ' fl';
                }
                ?>
" action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=<?php 
                echo $settings['connect_newsletter_id'];
                ?>
', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
				<input class="email" type="text" name="email" value="<?php 
                _e('E-mail', 'woothemes');
                ?>
" onfocus="if (this.value == '<?php 
                _e('E-mail', 'woothemes');
                ?>
') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php 
                _e('E-mail', 'woothemes');
                ?>
';}" />
				<input type="hidden" value="<?php 
                echo $settings['connect_newsletter_id'];
                ?>
" name="uri"/>
				<input type="hidden" value="<?php 
                echo esc_attr(get_bloginfo('name'));
                ?>
" name="title"/>
				<input type="hidden" name="loc" value="en_US"/>
				<input class="submit button" type="submit" name="submit" value="<?php 
                _e('Submit', 'woothemes');
                ?>
" />
			</form>
			<?php 
            }
            ?>

			<?php 
            if ($settings['connect_mailchimp_list_url'] != "" and $form != 'on' and $settings['connect_newsletter_id'] == "") {
                ?>
			<!-- Begin MailChimp Signup Form -->
			<div id="mc_embed_signup">
				<form class="newsletter-form<?php 
                if ($related_posts == '') {
                    echo ' fl';
                }
                ?>
" action="<?php 
                echo $settings['connect_mailchimp_list_url'];
                ?>
" method="post" target="popupwindow" onsubmit="window.open('<?php 
                echo $settings['connect_mailchimp_list_url'];
                ?>
', 'popupwindow', 'scrollbars=yes,width=650,height=520');return true">
//.........这里部分代码省略.........
开发者ID:jospintedjou,项目名称:wordpress,代码行数:101,代码来源:theme-functions.php


示例8: woo_add_nav_cart_link

    /**
     * Optionally display a header cart link next to the navigation menu.
     * @since  5.1.0
     * @return void
     */
    function woo_add_nav_cart_link()
    {
        global $woocommerce;
        $settings = array('header_cart_link' => 'false', 'nav_rss' => 'false');
        $settings = woo_get_dynamic_values($settings);
        $class = 'nav cart fr';
        if ('false' == $settings['nav_rss']) {
            $class .= ' no-rss-link';
        }
        if (is_woocommerce_activated() && 'true' == $settings['header_cart_link']) {
            ?>
    	<ul class="<?php 
            echo esc_attr($class);
            ?>
">
    		<li><a class="cart-contents" href="<?php 
            echo esc_url($woocommerce->cart->get_cart_url());
            ?>
" title="<?php 
            esc_attr_e('View your shopping cart', 'woothemes');
            ?>
"><?php 
            echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);
            ?>
 - <?php 
            echo $woocommerce->cart->get_cart_total();
            ?>
</a></li>
   		</ul>
    <?php 
        }
    }
开发者ID:pwillems,项目名称:mimosa-contents,代码行数:37,代码来源:theme-woocommerce.php


示例9: woo_add_widget_heading

 function woo_add_widget_heading($args)
 {
     $settings = woo_get_dynamic_values(array('homepage_features_area_heading' => '', 'homepage_testimonials_area_heading' => ''));
     switch (current_filter()) {
         case 'woothemes_features_args':
             if (!woo_is_widget_in_sidebar('woothemes_features', 'homepage') || !is_home()) {
                 return $args;
             }
             if ('' != $settings['homepage_features_area_heading']) {
                 $args['before_title'] = '<span class="heading">' . esc_html($settings['homepage_features_area_heading']) . '</span>' . $args['before_title'];
             }
             break;
         case 'woothemes_testimonials_args':
             if (!woo_is_widget_in_sidebar('woothemes_testimonials', 'homepage') || !is_home()) {
                 return $args;
             }
             if ('' != $settings['homepage_testimonials_area_heading']) {
                 $args['before_title'] = '<span class="heading">' . esc_html($settings['homepage_testimonials_area_heading']) . '</span>' . $args['before_title'];
             }
             break;
         default:
             break;
     }
     return $args;
 }
开发者ID:sanjeevpraja,项目名称:wordpress-theme,代码行数:25,代码来源:theme-actions.php


示例10: woo_logo

    function woo_logo()
    {
        $settings = woo_get_dynamic_values(array('logo' => ''));
        // Setup the tag to be used for the header area (`h1` on the front page and `span` on all others).
        $heading_tag = 'span';
        if (is_home() || is_front_page()) {
            $heading_tag = 'h1';
        }
        // Get our website's name, description and URL. We use them several times below so lets get them once.
        $site_title = get_bloginfo('name');
        $site_url = home_url('/');
        $site_description = get_bloginfo('description');
        ?>
<div id="logo">
<?php 
        // Website heading/logo and description text.
        if ('' != $settings['logo']) {
            $logo_url = $settings['logo'];
            if (is_ssl()) {
                $logo_url = str_replace('http://', 'https://', $logo_url);
            }
            echo '<a href="' . esc_url($site_url) . '" title="' . esc_attr($site_description) . '"><img src="' . esc_url($logo_url) . '" alt="' . esc_attr($site_title) . '" /></a>' . "\n";
        }
        // End IF Statement
        echo '<' . $heading_tag . ' class="site-title"><a href="' . esc_url($site_url) . '">' . $site_title . '</a></' . $heading_tag . '>' . "\n";
        if ($site_description) {
            echo '<span class="site-description">' . $site_description . '</span>' . "\n";
        }
        ?>
</div>
<?php 
    }
开发者ID:kawaisin,项目名称:boylan-child,代码行数:32,代码来源:theme-actions.php


示例11: woocommerce_header_add_to_cart_fragment

    function woocommerce_header_add_to_cart_fragment($fragments)
    {
        global $woocommerce;
        $settings = array('header_cart_link' => 'false', 'nav_rss' => 'false', 'header_cart_total' => 'false');
        $settings = woo_get_dynamic_values($settings);
        ob_start();
        ?>
		<a class="cart-contents" href="<?php 
        echo esc_url($woocommerce->cart->get_cart_url());
        ?>
" title="<?php 
        _e('View your shopping cart', 'woothemes');
        ?>
">
			<?php 
        if ($settings['header_cart_total'] == 'true') {
            echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);
            ?>
 - <?php 
            echo $woocommerce->cart->get_cart_total();
        }
        ?>
		</a>
	<?php 
        $fragments['a.cart-contents'] = ob_get_clean();
        return $fragments;
    }
开发者ID:klgrimley,项目名称:mzf,代码行数:27,代码来源:theme-woocommerce.php


示例12: woo_wooslider_business

/**
 * Business Slider
 * @since 5.6.0
 * @return void
 */
function woo_wooslider_business()
{
    global $post;
    // Set default values
    $settings = array('slider_biz_number' => '5', 'slider_biz_title' => 'true', 'slider_biz_slide_group' => '', 'slider_biz_order' => 'DESC', 'slider_biz_overlay' => 'bottom');
    // Get slider global settings
    $global_settings = woo_slider_get_global_settings();
    // Merge global & slider specific options
    $settings = array_merge($settings, $global_settings);
    // Compare default values against Theme Options
    $settings = woo_get_dynamic_values($settings);
    // Translate options into something WooSlider can read
    $slider_settings = apply_filters('woo_slider_business_template_settings', array('slider_type' => 'slides', 'smoothheight' => 'true', 'direction_nav' => 'true', 'control_nav' => $settings['slider_pagination'], 'pause_on_hover' => $settings['slider_hover'], 'slider_animation' => $settings['slider_effect'], 'autoslide' => $settings['slider_auto'], 'slideshow_speed' => $settings['slider_interval'], 'animation_duration' => $settings['slider_speed']));
    // Setup the "Slide Group", if one is set.
    $slide_page = '';
    $slide_page_obj = get_term($settings['slider_biz_slide_group'], 'slide-page');
    if (is_object($slide_page_obj)) {
        if (isset($slide_page_obj->slug)) {
            $slide_page = $slide_page_obj->slug;
        }
    }
    // Get "Slide Group" from Page
    if (isset($post->ID)) {
        $stored_slide_page = get_post_meta($post->ID, '_slide-page', true);
        if ('0' == $stored_slide_page) {
            $slide_page = '';
        }
        if ('' != $stored_slide_page && '0' != $stored_slide_page) {
            $slide_page_obj = get_term($stored_slide_page, 'slide-page');
            if (is_object($slide_page_obj)) {
                if (isset($slide_page_obj->slug)) {
                    $slide_page = $slide_page_obj->slug;
                }
            }
        }
    }
    $slides_args = apply_filters('woo_slider_business_template_args', array('slide_page' => $slide_page, 'display_title' => $settings['slider_biz_title'], 'limit' => $settings['slider_biz_number'], 'layout' => 'text-' . $settings['slider_biz_overlay'], 'order' => $settings['slider_biz_order'], 'imageslide' => 'true', 'link_slide' => 'true', 'theme' => 'business'));
    // Fire WooSlider.
    wooslider($slider_settings, $slides_args);
}
开发者ID:plusplusminus,项目名称:athol,代码行数:45,代码来源:wooslider.php


示例13: woo_projects_category_nav

    function woo_projects_category_nav()
    {
        $settings = woo_get_dynamic_values(array('projects_old_look' => 'false'));
        if ('false' == $settings['projects_old_look']) {
            return;
        }
        ?>
	<div class="projects-category-nav">
		<?php 
        $args = array('hide_empty=0');
        $terms = get_terms('project-category', $args);
        if (!empty($terms) && !is_wp_error($terms)) {
            $count = count($terms);
            $term_list .= '<span class="select-category">' . __('Select a category:', 'woothemes') . '</span>';
            $term_list .= '<ul>';
            if (is_post_type_archive('project')) {
                $class = 'class="current" ';
            }
            $term_list .= '<li><a ' . $class . 'href="' . esc_url(get_post_type_archive_link('project')) . '" title="' . __('View all projects', 'woothemes') . '">' . __('All', 'woothemes') . '</a></li>';
            foreach ($terms as $term) {
                if (is_tax('project-category', $term)) {
                    $class = 'class="current" ';
                } else {
                    $class = '';
                }
                $term_list .= '<li><a ' . $class . 'href="' . esc_url(get_term_link($term)) . '" title="' . sprintf(__('View all post filed under %s', 'woothemes'), esc_attr($term->name)) . '">' . esc_attr($term->name) . '</a></li>';
            }
            $term_list .= '</ul>';
            echo $term_list;
        }
        ?>
	</div>
<?php 
    }
开发者ID:plusplusminus,项目名称:athol,代码行数:34,代码来源:template.php


示例14: woo_add_featured_slider

 function woo_add_featured_slider($classes)
 {
     global $woo_options;
     $settings = woo_get_dynamic_values(array('featured' => 'true', 'connect' => 'false'));
     // Add body class if slider is enabled
     if (is_home() && isset($settings['featured']) && $settings['featured'] == 'true') {
         $classes[] = 'has-slider';
     }
     // Add the top section CSS class if we're not in the homepage
     if (!is_home()) {
         $classes[] = 'has-top-section';
     }
     if (is_single() && isset($settings['connect']) && $settings['connect'] == 'true') {
         $classes[] = 'has-subscribe-connect';
     }
     return $classes;
 }
开发者ID:googlecode-mirror,项目名称:wpmu-demo,代码行数:17,代码来源:theme-functions.php


示例15: woo_portfolio_gallery_filter

 function woo_portfolio_gallery_filter($q)
 {
     if (is_tax('portfolio-gallery')) {
         $settings = array('portfolio_posts_per_page' => get_option('posts_per_page'));
         $settings = woo_get_dynamic_values($settings);
         $q->set('posts_per_page', $settings['portfolio_posts_per_page']);
     }
     return $q;
 }
开发者ID:jaiweb,项目名称:ASP,代码行数:9,代码来源:theme-functions.php


示例16: woo_customise_homepage_query

 /**
  * Modify the homepage query, if set to display blog posts, based on the theme options.
  * @since  1.0.0
  * @param  object $q The query object.
  * @return object    The modified query object.
  */
 function woo_customise_homepage_query($q)
 {
     if ($q->is_admin) {
         return $q;
     }
     // We don't want to act in the admin.
     if ($q->is_home && $q->is_main_query()) {
         $settings = woo_get_dynamic_values(array('homepage_content_type' => 'posts', 'homepage_number_of_posts' => get_option('posts_per_page'), 'homepage_posts_category' => ''));
         if ('posts' != $settings['homepage_content_type']) {
             return $q;
         }
         // If we're not displaying blog posts, don't modify the query.
         $q->set('posts_per_page', intval($settings['homepage_number_of_posts']));
         if (0 < intval($settings['homepage_posts_category'])) {
             $q->set('cat', intval($settings['homepage_posts_category']));
         }
         $q->parse_query();
     }
     return $q;
 }
开发者ID:gumbysgoo,项目名称:bestilblomster,代码行数:26,代码来源:theme-actions.php


示例17: woo_custom_styling

 function woo_custom_styling()
 {
     $output = '';
     // Get options
     $settings = array('body_color' => '', 'body_img' => '', 'body_repeat' => '', 'body_pos' => '', 'body_attachment' => '', 'link_color' => '', 'link_hover_color' => '', 'button_color' => '', 'homepage_banner_text_color' => '');
     $settings = woo_get_dynamic_values($settings);
     // Add CSS to output
     if ($settings['body_color'] != '') {
         $output .= 'html { background: ' . $settings['body_color'] . ' !important; }' . "\n";
     }
     if ($settings['body_img'] != '') {
         $output .= 'html { background-image: url( ' . $settings['body_img'] . ' ) !important; }' . "\n";
     }
     if ($settings['body_img'] != '' && $settings['body_repeat'] != '' && $settings['body_pos'] != '') {
         $output .= 'html { background-repeat: ' . $settings['body_repeat'] . ' !important; }' . "\n";
     }
     if ($settings['body_img'] != '' && $settings['body_pos'] != '') {
         $output .= 'html { background-position: ' . $settings['body_pos'] . ' !important; }' . "\n";
     }
     if ($settings['body_img'] != '' && $settings['body_attachment'] != '') {
         $output .= 'html { background-attachment: ' . $settings['body_attachment'] . ' !important; }' . "\n";
     }
     if ($settings['link_color'] != '') {
         $output .= 'a { color: ' . $settings['link_color'] . ' !important; }' . "\n";
     }
     if ($settings['link_hover_color'] != '') {
         $output .= 'a:hover, .post-more a:hover, .post-meta a:hover, .post p.tags a:hover { color: ' . $settings['link_hover_color'] . ' !important; }' . "\n";
     }
     if ($settings['button_color'] != '') {
         $output .= 'a.button, a.comment-reply-link, #commentform #submit, #contact-page .submit { background: ' . $settings['button_color'] . ' !important; border-color: ' . $settings['button_color'] . ' !important; }' . "\n";
         $output .= 'a.button:hover, a.button.hover, a.button.active, a.comment-reply-link:hover, #commentform #submit:hover, #contact-page .submit:hover { background: ' . $settings['button_color'] . ' !important; opacity: 0.9; }' . "\n";
     }
     if ($settings['homepage_banner_text_color'] != '') {
         $output .= '.homepage-banner h1, .homepage-banner .description { color: ' . $settings['homepage_banner_text_color'] . ' !important; }' . "\n";
     }
     // Output styles
     if (isset($output) && $output != '') {
         $output = strip_tags($output);
         $output = "\n" . "<!-- Woo Custom Styling -->\n<style type=\"text/css\">\n" . $output . "</style>\n";
         echo $output;
     }
 }
开发者ID:brian3t,项目名称:orchidmate,代码行数:42,代码来源:theme-actions.php


示例18: wooframework_wc_placeholder_img_src

 function wooframework_wc_placeholder_img_src($src)
 {
     $settings = array('placeholder_url' => get_template_directory_uri() . '/images/wc-placeholder.gif');
     $settings = woo_get_dynamic_values($settings);
     return esc_url($settings['placeholder_url']);
 }
开发者ID:plusplusminus,项目名称:athol,代码行数:6,代码来源:template.php


示例19: woo_custom_styling

 function woo_custom_styling()
 {
     $output = '';
     // Get options
     $settings = array('body_color' => '', 'body_img' => '', 'body_repeat' => '', 'body_pos' => '', 'header_color' => '', 'header_img' => '', 'header_repeat' => '', 'header_pos' => '', 'slider_color' => '', 'slider_img' => '', 'slider_repeat' => '', 'slider_pos' => '', 'intro_color' => '', 'intro_img' => '', 'intro_repeat' => '', 'intro_pos' => '', 'link_color' => '', 'link_hover_color' => '', 'button_color' => '', 'navhover_color' => '');
     $settings = woo_get_dynamic_values($settings);
     // Add CSS to output
     if ($settings['body_color'] != '') {
         $output .= '#content { background: ' . $settings['body_color'] . ' !important; }' . "\n";
     }
     if ($settings['body_img'] != '') {
         $output .= '#content { background-image: url( ' . $settings['body_img'] . ' ) !important; }' . "\n";
     }
     if ($settings['body_img'] != '' && $settings['body_repeat'] != '' && $settings['body_pos'] != '') {
         $output .= '#content { background-repeat: ' . $settings['body_repeat'] . ' !important; }' . "\n";
     }
     if ($settings['body_img'] != '' && $settings['body_pos'] != '') {
         $output .= '#content { background-position: ' . $settings['body_pos'] . ' !important; }' . "\n";
     }
     if ($settings['header_color'] != '' || $settings['header_img'] != '') {
         $output .= '.ie #header { filter: none; }' . "\n";
     }
     if ($settings['header_color'] != '') {
         $output .= '#header { background: ' . $settings['header_color'] . ' !important; }' . "\n";
     }
     if ($settings['header_img'] != '') {
         $output .= '#header { background-image: url( ' . $settings['header_img'] . ' ) !important; }' . "\n";
     }
     if ($settings['header_img'] != '' && $settings['header_repeat'] != '' && $settings['header_pos'] != '') {
         $output .= '#header { background-repeat: ' . $settings['header_repeat'] . ' !important; }' . "\n";
     }
     if ($settings['header_img'] != '' && $settings['header_pos'] != '') {
         $output .= '#header { background-position: ' . $settings['header_pos'] . ' !important; }' . "\n";
     }
     if ($settings['intro_color'] != '') {
         $output .= '#intro { background: ' . $settings['intro_color'] . ' !important; }' . "\n";
     }
     if ($settings['intro_img'] != '') {
         $output .= '#intro { background-image: url( ' . $settings['intro_img'] . ' ) !important; }' . "\n";
     }
     if ($settings['intro_img'] != '' && $settings['intro_repeat'] != '' && $settings['intro_pos'] != '') {
         $output .= '#intro { background-repeat: ' . $settings['intro_repeat'] . ' !important; }' . "\n";
     }
     if ($settings['intro_img'] != '' && $settings['intro_pos'] != '') {
         $output .= '#intro { background-position: ' . $settings['intro_pos'] . ' !important; }' . "\n";
     }
     if ($settings['slider_color'] != '') {
         $output .= '#featured { background: ' . $settings['slider_color'] . ' !important; }' . "\n";
     }
     if ($settings['slider_img'] != '') {
         $output .= '#featured { background-image: url( ' . $settings['slider_img'] . ' ) !important; }' . "\n";
     }
     if ($settings['slider_img'] != '' && $settings['slider_repeat'] != '' && $settings['slider_pos'] != '') {
         $output .= '#featured { background-repeat: ' . $settings['slider_repeat'] . ' !important; }' . "\n";
     }
     if ($settings['slider_img'] != '' && $settings['slider_pos'] != '') {
         $output .= '#featured { background-position: ' . $settings['slider_pos'] . ' !important; }' . "\n";
     }
     if ($settings['link_color'] != '') {
         $output .= 'a { color: ' . $settings['link_color'] . ' !important; }' . "\n";
     }
     if ($settings['link_hover_color'] != '') {
         $output .= 'a:hover, .post-more a:hover, .post-meta a:hover, .post p.tags a:hover { color: ' . $settings['link_hover_color'] . ' !important; }' . "\n";
     }
     if ($settings['button_color'] != '') {
         $output .= 'a.button, #commentform #submit, #contact-page .submit, body input[type="submit"] { background: ' . $settings['button_color'] . ' !important; border-color: ' . $settings['button_color'] . ' !important; filter: none; }' . "\n";
         $output .= 'a.button:hover, a.button.hover, a.button.active, #commentform #submit:hover, #contact-page .submit:hover, body input[type="submit"] { background: ' . $settings['button_color'] . ' !important; opacity: 0.9; }' . "\n";
     }
     if ($settings['navhover_color'] != '') {
         $output .= '.nav a:hover, .nav li ul, .nav li.current_page_item a, .nav li.current_page_parent a, .nav li.current-menu-ancestor a, .nav li.current-cat a, .nav li.li.current-menu-item a, .nav li:hover > a { background-color: ' . $settings['navhover_color'] . ' !important; }' . "\n";
     }
     // Output styles
     if (isset($output) && $output != '') {
         $output = strip_tags($output);
         $output = "<!-- Woo Custom Styling -->\n<style type=\"text/css\">\n" . $output . "</style>\n";
         echo $output;
     }
 }
开发者ID:jaiweb,项目名称:ASP,代码行数:78,代码来源:theme-actions.php


示例20: woo_custom_styling

 function woo_custom_styling()
 {
     $output = '';
     // Get options
     $settings = array('body_color' => '', 'body_img' => '', 'body_repeat' => '', 'body_pos' => '', 'body_attachment' => '', 'link_color' => '', 'link_hover_color' => '', 'button_color' => '');
     $settings = woo_get_dynamic_values($settings);
     // Type Check for Array
     if (is_array($settings)) {
         // Add CSS to output
         if ($settings['body_color'] != '') {
             $output .= 'body { background: ' . $settings['body_color'] . ' !important; }' . "\n";
         }
         if ($settings['body_img'] != '') {
             $body_image = $settings['body_img'];
             if (is_ssl()) {
                 $body_image = str_replace('http://', 'https://', $body_image);
             }
             $output .= 'body { background-image: url( ' . esc_url($body_image) . ' ) !important; }' . "\n";
         }
         if ($settings['body_img'] != '' && $settings['body_repeat'] != '' && $settings['body_pos'] != '') {
             $output .= 'body { background-repeat: ' . $settings['body_repeat'] . ' !important; }' . "\n";
         }
         if ($settings['body_img'] != '' && $settings['body_pos'] != '') {
             $output .= 'body { background-position: ' . $settings['body_pos'] . ' !important; }' . "\n";
         }
         if ($settings['body_img'] != '' && $settings['body_attachment'] != '') {
             $output .= 'body { background-attachment: ' . $settings['body_attachment'] . ' !important; }' . "\n";
         }
         if ($settings['link_color'] != '') {
             $output .= 'a { color: ' . $settings['link_color'] . ' !important; }' . "\n";
         }
         if ($settings['link_hover_color'] != '') {
             $output .= 'a:hover, .post-more a:hover, .post-meta a:hover, .post p.tags a:hover { color: ' . $settings['link_hover_color'] . ' !important; }' . "\n";
         }
         if ($settings['button_color'] != '') {
             $output .= 'a.button, a.comment-reply-link, #commentform #submit, #contact-page .submit { background: ' . $settings['button_color'] . ' !important; border-color: ' . $settings['button_color'] . ' !important; }' . "\n";
             $output .= 'a.button:hover, a.button.hover, a.button.active, a.comment-reply-link:hover, #commentform #submit:hover, #contact-page .submit:hover { background: ' . $settings['button_color'] . ' !important; opacity: 0.9; }' . "\n";
         }
     }
     // End If Statement
     // Output styles
     if (isset($output) && $output != '') {
         $output = strip_tags($output);
         $output = "\n" . "<!-- Woo Custom Styling -->\n<style type=\"text/css\">\n" . $output . "</style>\n";
         echo $output;
     }
 }
开发者ID:maesson,项目名称:lyft,代码行数:47,代码来源:theme-actions.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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