예제 #1
0
function extra_customizer_register_buttons_hover_styles_settings()
{
    return array('button_hover_font_size' => array('label' => __('Text Size', 'extra'), 'type' => 'range', 'default' => '14', 'input_attrs' => array('min' => 10, 'max' => 32, 'step' => 1), 'value_bind' => array('style' => 'dynamic_selectors_value_format', 'property_selectors' => array(array('property' => 'font-size', 'format' => '%value%px', 'selectors' => extra_get_dynamic_selector('buttons', ':hover'))))), 'button_hover_text_color' => array('label' => __('Text Color', 'extra'), 'type' => 'et_coloralpha', 'default' => 'rgba(0, 0, 0, 0.6)', 'value_bind' => array('style' => 'dynamic_selectors', 'property_selectors' => array('color' => extra_get_dynamic_selector('buttons', ':hover')))), 'button_hover_background_color' => array('label' => __('Background color', 'extra'), 'type' => 'et_coloralpha', 'default' => 'rgba(0,0,0,0.2)', 'value_bind' => array('style' => 'dynamic_selectors', 'property_selectors' => array('background-color' => extra_get_dynamic_selector('buttons', ':hover')))), 'button_hover_border_width' => array('label' => __('Border Width', 'extra'), 'type' => 'range', 'default' => 0, 'input_attrs' => array('min' => 0, 'max' => 10, 'step' => 1), 'value_bind' => array('style' => 'dynamic_selectors_value_format', 'property_selectors' => array(array('property' => 'border-width', 'format' => '%value%px', 'selectors' => extra_get_dynamic_selector('buttons', ':hover'))))), 'button_hover_border_color' => array('label' => __('Border Color', 'extra'), 'type' => 'et_coloralpha', 'default' => '#FFFFFF', 'value_bind' => array('style' => 'dynamic_selectors', 'property_selectors' => array('border-color' => extra_get_dynamic_selector('buttons', ':hover')))), 'button_hover_border_radius' => array('label' => __('Border Radius', 'extra'), 'type' => 'range', 'default' => 3, 'input_attrs' => array('min' => 0, 'max' => 50, 'step' => 1), 'value_bind' => array('style' => 'dynamic_selectors_value_format', 'property_selectors' => array(array('property' => 'border-radius', 'format' => '%value%px', 'selectors' => extra_get_dynamic_selector('buttons', ':hover'))))), 'button_hover_letter_spacing' => array('label' => __('Letter Spacing', 'extra'), 'type' => 'range', 'default' => 0, 'input_attrs' => array('min' => -1, 'max' => 8, 'step' => 1), 'value_bind' => array('style' => 'dynamic_selectors_value_format', 'property_selectors' => array(array('property' => 'letter-spacing', 'format' => '%value%px', 'selectors' => extra_get_dynamic_selector('buttons', ':hover'))))), 'button_hover_font_style' => array('label' => __('Font Style', 'extra'), 'type' => 'dropdown-font-styles', 'value_bind' => array('style' => 'dynamic_selectors_value_format_callback', 'value_format_callback' => 'extra_et_print_font_style_css_value', 'use_only_formatted_value' => true, 'property_selectors' => array('font-style' => extra_get_dynamic_selector('buttons', ':hover')))));
}
예제 #2
0
function extra_get_header_vars()
{
    $items = array();
    $header_items = array('header_social_icons', 'header_search_field', 'header_cart_total');
    foreach ($header_items as $header_item) {
        $items['show_' . $header_item] = extra_customizer_el_visible(extra_get_dynamic_selector($header_item));
        $items['output_' . $header_item] = $items['show_' . $header_item] || is_customize_preview();
    }
    $items['show_header_trending_bar'] = et_get_option('show_header_trending', 'on');
    $items['output_header_trending_bar'] = $items['show_header_trending_bar'] || is_customize_preview();
    $items['header_search_field_alone'] = false;
    $items['header_cart_total_alone'] = false;
    $items['secondary_nav'] = wp_nav_menu(array('theme_location' => 'secondary-menu', 'container' => '', 'fallback_cb' => '', 'menu_class' => 'nav', 'menu_id' => 'et-secondary-menu', 'echo' => false));
    $trending_posts = new WP_Query(apply_filters('extra_trending_posts_query', array('post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => '3', 'orderby' => 'comment_count', 'order' => 'DESC')));
    $items['trending_posts'] = isset($trending_posts->posts) ? $trending_posts : false;
    $items['top_info_defined'] = false;
    $top_info_items = array('show_header_social_icons', 'secondary_nav', 'show_header_trending_bar', 'show_header_search_field', 'show_header_cart_total');
    $top_info_items_count = 0;
    foreach ($top_info_items as $top_info_item) {
        if (!empty($items[$top_info_item])) {
            $top_info_items_count++;
            $items['top_info_defined'] = true;
        }
    }
    if (1 == $top_info_items_count) {
        if (!empty($items['show_header_search_field'])) {
            $items['header_search_field_alone'] = true;
            $items['show_header_search_field'] = false;
        }
        if (!empty($items['show_header_cart_total'])) {
            $items['header_cart_total_alone'] = true;
            $items['show_header_cart_total'] = false;
        }
        if ($items['header_search_field_alone'] || $items['header_cart_total_alone']) {
            $items['top_info_defined'] = false;
            add_filter('wp_nav_menu_items', 'extra_primary_nav_extended_items', 10, 2);
        }
    } elseif (is_customize_preview()) {
        add_filter('wp_nav_menu_items', 'extra_primary_nav_extended_items', 10, 2);
    }
    $items['header_style'] = et_get_option('header_style', 'left-right');
    $items['header_ad'] = extra_display_ad('header', false);
    $header_classes = array();
    if (!empty($items['header_style']) && 'centered' == $items['header_style']) {
        $header_classes[] = 'centered';
    } else {
        $header_classes[] = 'left-right';
    }
    if (!empty($header_ad)) {
        $header_classes[] = 'has_headerad';
    }
    $items['header_classes'] = extra_classes($header_classes, 'header', false);
    return $items;
}
예제 #3
0
" data-fixed-height="<?php 
    echo esc_attr(et_get_option('fixed_nav_logo_height', '51'));
    ?>
">
							<img src="<?php 
    echo esc_attr($logo);
    ?>
" alt="<?php 
    echo esc_attr(get_bloginfo('name'));
    ?>
" id="logo" />
						</a>

						<?php 
}
$et_navigation_classes = extra_classes(array(extra_customizer_selector_classes(extra_get_dynamic_selector('main-navigation'))), 'main-navigation', false);
?>

						<!-- ET Navigation -->
						<div id="et-navigation" class="<?php 
echo $et_navigation_classes;
?>
">
							<?php 
$menu_class = 'nav';
if ('on' == et_get_option('extra_disable_toptier')) {
    $menu_class .= ' et_disable_top_tier';
}
$primary_nav = wp_nav_menu(array('theme_location' => 'primary-menu', 'container' => '', 'fallback_cb' => '', 'menu_class' => 'nav', 'menu_id' => 'et-menu', 'echo' => false, 'walker' => new Extra_Walker_Nav_Menu(), 'header_search_field_alone' => $header_vars['header_search_field_alone'], 'header_cart_total_alone' => $header_vars['header_cart_total_alone']));
if (!$primary_nav) {
    ?>
예제 #4
0
파일: core.php 프로젝트: rthburke/fltHub
function extra_print_dynamic_styles_sidebar_width_css_output($output, $option_properties, $option_value)
{
    if ($option_value == $option_properties['default']) {
        return $output;
    }
    $main_column_with_sidebar = extra_get_dynamic_selector('main_column_with_sidebar');
    $main_column_width = 100 - $option_value;
    $output .= sprintf('%s {
			width: %s%%;
		}', esc_attr($main_column_with_sidebar), esc_attr($main_column_width));
    return $output;
}