コード例 #1
0
ファイル: functions.php プロジェクト: plusplusminus/athol
/**
 * 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);
}
コード例 #2
0
ファイル: theme-js.php プロジェクト: brian3t/orchidmate
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()
}
コード例 #3
0
 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);
 }
コード例 #4
0
 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');
     }
 }
コード例 #5
0
    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 
        }
    }
コード例 #6
0
 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;
 }
コード例 #7
0
    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">
					<input type="text" name="EMAIL" class="required email" value="<?php 
                _e('E-mail', 'woothemes');
                ?>
"  id="mce-EMAIL" onfocus="if (this.value == '<?php 
                _e('E-mail', 'woothemes');
                ?>
') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php 
                _e('E-mail', 'woothemes');
                ?>
';}">
					<input type="submit" value="<?php 
                _e('Submit', 'woothemes');
                ?>
" name="subscribe" id="mc-embedded-subscribe" class="btn submit button">
				</form>
			</div>
			<!--End mc_embed_signup-->
			<?php 
            }
            ?>

			<?php 
            if ($social != 'on') {
                ?>
			<div class="social<?php 
                if ($related_posts == '' and $settings['connect_newsletter_id'] != "") {
                    echo ' fr';
                }
                ?>
">
		   		<?php 
                if ($settings['connect_rss'] == "true") {
                    ?>
		   		<a href="<?php 
                    if ($settings['feed_url']) {
                        echo esc_url($settings['feed_url']);
                    } else {
                        echo get_bloginfo_rss('rss2_url');
                    }
                    ?>
" class="subscribe" title="RSS"></a>

		   		<?php 
                }
                if ($settings['connect_twitter'] != "") {
                    ?>
		   		<a target="_blank" href="<?php 
                    echo esc_url($settings['connect_twitter']);
                    ?>
" class="twitter" title="Twitter"></a>

		   		<?php 
                }
                if ($settings['connect_facebook'] != "") {
                    ?>
		   		<a target="_blank" href="<?php 
                    echo esc_url($settings['connect_facebook']);
                    ?>
" class="facebook" title="Facebook"></a>

		   		<?php 
                }
                if ($settings['connect_youtube'] != "") {
                    ?>
		   		<a target="_blank" href="<?php 
                    echo esc_url($settings['connect_youtube']);
                    ?>
" class="youtube" title="YouTube"></a>

		   		<?php 
                }
                if ($settings['connect_flickr'] != "") {
                    ?>
		   		<a target="_blank" href="<?php 
                    echo esc_url($settings['connect_flickr']);
                    ?>
" class="flickr" title="Flickr"></a>

		   		<?php 
                }
                if ($settings['connect_linkedin'] != "") {
                    ?>
		   		<a target="_blank" href="<?php 
                    echo esc_url($settings['connect_linkedin']);
                    ?>
" class="linkedin" title="LinkedIn"></a>

		   		<?php 
                }
                if ($settings['connect_delicious'] != "") {
                    ?>
		   		<a target="_blank" href="<?php 
                    echo esc_url($settings['connect_delicious']);
                    ?>
" class="delicious" title="Delicious"></a>

		   		<?php 
                }
                if ($settings['connect_googleplus'] != "") {
                    ?>
		   		<a target="_blank" href="<?php 
                    echo esc_url($settings['connect_googleplus']);
                    ?>
" class="googleplus" title="Google+"></a>

				<?php 
                }
                if ($settings['connect_dribbble'] != "") {
                    ?>
		   		<a target="_blank" href="<?php 
                    echo esc_url($settings['connect_dribbble']);
                    ?>
" class="dribbble" title="Google+"></a>

				<?php 
                }
                if ($settings['connect_instagram'] != "") {
                    ?>
		   		<a target="_blank" href="<?php 
                    echo esc_url($settings['connect_instagram']);
                    ?>
" class="instagram" title="Google+"></a>

				<?php 
                }
                if ($settings['connect_vimeo'] != "") {
                    ?>
		   		<a target="_blank" href="<?php 
                    echo esc_url($settings['connect_vimeo']);
                    ?>
" class="vimeo" title="Google+"></a>

				<?php 
                }
                if ($settings['connect_pinterest'] != "") {
                    ?>
		   		<a target="_blank" href="<?php 
                    echo esc_url($settings['connect_pinterest']);
                    ?>
" class="pinterest" title="Google+"></a>

				<?php 
                }
                ?>
			</div>
			<?php 
            }
            ?>

		</div><!-- col-left -->

		<?php 
            if ($settings['connect_related'] == "true" and $related_posts != '') {
                ?>
		<div class="related-posts col-right">
			<h4><?php 
                _e('Related Posts:', 'woothemes');
                ?>
</h4>
			<?php 
                echo $related_posts;
                ?>
		</div><!-- col-right -->
		<?php 
                wp_reset_query();
            }
            ?>

        <div class="fix"></div>
	</aside>
	<?php 
        }
    }
コード例 #8
0
    /**
     * 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 
        }
    }
コード例 #9
0
 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;
 }
コード例 #10
0
    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 
    }
コード例 #11
0
ファイル: theme-woocommerce.php プロジェクト: klgrimley/mzf
    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;
    }
コード例 #12
0
ファイル: wooslider.php プロジェクト: plusplusminus/athol
/**
 * 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);
}
コード例 #13
0
ファイル: template.php プロジェクト: plusplusminus/athol
    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 
    }
コード例 #14
0
 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;
 }
コード例 #15
0
ファイル: theme-functions.php プロジェクト: jaiweb/ASP
 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;
 }
コード例 #16
0
 /**
  * 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;
 }
コード例 #17
0
ファイル: theme-actions.php プロジェクト: brian3t/orchidmate
 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;
     }
 }
コード例 #18
0
ファイル: template.php プロジェクト: plusplusminus/athol
 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']);
 }
コード例 #19
0
ファイル: theme-actions.php プロジェクト: jaiweb/ASP
 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;
     }
 }
コード例 #20
0
ファイル: theme-actions.php プロジェクト: maesson/lyft
 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;
     }
 }
コード例 #21
0
 function woo_display_social_icons()
 {
     $html = '';
     $name = get_bloginfo('name');
     $social_icons = array('rss' => __('Subscribe to our RSS feed', 'woothemes'), 'twitter' => sprintf(__('Follow %s on Twitter', 'woothemes'), $name), 'facebook' => sprintf(__('Like %s on Facebook', 'woothemes'), $name), 'youtube' => sprintf(__('Watch %s on YouTube', 'woothemes'), $name), 'flickr' => sprintf(__('Follow %s on Flickr', 'woothemes'), $name), 'linkedin' => sprintf(__('Connect with %s on LinkedIn', 'woothemes'), $name), 'delicious' => sprintf(__('Follow %s on Delicious', 'woothemes'), $name), 'googleplus' => sprintf(__('Friend %s on Google+', 'woothemes'), $name));
     $social_icons = (array) apply_filters('woo_contact_social_icons', $social_icons);
     $settings_keys = array();
     foreach (array_keys($social_icons) as $k => $v) {
         $settings_keys['connect_' . $v] = '';
     }
     $settings = woo_get_dynamic_values($settings_keys);
     if ('true' == $settings['connect_rss']) {
         $settings['connect_rss'] = get_feed_link();
     } else {
         $settings['connect_rss'] = '';
     }
     $html .= '<div id="connect">' . "\n";
     $html .= '<div class="social">' . "\n";
     foreach ($social_icons as $k => $v) {
         $class = $k;
         if ('rss' == $k) {
             $class = 'subscribe';
         }
         if ('' != $settings['connect_' . $k]) {
             $html .= '<a href="' . esc_url($settings['connect_' . $k]) . '" title="' . esc_attr($v) . '" class="' . $class . '"><span>' . $v . '</span></a>' . "\n";
         }
     }
     $html .= '</div>' . "\n";
     $html .= '</div>' . "\n";
     echo $html;
 }
コード例 #22
0
ファイル: theme-functions.php プロジェクト: udsacode/bird
function woo_social_icons()
{
    $settings = array('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);
    ?>
    <div class="social">

    	<?php 
    if (apply_filters('upstart_navigation_connect_header', true)) {
        ?>
	    	<h3><?php 
        _e('Connect', 'woothemes');
        ?>
</h3>
	    <?php 
    }
    ?>

	    <div class="social-icons">

	   		<?php 
    if ($settings['connect_rss'] == "true") {
        ?>
	   		<a target="_blank" href="<?php 
        if ($settings['feed_url']) {
            echo esc_url($settings['feed_url']);
        } else {
            echo get_bloginfo_rss('rss2_url');
        }
        ?>
" class="subscribe" title="RSS"></a>

	   		<?php 
    }
    if ($settings['connect_twitter'] != "") {
        ?>
	   		<a target="_blank" href="<?php 
        echo esc_url($settings['connect_twitter']);
        ?>
" class="twitter" title="Twitter"></a>

	   		<?php 
    }
    if ($settings['connect_facebook'] != "") {
        ?>
	   		<a target="_blank" href="<?php 
        echo esc_url($settings['connect_facebook']);
        ?>
" class="facebook" title="Facebook"></a>

	   		<?php 
    }
    if ($settings['connect_youtube'] != "") {
        ?>
	   		<a target="_blank" href="<?php 
        echo esc_url($settings['connect_youtube']);
        ?>
" class="youtube" title="YouTube"></a>

	   		<?php 
    }
    if ($settings['connect_flickr'] != "") {
        ?>
	   		<a target="_blank" href="<?php 
        echo esc_url($settings['connect_flickr']);
        ?>
" class="flickr" title="Flickr"></a>

	   		<?php 
    }
    if ($settings['connect_linkedin'] != "") {
        ?>
	   		<a target="_blank" href="<?php 
        echo esc_url($settings['connect_linkedin']);
        ?>
" class="linkedin" title="LinkedIn"></a>

	   		<?php 
    }
    if ($settings['connect_delicious'] != "") {
        ?>
	   		<a target="_blank" href="<?php 
        echo esc_url($settings['connect_delicious']);
        ?>
" class="delicious" title="Delicious"></a>

	   		<?php 
    }
    if ($settings['connect_googleplus'] != "") {
        ?>
	   		<a target="_blank" href="<?php 
        echo esc_url($settings['connect_googleplus']);
        ?>
" class="googleplus" title="Google+"></a>

			<?php 
    }
    if ($settings['connect_dribbble'] != "") {
        ?>
	   		<a target="_blank" href="<?php 
        echo esc_url($settings['connect_dribbble']);
        ?>
" class="dribbble" title="Dribbble"></a>

			<?php 
    }
    if ($settings['connect_instagram'] != "") {
        ?>
	   		<a target="_blank" href="<?php 
        echo esc_url($settings['connect_instagram']);
        ?>
" class="instagram" title="Instagram"></a>

			<?php 
    }
    if ($settings['connect_vimeo'] != "") {
        ?>
	   		<a target="_blank" href="<?php 
        echo esc_url($settings['connect_vimeo']);
        ?>
" class="vimeo" title="Vimeo"></a>

			<?php 
    }
    if ($settings['connect_pinterest'] != "") {
        ?>
	   		<a target="_blank" href="<?php 
        echo esc_url($settings['connect_pinterest']);
        ?>
" class="pinterest" title="Pinterest"></a>

			<?php 
    }
    ?>

		</div>

	</div> <?php 
}
コード例 #23
0
ファイル: single.php プロジェクト: jaiweb/ASP
 * This template is the default page template. It is used to display content when someone is viewing a
 * singular view of a post ('post' post_type).
 * @link http://codex.wordpress.org/Post_Types#Post
 *
 * @package WooFramework
 * @subpackage Template
 */
