Beispiel #1
0
/**
 * Adds custom classes to the array of body classes.
 *
 * @since Fruitful theme 1.0
 */
function fruitful_body_classes($classes)
{
    // Adds a class of group-blog to blogs with more than 1 published author
    if (is_multi_author()) {
        $classes[] = 'group-blog';
    }
    if (class_exists('Woocommerce')) {
        if (is_shop()) {
            $classes[] = 'shop-page ';
        }
    }
    $theme_options = fruitful_ret_options("fruitful_theme_options");
    if (isset($theme_options['responsive']) && $theme_options['responsive'] == 'on') {
        $classes[] = 'responsive';
    }
    return $classes;
}
Beispiel #2
0
function fruitful_get_logo_wh()
{
    $options = fruitful_ret_options("fruitful_theme_options");
    ?>
	<h4 class="full-width"><?php 
    _e('Width', 'fruitful');
    ?>
</h4>
	<input type="text" name="fruitful_theme_options[logo_w]"  id="logo-w" class="text-input" value ="<?php 
    if (!empty($options['logo_w'])) {
        echo intval($options['logo_w']);
    } else {
        echo '0';
    }
    ?>
"/>
	<h4 class="full-width"><?php 
    _e('Height', 'fruitful');
    ?>
</h4>
	<input type="text" name="fruitful_theme_options[logo_h]" id="logo-h"  class="text-input" value ="<?php 
    if (!empty($options['logo_h'])) {
        echo intval($options['logo_h']);
    } else {
        echo '0';
    }
    ?>
"/>
	<?php 
}
Beispiel #3
0
<!--[if lt IE 9]><script src="<?php 
echo get_template_directory_uri();
?>
/js/html5.js" type="text/javascript"></script><![endif]-->
<?php 
wp_head();
?>
 
</head> 
<body <?php 
body_class();
?>
>
	<div id="page-header" class="hfeed site">
	<?php 
$theme_options = fruitful_ret_options("fruitful_theme_options");
$logo_pos = $menu_pos = '';
if (isset($theme_options['logo_position'])) {
    $logo_pos = esc_attr($theme_options['logo_position']);
}
if (isset($theme_options['menu_position'])) {
    $menu_pos = esc_attr($theme_options['menu_position']);
}
$logo_pos_class = fruitful_get_class_pos($logo_pos);
$menu_pos_class = fruitful_get_class_pos($menu_pos);
$responsive_menu_type = esc_attr($theme_options['menu_type_responsive']);
$is_responsive = isset($theme_options['responsive']) && $theme_options['responsive'] == 'on';
if (!$is_responsive || $is_responsive && $responsive_menu_type == 'inside_content') {
    ?>
			
					<div class="head-container">
Beispiel #4
0
 function go_woo_tabs_center()
 {
     $style_ = $back_style = $woo_style_ = '';
     $theme_options = fruitful_ret_options("fruitful_theme_options");
     $style_ .= '@media only screen and (min-width: 1024px) {body.woocommerce div.product .woocommerce-tabs, body.woocommerce-page div.product .woocommerce-tabs, body.woocommerce #content div.product .woocommerce-tabs, body.woocommerce-page #content div.product .woocommerce-tabs {max-width : 100%; margin-top: 20px;}}' . "\n";
     wp_add_inline_style('main-style', fruitful_compress_code($style_));
     if ($woo_style_ != '') {
         wp_add_inline_style('woo-style', fruitful_compress_code($woo_style_));
     }
 }
Beispiel #5
0
 function fruitful_get_languages_list()
 {
     $theme_options = fruitful_ret_options("fruitful_theme_options");
     if (function_exists('icl_get_languages') && $theme_options['is_wpml_ready'] == 'on') {
         $languages = icl_get_languages('skip_missing=0');
         if (!empty($languages)) {
             echo '<div id="header_language_select"><ul id="lang-select-block">';
             foreach ($languages as $l) {
                 if ($l['active']) {
                     echo '<li class="current">';
                     echo '<a class="' . $l['language_code'] . '" href="' . $l['url'] . '" onclick="return false">';
                     echo $l['language_code'];
                     echo '</a>';
                     echo '<ul id="lang-select-popup">';
                     echo '<li class="active">';
                     echo '<a class="' . $l['language_code'] . '" href="' . $l['url'] . '" onclick="return false">';
                     echo $l['native_name'];
                     echo '</a>';
                     echo '</li>';
                 }
             }
             foreach ($languages as $l) {
                 if (!$l['active']) {
                     echo '<li class="unactive">';
                     echo '<a class="' . $l['language_code'] . '" href="' . $l['url'] . '">';
                     echo $l['native_name'];
                     echo '</a></li>';
                 }
             }
             echo '</ul>';
             echo '</li>';
             echo '</ul></div>';
         }
     }
 }