示例#1
0
function dreamway_setup()
{
    $defaults = sgwindow_get_defaults();
    load_child_theme_textdomain('dreamway', get_stylesheet_directory() . '/languages');
    $args = array('default-image' => get_stylesheet_directory_uri() . '/img/header.jpg', 'header-text' => true, 'default-text-color' => '000', 'width' => absint(sgwindow_get_theme_mod('size_image')), 'height' => absint(sgwindow_get_theme_mod('size_image_height')), 'flex-height' => true, 'flex-width' => true);
    add_theme_support('custom-header', $args);
    remove_action('sgwindow_empty_sidebar_before_footer-home', 'sgwindow_the_footer_sidebar_widgets', 20);
    remove_action('sgwindow_empty_sidebar_top-home', 'sgwindow_the_top_sidebar_widgets', 20);
    remove_action('sgwindow_empty_column_2-portfolio-page', 'sgwindow_right_sidebar_portfolio', 20);
    remove_action('admin_menu', 'sgwindow_admin_page');
}
示例#2
0
/**
 * Add new fields to customizer, create panel 'Other' and register postMessage support for site title and description for the Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Customizer object.
 * @since SG Window 1.0.0
 */
function sgwindow_customize_register_other($wp_customize)
{
    $defaults = sgwindow_get_defaults();
    $wp_customize->add_panel('other', array('priority' => 106, 'title' => __('Customize Other Settings', 'sg-window'), 'description' => __('All other settings.', 'sg-window')));
    $section_priority = 10;
    //New section in customizer: Logotype
    $wp_customize->add_section('sgwindow_theme_logotype', array('title' => __('Logotype', 'sg-window'), 'priority' => $section_priority++, 'panel' => 'other'));
    //New setting in Logotype section: Logo Image
    $wp_customize->add_setting('logotype_url', array('default' => get_template_directory_uri() . '/img/logo.png', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sgwindow_sanitize_url'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'logotype_url', array('label' => __('Logotype Image', 'sg-window'), 'section' => 'sgwindow_theme_logotype', 'settings' => 'logotype_url', 'priority' => '1')));
    //New section in customizer: Fixed Background
    $wp_customize->add_section('column_background_url', array('title' => __('Fixed Background', 'sg-window'), 'priority' => $section_priority++, 'panel' => 'background'));
    //column background image
    $wp_customize->add_setting('column_background_url', array('default' => $defaults['column_background_url'], 'transport' => 'postMessage', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sgwindow_sanitize_background_url'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'column_background_url', array('label' => __('Site Background', 'sg-window'), 'section' => 'column_background_url', 'settings' => 'column_background_url', 'priority' => 1)));
    //background position
    $wp_customize->add_setting('top', array('default' => $defaults['top'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sgwindow_sanitize_background_position'));
    $wp_customize->add_control('top', array('label' => __('Vertical position', 'sg-window'), 'section' => 'column_background_url', 'settings' => 'top', 'type' => 'select', 'priority' => 2, 'choices' => array('top' => __('Top', 'sg-window'), 'center' => __('Center', 'sg-window'), 'bottom' => __('Bottom', 'sg-window'))));
    //New section in customizer: Navigation Options
    $wp_customize->add_section('sgwindow_nav_options', array('title' => __('Navigation menu settings', 'sg-window'), 'priority' => $section_priority++, 'panel' => 'navigation'));
    //New setting in Navigation section: Switch On First Top Menu
    $wp_customize->add_setting('is_show_top_menu', array('default' => $defaults['is_show_top_menu'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sgwindow_sanitize_checkbox'));
    $wp_customize->add_control('is_show_top_menu', array('label' => __('Switch On First Top Menu', 'sg-window'), 'section' => 'sgwindow_nav_options', 'settings' => 'is_show_top_menu', 'type' => 'checkbox', 'priority' => $section_priority++, 'panel' => 'other'));
    //New setting in Navigation section: Switch On Second Top Menu
    $wp_customize->add_setting('is_show_secont_top_menu', array('default' => $defaults['is_show_secont_top_menu'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sgwindow_sanitize_checkbox'));
    $wp_customize->add_control('sgwindow_is_show_secont_top_menu', array('label' => __('Switch On Second Top Menu', 'sg-window'), 'section' => 'sgwindow_nav_options', 'settings' => 'is_show_secont_top_menu', 'type' => 'checkbox', 'priority' => 22));
    //New setting in Navigation section: Switch On Footer Menu
    $wp_customize->add_setting('is_show_footer_menu', array('default' => $defaults['is_show_footer_menu'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sgwindow_sanitize_checkbox'));
    $wp_customize->add_control('sgwindow_is_show_footer_menu', array('label' => __('Switch On Footer Menu', 'sg-window'), 'section' => 'sgwindow_nav_options', 'settings' => 'is_show_footer_menu', 'type' => 'checkbox', 'priority' => 23));
    //New section in the customizer: Scroll To Top Button
    $wp_customize->add_section('sgwindow_scroll', array('title' => __('Scroll To Top Button', 'sg-window'), 'priority' => $section_priority++, 'panel' => 'other'));
    $wp_customize->add_setting('scroll_button', array('default' => $defaults['scroll_button'], 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'sgwindow_sanitize_scroll_button'));
    $wp_customize->add_control('scroll_button', array('label' => __('How to display the scroll to top button', 'sg-window'), 'section' => 'sgwindow_scroll', 'settings' => 'scroll_button', 'type' => 'select', 'priority' => 1, 'choices' => array('none' => __('None', 'sg-window'), 'right' => __('Right', 'sg-window'), 'left' => __('Left', 'sg-window'), 'center' => __('Center', 'sg-window'))));
    $wp_customize->add_setting('scroll_animate', array('default' => $defaults['scroll_animate'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sgwindow_sanitize_scroll_effect'));
    $wp_customize->add_control('scroll_animate', array('label' => __('How to animate the scroll to top button', 'sg-window'), 'section' => 'sgwindow_scroll', 'settings' => 'scroll_animate', 'type' => 'select', 'priority' => 1, 'choices' => array('none' => __('None', 'sg-window'), 'move' => __('Jump', 'sg-window'))));
    //New section in the customizer: Favicon
    $wp_customize->add_section('sgwindow_favicon', array('title' => __('Favicon', 'sg-window'), 'description' => __('You can select an Icon to be shown at the top of browser window by uploading from your computer. (Size: [16X16] px)', 'sg-window'), 'priority' => $section_priority++, 'panel' => 'other'));
    $wp_customize->add_setting('favicon', array('default' => $defaults['favicon'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sgwindow_sanitize_url'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'favicon', array('label' => __('Favicon', 'sg-window'), 'section' => 'sgwindow_favicon', 'settings' => 'favicon', 'priority' => '1')));
    sgwindow_create_social_icons_section($wp_customize);
    $wp_customize->add_setting('is_header_on_front_page_only', array('default' => $defaults['is_header_on_front_page_only'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sgwindow_sanitize_checkbox'));
    $wp_customize->add_control('is_header_on_front_page_only', array('label' => __('Display Header Image on the Front Page only', 'sg-window'), 'section' => 'header_image', 'settings' => 'is_header_on_front_page_only', 'type' => 'checkbox', 'priority' => 40));
    $wp_customize->add_setting('is_text_on_front_page_only', array('default' => $defaults['is_text_on_front_page_only'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sgwindow_sanitize_checkbox'));
    $wp_customize->add_control('is_text_on_front_page_only', array('label' => __('Display Header Text on the Front Page only', 'sg-window'), 'section' => 'header_image', 'settings' => 'is_text_on_front_page_only', 'type' => 'checkbox', 'priority' => 41));
    $wp_customize->add_section('check', array('title' => __('--', 'sg-window'), 'priority' => 200, 'panel' => 'other'));
    if ('' == sgwindow_get_theme_mod('are_we_saved', '')) {
        $wp_customize->add_setting('are_we_saved', array('type' => 'theme_mod', 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sgwindow_sanitize_checkbox'));
        $wp_customize->add_control('are_we_saved', array('label' => __('--', 'sg-window'), 'section' => 'check', 'settings' => 'are_we_saved', 'type' => 'checkbox', 'priority' => 1));
    }
    $wp_customize->add_setting('max_id', array('type' => 'theme_mod', 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint'));
    $wp_customize->add_control('max_id', array('label' => __('Max id', 'sg-window'), 'section' => 'check', 'settings' => 'max_id', 'type' => 'input'));
}
 function __construct()
 {
     $defaults = sgwindow_get_defaults();
     $this->color_scheme = sgwindow_get_theme_mod('color_scheme', $defaults['color_scheme']);
     $this->add_scheme(0, __('Blue', 'sg-window'));
     $this->add_scheme(1, __('Green', 'sg-window'));
     $this->add_scheme(2, __('Blue-White', 'sg-window'));
     $section_id = 'main_colors';
     $section_priority = 10;
     $p = 10;
     $this->add_section($section_id, __('Main Colors', 'sg-window'), __('Main website colors', 'sg-window'), $section_priority++);
     /* colors */
     $i = 'link_color';
     $this->add_color($i, $section_id, __('Link', 'sg-window'), $p++, false);
     $this->set_color($i, 0, '#1e73be');
     $this->set_color($i, 1, '#b7ba2a');
     $this->set_color($i, 2, '#1e73be');
     $i = 'heading_color';
     $this->add_color($i, $section_id, __('H1-H6 heading', 'sg-window'), $p++, false);
     $this->set_color($i, 0, '#3f3f3f');
     $this->set_color($i, 1, '#141414');
     $this->set_color($i, 2, '#3f3f3f');
     $i = 'heading_link';
     $this->add_color($i, $section_id, __('H1-H6 Link', 'sg-window'), $p++, false);
     $this->set_color($i, 0, '#1e73be');
     $this->set_color($i, 1, '#b7ba2a');
     $this->set_color($i, 2, '#1e73be');
     $i = 'description_color';
     $this->add_color($i, $section_id, __('Description', 'sg-window'), $p++, false);
     $this->set_color($i, 0, '#ffffff');
     $this->set_color($i, 1, '#fff');
     $this->set_color($i, 2, '#ffffff');
     $i = 'hover_color';
     $this->add_color($i, $section_id, __('Link Hover', 'sg-window'), $p++, false, 'refresh');
     $this->set_color($i, 0, '#45d61d');
     $this->set_color($i, 1, '#dd3333');
     $this->set_color($i, 2, '#45d61d');
     add_action('customize_register', array($this, 'sgwindow_create_colors_controls'), 21);
     add_action('sgwindow_option_defaults', array($this, 'sgwindow_add_defaults'));
     add_action('customize_controls_print_scripts', array($this, 'sgwindow_print_customizer_js_colors'));
 }
示例#4
0
function sgwindow_print_customizer_js_colors()
{
    $defaults = sgwindow_get_defaults();
    $fields = array('body_font_size' => $defaults['body_font_size'], 'heading_font_size' => $defaults['heading_font_size'], 'heading_weight' => $defaults['heading_weight'], 'header_font' => $defaults['header_font'], 'heading_font' => $defaults['heading_font'], 'body_font' => $defaults['body_font']);
    sgwindow_print_reset($fields, 'reset_fonts');
}
示例#5
0
/**
 * Sanitize content/column direction.
 *
 * @param string $value Value to sanitize. 
 * @return int sanitized value.
 * @since SG Window 1.0.0
 */
function sgwindow_sanitize_content_column($value)
{
    $defaults = sgwindow_get_defaults();
    $possible_values = array('c_1_2', 'c_2_1', '1_c_2', '2_c_1', '1_2_c', '2_1_c');
    return in_array($value, $possible_values) ? $value : $defaults['columns_direction'];
}
示例#6
0
        public function render_content()
        {
            ?>
			<form>
			<input type="button" value="<?php 
            echo esc_attr($this->label);
            ?>
" onclick="window.open('<?php 
            echo esc_url($this->value());
            ?>
')" />
			</form>
			<?php 
        }
    }
    $defaults = sgwindow_get_defaults();
    $wp_customize->add_panel('info', array('priority' => 0, 'title' => __('Info', 'sg-window'), 'description' => __('Info and Links.', 'sg-window')));
    $section_priority = 10;
    //New section in customizer: Support
    $wp_customize->add_section('support', array('title' => __('Support', 'sg-window'), 'description' => __('Got something to say? Need help?', 'sg-window'), 'priority' => $section_priority++, 'panel' => 'info'));
    //Support button
    $wp_customize->add_setting('support_url', array('type' => 'empty', 'default' => 'https://wordpress.org/support/theme/sg-window', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sgwindow_sanitize_url'));
    $wp_customize->add_control(new SGWindow_Customize_Button_Control($wp_customize, 'support_url', array('label' => __('View Support forum', 'sg-window'), 'description' => __('View Support forum', 'sg-window'), 'section' => 'support', 'settings' => 'support_url', 'priority' => 10)));
    //New section in customizer: Rate
    $wp_customize->add_section('rate', array('title' => __('Rate on WordPress.org', 'sg-window'), 'description' => __('Share your thoughts about this theme. Your opinion is important for further improvement.', 'sg-window'), 'priority' => $section_priority++, 'panel' => 'info'));
    // Rate button
    $wp_customize->add_setting('rate_url', array('type' => 'empty', 'default' => 'https://wordpress.org/support/view/theme-reviews/sg-window#postform', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sgwindow_sanitize_url'));
    $wp_customize->add_control(new SGWindow_Customize_Button_Control($wp_customize, 'rate_url', array('label' => __('Rate', 'sg-window'), 'description' => __('Rate', 'sg-window'), 'section' => 'rate', 'settings' => 'rate_url', 'priority' => 10)));
    // How to use
    // New section in customizer: How to use
    $wp_customize->add_section('howto', array('title' => __('Help', 'sg-window'), 'priority' => $section_priority++, 'panel' => 'info'));
示例#7
0
/**
 * Print Favicon.
 *
 * @since SG Window 1.0.0
 */
function sgwindow_hook_favicon()
{
    $defaults = sgwindow_get_defaults();
    ?>
	<?php 
    if (get_theme_mod('favicon', $defaults['favicon']) != '') {
        ?>
		<link rel="shortcut icon" href="<?php 
        echo esc_url(get_theme_mod('favicon', $defaults['favicon']));
        ?>
" />
	<?php 
    }
}
/**
 * Return sidebar slug for the page with given id
 *
 * @return string sidebar slug or null
 * @since SG Window 1.0.0
 */
function sgwindow_get_page_sidebar_slug($page_id)
{
    $defaults = sgwindow_get_defaults();
    /* check for per page sidebars */
    $page_sidebars = (array) get_theme_mod('page_sidebars', null);
    if (isset($page_sidebars[$page_id])) {
        $slug = 'page_' . $page_id;
        return $slug;
    } else {
        /* check for page sidebars */
        $is_active_sidebar = get_theme_mod('page', 'empty');
        if ('empty' != $is_active_sidebar) {
            $slug = 'page';
        } else {
            $slug = 'default';
        }
        return $slug;
    }
    return null;
}
示例#9
0
/**
 * Add custom styles to the header.
 *
 * @since SG Window 1.0.0
*/
function sgwindow_hook_css()
{
    $defaults = sgwindow_get_defaults();
    $position = sgwindow_column_dir();
    $top = get_theme_mod('top', $defaults['top']);
    ?>
	<style type="text/css"> 	
		<?php 
    if (!display_header_text()) {
        ?>
			.site-title,
			.site-description {
				clip: rect(1px 1px 1px 1px); /* IE7 */
				clip: rect(1px, 1px, 1px, 1px);
				position: absolute;
			}
		<?php 
    }
    ?>
		
		<?php 
    if ('1' != sgwindow_get_theme_mod('blog_is_entry_meta')) {
        ?>
		
			.flex .entry-meta,
			.flex .entry-meta a {
				font-size: 0;
			}
		
		<?php 
    } else {
        ?>
		
			.flex .entry-meta,
			.flex .entry-meta a {
				font-size: 12px;
			}
			
		<?php 
    }
    ?>
		
		.site-title h1,
		.site-title a {
			color: #<?php 
    echo esc_attr(get_header_textcolor());
    ?>
;
		}
		
		.background-fixed {
			bckground: repeat  <?php 
    echo esc_attr($top);
    ?>
 center fixed;
			background-image: url(<?php 
    echo esc_url(sgwindow_get_theme_mod('column_background_url'));
    ?>
);		
		}
		
		.site-content {
			-ms-flex-order: <?php 
    echo $position['content'];
    ?>
;     
			-webkit-order: <?php 
    echo $position['content'];
    ?>
;     
			order: <?php 
    echo $position['content'];
    ?>
;
		}
		
		.sidebar-1 {
			-ms-flex-order: <?php 
    echo $position['column-1'];
    ?>
;     
			-webkit-order:  <?php 
    echo $position['column-1'];
    ?>
;  
			order:  <?php 
    echo $position['column-1'];
    ?>
;
		}

		.sidebar-2 {
			-ms-flex-order: <?php 
    echo $position['column-2'];
    ?>
; 
			-webkit-order:  <?php 
    echo $position['column-2'];
    ?>
;  
			order:  <?php 
    echo $position['column-2'];
    ?>
;
		}
		
		<?php 
    if ('1' != sgwindow_get_theme_mod('is_mobile_column_1')) {
        ?>
			.sidebar-1 {
				display: none;
			}
		<?php 
    }
    if ('1' != sgwindow_get_theme_mod('is_mobile_column_2')) {
        ?>
			.sidebar-2 {
				display: none;
			}
		<?php 
    }
    ?>
		
		
		.sidebar-before-footer,
		.header-wrap {
			max-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_image'));
    ?>
px;
		}
		
		.sidebar-before-footer,
		.header-wrap,
		.site {		
			max-width: <?php 
    echo esc_attr(get_theme_mod('width_site', $defaults['width_site']));
    ?>
px;
		}	

		.main-wrapper.no-sidebar {
			max-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_content_no_sidebar'));
    ?>
px;
		}	
		
		@media screen and (min-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('size_image'));
    ?>
px) {
			.image-wrapper {
				max-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('size_image'));
    ?>
px;
			}
		}
				
		.sidebar-footer .widget-area,
		.wide .widget > input,
		.wide .widget > form,
		.sidebar-before-footer .widget > div,
		.sidebar-before-footer .widget-area .widget > ul,
		.sidebar-top-full .widget-area .widget > div,
		.sidebar-top-full .widget-area .widget > ul {
			max-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_top_widget_area'));
    ?>
px;
			margin-left: auto;
			margin-right: auto;
		}
		
		.site .wide .widget-area .main-wrapper.no-sidebar {
			margin: 0 auto;
			max-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_main_wrapper'));
    ?>
px;
		}
		
		.sidebar-footer .widget-area,
		.wide .widget > input,
		.wide .widget > form,
		.sidebar-before-footer .widget > div,
		.sidebar-before-footer .widget-area .widget > ul,
		.sidebar-top-full .widget-area .widget > div,
		.sidebar-top-full .widget-area .widget > ul,
		.widget.sgwindow_side_bar .widget-title,
		.widget.sgwindow_side_bar .widgettitle,
		.text-container,
		.main-wrapper {
			max-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_main_wrapper'));
    ?>
px;
		}
		
		.my-image {
			height: <?php 
    echo esc_attr(sgwindow_get_theme_mod('parallax_image_height') / 4);
    ?>
px;
		}
		
		@media screen and (min-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_main_wrapper') / 3.5);
    ?>
px) {		
			.my-image {
				height: <?php 
    echo esc_attr(sgwindow_get_theme_mod('parallax_image_height') / 3.5);
    ?>
px;
			}
		}
		
		@media screen and (min-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_main_wrapper') / 3);
    ?>
px) {		
			.my-image {
				height: <?php 
    echo esc_attr(sgwindow_get_theme_mod('parallax_image_height') / 3);
    ?>
px;
			}
		}
		@media screen and (min-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_main_wrapper') / 2.5);
    ?>
px) {		
			.my-image {
				height: <?php 
    echo esc_attr(sgwindow_get_theme_mod('parallax_image_height') / 2.5);
    ?>
px;
			}
		}
		@media screen and (min-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_main_wrapper') / 2);
    ?>
px) {		
			.my-image {
				height: <?php 
    echo esc_attr(sgwindow_get_theme_mod('parallax_image_height') / 2);
    ?>
px;
			}
		}
		@media screen and (min-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_main_wrapper') / 1.5);
    ?>
px) {		
			.my-image {
				height: <?php 
    echo esc_attr(sgwindow_get_theme_mod('parallax_image_height') / 1.5);
    ?>
px;
			}
		}
		@media screen and (min-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_main_wrapper') / 1.2);
    ?>
px) {		
			.my-image {
				height: <?php 
    echo esc_attr(sgwindow_get_theme_mod('parallax_image_height'));
    ?>
px;
			}
		}
		
		/* set width of column in px */
		@media screen and (min-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_mobile_switch'));
    ?>
px) {
	
			.content {
				-ms-flex-order: 1;     
				-webkit-order: 1;  
				order: 1;
			}

			.sidebar-1 {
				-ms-flex-order: 2;     
				-webkit-order: 2;  
				order: 2;
			}

			.sidebar-2 {
				-ms-flex-order: 3;     
				-webkit-order: 3;  
				order: 3;
			}
		
			.main-wrapper {
				-webkit-flex-flow: nowrap;
				-ms-flex-flow: nowrap;
				flex-flow: nowrap;
			}
			
			.sidebar-1,
			.sidebar-2 {
				display: block;
			}
	
			.sidebar-1 .column {
				padding: 0 20px 0 0;
			}
			
			.sidebar-2 .column {
				padding: 0 0 0 20px;
			}
				
			.site-content {
				-ms-flex-order: 2;     
				-webkit-order: 2;  
				order: 2;
			}
	
			.sidebar-1 {
				-ms-flex-order: 1;     
				-webkit-order: 1;  
				order: 1;
			}

			.sidebar-2 {
				-ms-flex-order: 3;     
				-webkit-order: 3;  
				order: 3;
			}
			
			.two-sidebars .sidebar-1 {
				width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_column_1_rate'));
    ?>
%;
			}

			.two-sidebars .sidebar-2 {
				width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_column_2_rate'));
    ?>
%;
			}
			.two-sidebars .site-content {
				width: <?php 
    echo esc_attr(100 - sgwindow_get_theme_mod('width_column_2_rate') - sgwindow_get_theme_mod('width_column_1_rate'));
    ?>
%;
			}
			
			.left-sidebar .sidebar-1 {
				width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_column_1_left_rate'));
    ?>
%;
			}
			.left-sidebar .site-content {
				width: <?php 
    echo esc_attr(100 - sgwindow_get_theme_mod('width_column_1_left_rate'));
    ?>
%;
			}
			
			.right-sidebar .sidebar-2 {
				width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_column_1_right_rate'));
    ?>
%;
			}	
			.right-sidebar .site-content {
				width: <?php 
    echo esc_attr(100 - sgwindow_get_theme_mod('width_column_1_right_rate'));
    ?>
%;
			}	
		
			/* widget-sidebar */
			.sidebar-footer-content,
			.site .widget-sidebar-wrapper {

				-webkit-flex-flow: nowrap;
				-ms-flex-flow: nowrap;
				flex-flow: nowrap;
			}
			.my-sidebar-layout {
				margin: 20px 20px 20px 0;
				border: 1px solid #ccc;
			}
			.my-sidebar-layout:first-child {
				margin: 20px;
			}
			
		}
		
		@media screen and (min-width: <?php 
    echo esc_attr(sgwindow_get_theme_mod('width_main_wrapper'));
    ?>
px) {
			
			/* image widget */

			.wide .small.flex-column-2 .column-4 .element .entry-title,
			.wide .small.flex-column-2 .column-4 .element p,
			.wide .small.flex-column-2 .column-4 .element a,
			.wide .small.flex-column-2 .column-3 .element .entry-title,
			.wide .small.flex-column-2 .column-3 .element p,
			.wide .small.flex-column-2 .column-3 .element a {
				font-size: 14px;
			}
			
			.wide .small.flex-column-2 .column-2 .element .entry-title,
			.wide .small.flex-column-2 .column-1 .element .entry-title {
				display: block;
				font-size: 14px;
			}

			.wide .small.flex-column-2 .column-2 .element p,
			.wide .small.flex-column-2 .column-2 .element a,
			.wide .small.flex-column-2 .column-1 .element p,
			.wide .small.flex-column-2 .column-1 .element a {
				display: block;
				font-size: 14px;
			}
			
			.wide .small.flex-column-4 .column-2 .element .entry-title,
			.wide .small.flex-column-4 .column-1 .element .entry-title,
			.wide .small.flex-column-3 .column-2 .element .entry-title,
			.wide .small.flex-column-3 .column-2 .element .entry-title,
			.wide .small.flex-column-2 .column-2 .element .entry-title,
			.wide .small.flex-column-2 .column-1 .element .entry-title {
				display: block;
				font-size: 14px;
			}

			.wide .small.flex-column-4 .column-2 .element p,
			.wide .small.flex-column-4 .column-1 .element p,
			.wide .small.flex-column-3 .column-2 .element p,
			.wide .small.flex-column-3 .column-1 .element p {
				display: block;
				font-size: 12px;
			}
			
			.wide .small.flex-column-1 .column-4 .element .entry-title,
			.wide .small.flex-column-1 .column-3 .element .entry-title,
			.wide .small.flex-column-1 .column-4 .element .link,
			.wide .small.flex-column-1 .column-3 .element .link,
			.wide .small.flex-column-1 .column-4 .element p,
			.wide .small.flex-column-1 .column-3 .element p {
				font-size: 16px;
			}
			
			.wide .small.flex-column-1 .column-2 .element .entry-title,
			.wide .small.flex-column-1 .column-1 .element .entry-title,
			.wide .small.flex-column-1 .column-2 .element .link,
			.wide .small.flex-column-1 .column-1 .element .link,
			.wide .small.flex-column-1 .column-2 .element p,
			.wide .small.flex-column-1 .column-1 .element p {
				font-size: 18px;
			}
			
			.my-sidebar-layout {
				margin: 20px 20px 20px 0;
				border: 1px solid #ccc;
			}
			.my-sidebar-layout:first-child {
				margin: 20px 20px 20px 0;
			}
			.my-sidebar-layout:last-child {
				margin: 20px 0 20px 0;
			}
						
		}
		
	 }

	</style>
	<?php 
}
示例#10
0
/**
 * Return string Sanitized header style
 *
 * @since SG Window 1.0.0
 */
function sgwindow_sanitize_header_style($value)
{
    $defaults = sgwindow_get_defaults();
    $possible_values = array('boxed', 'full');
    return in_array($value, $possible_values) ? $value : $defaults['header_style'];
}