get_header();
global $woo_options;
/**
 * The Variables
 *
 * Setup default variables, overriding them if the "Theme Options" have been saved.
 */
$settings = array('thumb_single' => 'false', 'thumb_w' => 710, 'thumb_h' => 180, 'thumb_align' => 'alignleft');
$settings = woo_get_dynamic_values($settings);
?>
       
    <div id="content">
    	
    	<div class="col-full">
    		
    		<?php 
if (isset($woo_options['woo_breadcrumbs_show']) && $woo_options['woo_breadcrumbs_show'] == 'true') {
    ?>
				<section id="breadcrumbs">
					<?php 
    woo_breadcrumbs();
    ?>
				</section><!--/#breadcrumbs -->
			<?php 
コード例 #24
0
    /**
     * Load the layout width CSS without a media query wrapping it.
     * @since  5.0.13
     * @return void
     */
    function woo_load_site_width_css_nomedia()
    {
        $settings = woo_get_dynamic_values(array('layout_width' => 940));
        $layout_width = intval($settings['layout_width']);
        if (0 < $layout_width) {
            /* Has legitimate width */
        } else {
            $layout_width = 940;
        }
        // Default Width
        ?>

<!-- Adjust the website width -->
<style type="text/css">
.col-full, #wrapper  { width: <?php 
        echo intval($layout_width);
        ?>
px; }
</style>

<?php 
    }