Ejemplo n.º 1
0
/**
 * Defines global design variables. 
 * Todo: Not sure if we currently use them consistently.
 * @return none
 * @since 1.0
 */
function cuttz_global_vars()
{
    $all_customizations = cuttz_customization_aggregator();
    $customization = genesis_get_option('skin', CHILD_SETTINGS_FIELD_EXTRAS, false);
    if (empty($customization)) {
        define('SKIN', false);
        return;
    } else {
        define('SKIN', $customization);
    }
    if (is_array($all_customizations) && array_key_exists($customization, $all_customizations)) {
        $customization = $all_customizations[$customization];
        define('SKIN_DIR', $customization['dir']);
        define('SKIN_URL', $customization['url']);
        if (is_array($customization) && array_key_exists('functions', $customization)) {
            define('SKIN_FUNCTIONS', $customization['functions']);
        }
        if (is_array($customization) && array_key_exists('style', $customization)) {
            define('SKIN_STYLE', $customization['style']);
        }
        if (is_array($customization) && array_key_exists('sass', $customization)) {
            define('SKIN_SASS', $customization['sass']);
        }
        if (is_array($customization) && array_key_exists('screenshot', $customization)) {
            define('SKIN_SCREENSHOT', $customization['screenshot']);
        }
    }
    global $cuttz_admin_defaults;
    $cuttz_admin_defaults = cuttz_admin_defaults();
    global $cuttz_skin_defaults;
    $cuttz_skin_defaults = cuttz_skin_defaults();
}
Ejemplo n.º 2
0
/**
 * Generates and write or return CSS as per the design settings. Generates dynamic media queries.
 * @param array $settings (Design Settings)
 * @param bool $writecss 
 * @return string CSS or none
 * @since 1.0
 */
function cuttz_generate_css($settings = array(), $writecss = true)
{
    $writecss = (bool) $writecss;
    if (!is_array($settings) || $settings == false || empty($settings)) {
        /* In case there is no settings passed which is the case when doing after_theme_switch, Cuttz should check for the skin that is set in the admin settings field. Get it's settings and use them instead of dumbing back to vanilla
         */
        $skin = get_option(cuttz_get_skin_page_id());
        // try to get the settings of the current skin
        if (!$skin) {
            // If no settings exist/first-run then get the default settings.
            $skin = cuttz_skin_defaults();
        }
        $settings = cuttz_back_compat($skin);
    }
    // Global $cuttz_skin_defaults;
    $layout = $settings['layout'];
    $padding = (int) $settings['col-spacing'];
    $content_w_1col = (int) $settings['column-content-1col'];
    $content_w_2col = (int) $settings['column-content-2col'];
    $sb1_w_2col = (int) $settings['sidebar-one-2col'];
    $content_w_3col = (int) $settings['column-content-3col'];
    $sb1_w_3col = (int) $settings['sidebar-one-3col'];
    $sb2_w_3col = (int) $settings['sidebar-two-3col'];
    $site_bg_color = $settings['site-background-color'];
    $page_bg_color = $settings['page-background-color'];
    $primary_text_color = $settings['primary-text-color'];
    $form_text_color = $settings['form-text-color'];
    $primary_link_color = $settings['primary-link-color'];
    $primary_link_hover_color = $settings['primary-link-hover-color'];
    $form_font_family = $settings['form-font-family'];
    $form_font_family = cuttz_get_font_family($form_font_family);
    $body_font_family = $settings['body-font-family'];
    $body_font_family = cuttz_get_font_family($body_font_family);
    $body_font_weight = cuttz_get_font_weight($settings['body-font-weight']);
    $body_font_style = $settings['body-font-weight'];
    $nav_menu_font_family = $settings['nav-menu-font-family'];
    $nav_menu_font_family = cuttz_get_font_family($nav_menu_font_family);
    $nav_menu_font_weight = cuttz_get_font_weight($settings['nav-menu-font-weight']);
    $nav_menu_font_style = cuttz_get_font_style($settings['nav-menu-font-weight']);
    $subnav_menu_font_family = $settings['subnav-menu-font-family'];
    $subnav_menu_font_family = cuttz_get_font_family($subnav_menu_font_family);
    $subnav_menu_font_weight = cuttz_get_font_weight($settings['subnav-menu-font-weight']);
    $subnav_menu_font_style = cuttz_get_font_style($settings['subnav-menu-font-weight']);
    $site_title_font_family = $settings['site-title-font-family'];
    $site_title_font_family = cuttz_get_font_family($site_title_font_family);
    $site_title_font_weight = cuttz_get_font_weight($settings['site-title-font-weight']);
    $site_title_font_style = cuttz_get_font_style($settings['site-title-font-weight']);
    $site_description_font_family = $settings['site-description-font-family'];
    $site_description_font_family = cuttz_get_font_family($site_description_font_family);
    $site_description_font_weight = cuttz_get_font_weight($settings['site-description-font-weight']);
    $site_description_font_style = cuttz_get_font_style($settings['site-description-font-weight']);
    $headline_font_family = $settings['headline-font-family'];
    $headline_font_family = cuttz_get_font_family($headline_font_family);
    $headline_font_weight = cuttz_get_font_weight($settings['headline-font-weight']);
    $headline_font_style = cuttz_get_font_style($settings['headline-font-weight']);
    $headline_subhead_font_family = $settings['headline-subhead-font-family'];
    $headline_subhead_font_family = cuttz_get_font_family($headline_subhead_font_family);
    $headline_subhead_font_weight = cuttz_get_font_weight($settings['headline-subhead-font-weight']);
    $headline_subhead_font_style = cuttz_get_font_style($settings['headline-subhead-font-weight']);
    $byline_font_family = $settings['byline-font-family'];
    $byline_font_family = cuttz_get_font_family($byline_font_family);
    $byline_font_weight = cuttz_get_font_weight($settings['byline-font-weight']);
    $byline_font_style = cuttz_get_font_style($settings['byline-font-weight']);
    $sidebar_heading_font_family = $settings['sidebar-heading-font-family'];
    $sidebar_heading_font_family = cuttz_get_font_family($sidebar_heading_font_family);
    $sidebar_heading_font_weight = cuttz_get_font_weight($settings['sidebar-heading-font-weight']);
    $sidebar_heading_font_style = cuttz_get_font_style($settings['sidebar-heading-font-weight']);
    $sidebar_font_family = $settings['sidebar-font-family'];
    $sidebar_font_family = cuttz_get_font_family($sidebar_font_family);
    $sidebar_font_weight = cuttz_get_font_weight($settings['sidebar-font-weight']);
    $sidebar_font_style = cuttz_get_font_style($settings['sidebar-font-weight']);
    $footer_widgets_font_family = $settings['footer-widgets-font-family'];
    $footer_widgets_font_family = cuttz_get_font_family($footer_widgets_font_family);
    $footer_widgets_font_weight = cuttz_get_font_weight($settings['footer-widgets-font-weight']);
    $footer_widgets_font_style = cuttz_get_font_style($settings['footer-widgets-font-weight']);
    $footer_widgets_heading_font_family = $settings['footer-widgets-heading-font-family'];
    $footer_widgets_heading_font_family = cuttz_get_font_family($footer_widgets_heading_font_family);
    $footer_widgets_heading_font_weight = cuttz_get_font_weight($settings['footer-widgets-heading-font-weight']);
    $footer_widgets_heading_font_style = cuttz_get_font_style($settings['footer-widgets-heading-font-weight']);
    $footer_font_family = $settings['footer-font-family'];
    $footer_font_family = cuttz_get_font_family($footer_font_family);
    $footer_font_weight = cuttz_get_font_weight($settings['footer-font-weight']);
    $footer_font_style = cuttz_get_font_style($settings['footer-font-weight']);
    $body_font_size = (int) $settings['body-font-size'];
    $form_font_size = (int) $settings['form-font-size'];
    $nav_menu_font_size = (int) $settings['nav-menu-font-size'];
    $nav_menu_link_text_color = $settings['nav-menu-link-text-color'];
    $nav_menu_link_text_hover_color = $settings['nav-menu-link-text-hover-color'];
    $nav_menu_current_link_text_color = $settings['nav-menu-current-link-text-color'];
    $nav_menu_current_parent_link_text_color = $settings['nav-menu-current-parent-link-text-color'];
    $nav_menu_link_bg_color = $settings['nav-menu-link-bg-color'];
    $nav_menu_hover_bg_color = $settings['nav-menu-hover-bg-color'];
    $nav_menu_current_bg_color = $settings['nav-menu-current-bg-color'];
    $nav_menu_current_parent_bg_color = $settings['nav-menu-current-parent-bg-color'];
    $nav_menu_border_width = $settings['nav-menu-border-width'];
    $nav_menu_border_color = $settings['nav-menu-border-color'];
    $nav_menu_submenu_width = $settings['nav-menu-submenu-width'];
    $subnav_menu_font_size = (int) $settings['subnav-menu-font-size'];
    $subnav_menu_link_text_color = $settings['subnav-menu-link-text-color'];
    $subnav_menu_link_text_hover_color = $settings['subnav-menu-link-text-hover-color'];
    $subnav_menu_current_link_text_color = $settings['subnav-menu-current-link-text-color'];
    $subnav_menu_current_parent_link_text_color = $settings['subnav-menu-current-parent-link-text-color'];
    $subnav_menu_link_bg_color = $settings['subnav-menu-link-bg-color'];
    $subnav_menu_hover_bg_color = $settings['subnav-menu-hover-bg-color'];
    $subnav_menu_current_bg_color = $settings['subnav-menu-current-bg-color'];
    $subnav_menu_current_parent_bg_color = $settings['subnav-menu-current-parent-bg-color'];
    $subnav_menu_border_width = $settings['subnav-menu-border-width'];
    $subnav_menu_border_color = $settings['subnav-menu-border-color'];
    $subnav_menu_submenu_width = $settings['subnav-menu-submenu-width'];
    $site_title_font_size = (int) $settings['site-title-font-size'];
    $site_title_font_color = $settings['site-title-font-color'];
    $site_description_font_size = (int) $settings['site-description-font-size'];
    $site_description_font_color = $settings['site-description-font-color'];
    $headline_font_size = (int) $settings['headline-font-size'];
    $headline_font_color = $settings['headline-font-color'];
    $headline_subhead_font_color = $settings['headline-subhead-font-color'];
    $byline_font_size = (int) $settings['byline-font-size'];
    $byline_font_color = $settings['byline-font-color'];
    $sidebar_font_size = (int) $settings['sidebar-font-size'];
    $sidebar_font_color = $settings['sidebar-font-color'];
    $sidebar_heading_font_size = (int) $settings['sidebar-heading-font-size'];
    $sidebar_heading_font_color = $settings['sidebar-heading-font-color'];
    $footer_font_size = (int) $settings['footer-font-size'];
    $footer_font_color = $settings['footer-font-color'];
    $footer_widgets_font_size = (int) $settings['footer-widgets-font-size'];
    $footer_widgets_font_color = $settings['footer-widgets-font-color'];
    $footer_widgets_heading_font_size = (int) $settings['footer-widgets-heading-font-size'];
    $footer_widgets_heading_font_color = $settings['footer-widgets-heading-font-color'];
    if ($nav_menu_font_family == '0') {
        $nav_menu_font_family = $body_font_family;
    }
    if ($site_title_font_family == '0') {
        $site_title_font_family = $body_font_family;
    }
    if ($site_description_font_family == '0') {
        $site_description_font_family = $site_title_font_family;
    }
    if ($headline_font_family == '0') {
        $headline_font_family = $body_font_family;
    }
    if ($headline_subhead_font_family == '0') {
        $headline_subhead_font_family = $headline_font_family;
    }
    if ($sidebar_font_family == '0') {
        $sidebar_font_family = $body_font_family;
    }
    if ($sidebar_heading_font_family == '0') {
        $sidebar_heading_font_family = $sidebar_font_family;
    }
    if ($footer_font_family == '0') {
        $footer_font_family = $body_font_family;
    }
    $widths['three-two'] = $content_w_3col + $sb1_w_3col + $sb2_w_3col + $padding * 4 - 1;
    $widths['three-one'] = $content_w_3col + $sb1_w_3col + $padding * 3 - 1;
    $widths['three-zero'] = $content_w_3col + $padding * 2 - 1;
    $widths['two-one'] = $content_w_2col + $sb1_w_2col + $padding * 3 - 1;
    $widths['two-zero'] = $content_w_2col + $padding * 2 - 1;
    $widths['one-zero'] = $content_w_1col + $padding * 2 - 1;
    $widths['min-width'] = min($widths['three-zero'], $widths['two-zero'], $widths['one-zero']);
    $site_container_css = '.pagewidth .site-container {
	/* box-shadow:0 0 15px rgba(0,0,0,0.15); */
	margin:2.618em auto;
	}
	.fullwidth .site-container {
	margin:0 auto;
	}';
    $site_container_one_col = ".pagewidth.full-width-content .site-container {\n\twidth:" . ($widths['one-zero'] + 1) . "px;\n\t} ";
    $site_container_two_col = ".pagewidth.content-sidebar .site-container,\n\t.pagewidth.sidebar-content .site-container {\n\twidth:" . ($widths['two-one'] + 1) . "px;\n\t}";
    $site_container_three_col = ".pagewidth.content-sidebar-sidebar .site-container,\n\t.pagewidth.sidebar-sidebar-content .site-container,\n\t.pagewidth.sidebar-content-sidebar .site-container{\n\twidth:" . ($widths['three-two'] + 1) . "px;\n\t}";
    $site_container_three_two = '
	.pagewidth.content-sidebar-sidebar .site-container,
	.pagewidth.sidebar-sidebar-content .site-container,
	.pagewidth.sidebar-content-sidebar .site-container {
	width:' . ($widths['three-one'] + 1) . 'px;
	}';
    $site_container_three_one = '.pagewidth.content-sidebar-sidebar .site-container,
	.pagewidth.sidebar-sidebar-content .site-container,
	.pagewidth.sidebar-content-sidebar .site-container {
	width:' . ($widths['three-zero'] + 1) . 'px;
	}';
    $site_container_three_zero = '.pagewidth.content-sidebar-sidebar .site-container,
	.pagewidth.sidebar-sidebar-content .site-container,
	.pagewidth.sidebar-content-sidebar .site-container {
	width:auto;
	}';
    $site_container_two_one = '.pagewidth.sidebar-content .site-container,
	.pagewidth.content-sidebar .site-container {
	width:' . ($widths['two-zero'] + 1) . 'px;
	}';
    $site_container_two_zero = '.pagewidth.sidebar-content .site-container,
	.pagewidth.content-sidebar .site-container {
	width:auto;
	}';
    $site_container_one_zero = '.pagewidth.full-width-content .site-container {
	width:auto;
	}';
    $css = "\n\tinput, select, textarea {\n\tcolor: " . $form_text_color . ";\n\tfont-family:" . $form_font_family . ";\n\tfont-size:" . $form_font_size . "px;\n}\n\n/*! Layout */\n" . $site_container_css . "\n/*! 1 COL WIDTHS */\n" . $site_container_one_col . "\n\n.full-width-content .wrap {\n\tpadding-left:" . $padding . "px;\n\tpadding-right:" . $padding . "px;\n\twidth:" . ($content_w_1col + $padding * 2) . "px;\n}\n\n.full-width-content .content-sidebar-wrap,\n.full-width-content .content {\n\tfloat:none;\n}\n\n/*! 2 COL WIDTHS */\n\n" . $site_container_two_col . "\n\n.content-sidebar .wrap,\n.sidebar-content .wrap {\n\twidth:" . ($content_w_2col + $sb1_w_2col + $padding * 3) . "px;\n\tpadding-left:" . $padding . "px;\n\tpadding-right:" . $padding . "px;\n}\n\n.content-sidebar .content,\n.sidebar-content .content {\n\twidth:" . $content_w_2col . "px;\n}\n\n.content-sidebar .sidebar-primary,\n.sidebar-content .sidebar-primary {\n\twidth:" . $sb1_w_2col . "px;\n}\n\n/*! 3 COL WIDTHS */\n\n" . $site_container_three_col . "\n\n\n.content-sidebar-sidebar .wrap,\n.sidebar-sidebar-content .wrap,\n.sidebar-content-sidebar .wrap {\n\twidth:" . ($padding * 4 + $content_w_3col + $sb1_w_3col + $sb2_w_3col) . "px;\n\tpadding-left:" . $padding . "px;\n\tpadding-right:" . $padding . "px;\n}\n\n.content-sidebar-sidebar .content-sidebar-wrap,\n.sidebar-sidebar-content .content-sidebar-wrap,\n.sidebar-content-sidebar .content-sidebar-wrap {\n\twidth:" . ($content_w_3col + $sb1_w_3col + $padding) . "px; /* padding for content + sidebar */\n}\n\n.content-sidebar-sidebar .content,\n.sidebar-sidebar-content .content,\n.sidebar-content-sidebar .content {\n\twidth:" . $content_w_3col . "px; /* padding for content + sidebar */\n}\n\n.content-sidebar-sidebar .sidebar-primary,\n.sidebar-sidebar-content .sidebar-primary,\n.sidebar-content-sidebar .sidebar-primary {\n\twidth:" . $sb1_w_3col . "px; /* padding for content + sidebar */\n}\n\n.content-sidebar-sidebar .sidebar-secondary,\n.sidebar-sidebar-content .sidebar-secondary,\n.sidebar-content-sidebar .sidebar-secondary {\n\twidth:" . $sb2_w_3col . "px; /* padding for content + sidebar */\n}\n\n/*! BODY FONT-SZ */\nbody {\n\tbackground-color:" . $site_bg_color . ";\n\tfont-family:" . $body_font_family . ";\n\tcolor:" . $primary_text_color . ";\n\tfont-size:" . $body_font_size . "px;\n\tfont-weight:" . $body_font_weight . ";\n\tfont-style:" . $body_font_weight . ";\n}\n\n/*! PAGE BG */\n.wrap {\n\tbackground-color:" . $page_bg_color . ";\n}\n\n/*! LINKS  */\n\na {\n\tcolor:" . $primary_link_color . ";\n}\n\n/*! Pagination */\n\n.archive-pagination li a:hover, .archive-pagination li.active a, .woocommerce nav.woocommerce-pagination ul li a:focus, .woocommerce nav.woocommerce-pagination ul li a:hover, .woocommerce nav.woocommerce-pagination ul li span.current {\n\tbackground-color:" . $primary_link_color . ";\n}\n\n.widget-wrap > :not(.widget-title) a,\n.comment-content a {\n\ttext-decoration: underline;\n}\n\n.entry-content a:hover,\n.landing-section a:hover,\n.widget-wrap > :not(.widget-title) a:hover,\n.comment-content a:hover {\n\ttext-decoration: none;\n}\n\na:hover,\n.entry-title a:hover {\n\tcolor:" . $primary_link_hover_color . ";\n}\n\n.comment-content a {\n\tborder-bottom: none;\n}\n\n/*! SITE TITLE */\n.site-title {\n\tfont-family:" . $site_title_font_family . ";\n\tfont-size:" . $site_title_font_size . "px;\n\tfont-weight:" . $site_title_font_weight . ";\n\tfont-style:" . $site_title_font_style . ";\n}\n\n.site-title a {\n\tcolor:" . $site_title_font_color . ";\n}\n\n.site-description {\n\tfont-family:" . $site_description_font_family . ";\n\tfont-size:" . $site_description_font_size . "px;\n\tfont-weight:" . $site_description_font_weight . ";\n\tfont-style:" . $site_description_font_style . ";\n\tcolor:" . $site_description_font_color . ";\n}\n\n.entry-title,\n.archive-title,\n.woocommerce .page-title {\n\tfont-family: " . $headline_font_family . ";\n\tfont-size: " . $headline_font_size . "px;\n\tfont-weight: " . $headline_font_weight . ";\n\tfont-style: " . $headline_font_style . ";\n\tcolor:" . $headline_font_color . ";\n }\n\n.entry-title a {\n\tcolor:" . $headline_font_color . ";\n}\n\n.entry-content h1,\n.landing-section h1,\n.entry-content h2,\n.landing-section h2,\n.entry-content h3,\n.landing-section h3,\n.entry-content h4,\n.landing-section h4,\n.entry-content h5,\n.landing-section h5,\n.entry-content h6,\n.landing-section h6  {\n\tfont-family:" . $headline_subhead_font_family . ";\n\tcolor:" . $headline_subhead_font_color . ";\n\tfont-weight:" . $headline_subhead_font_weight . ";\n\tfont-style:" . $headline_subhead_font_style . ";\n}\n\n/*! NAV */\n\n.menu-primary {\n\tborder-bottom:" . $nav_menu_border_width . "px solid " . $nav_menu_border_color . ";\n\tborder-top:" . $nav_menu_border_width . "px solid " . $nav_menu_border_color . ";\n}\n\n.menu-primary .sub-menu {\n\tborder-left:" . ($nav_menu_border_width == 0 ? 0 : $nav_menu_border_width) . "px solid " . $nav_menu_border_color . ";\n\tmargin-left:-" . ($nav_menu_border_width == 0 ? 0 : $nav_menu_border_width) . "px;\n\tpadding-bottom:" . ($nav_menu_border_width == 0 ? 0 : $nav_menu_border_width) . "px;\n\tborder-top:" . $nav_menu_border_width . "px solid " . $nav_menu_border_color . ";\n}\n\n.rtl .menu-primary .sub-menu {\n\tborder-right:" . ($nav_menu_border_width == 0 ? 0 : $nav_menu_border_width) . "px solid " . $nav_menu_border_color . ";\n\tborder-left:0;\n\tmargin-right:-" . ($nav_menu_border_width == 0 ? 0 : $nav_menu_border_width) . "px;\n\tmargin-left:auto;\n}\n\n.menu-primary  li {\n\tfont-size:" . $nav_menu_font_size . "px;\n}\n\n.menu-primary a,\n.menu-toggle {\n\tfont-family:" . $nav_menu_font_family . ";\n\tfont-size:" . $nav_menu_font_size . "px;\n\tfont-weight:" . $nav_menu_font_weight . ";\n\tfont-style:" . $nav_menu_font_style . ";\n\tcolor:" . $nav_menu_link_text_color . ";\n\tbackground-color:" . $nav_menu_link_bg_color . ";\n}\n\n/*! redundant */\n.cuttz .genesis-nav-menu > .right {\n\tcolor:" . $nav_menu_link_text_color . ";\n\tfont-size:" . $nav_menu_font_size . "px;\n}\n\n.menu-primary .sub-menu {\n\t-webkit-box-shadow:  1px 3px 5px 0px rgba(0, 0, 0, .2);\n\t-webkit-box-shadow:  2px 2px 2px 0px rgba(0, 0, 0, .2);\n\tbox-shadow:  1px 3px 5px 0px rgba(0, 0, 0, .2);\n\tbox-shadow:  2px 2px 2px 0px rgba(0, 0, 0, .2);\n}\n\n/*! parent or parents parent/grandparent etc */\n.menu-primary .current-menu-ancestor > a {\n\tcolor:" . $nav_menu_current_parent_link_text_color . ";\n\tbackground-color:" . $nav_menu_current_parent_bg_color . ";\n}\n\n.menu-primary .current-menu-item > a {\n\tcolor:" . $nav_menu_current_link_text_color . ";\n\tbackground-color:" . $nav_menu_current_bg_color . ";\n}\n\n.menu-primary .sub-menu {\n\twidth:" . $nav_menu_submenu_width . "px;\n}\n\n.menu-primary a:hover {\n\tcolor:" . $nav_menu_link_text_hover_color . ";\n\tbackground-color:" . $nav_menu_hover_bg_color . ";\n}\n\n.nav-secondary {\n\tbackground-color:" . $subnav_menu_link_bg_color . ";\n\tborder-bottom:" . $subnav_menu_border_width . "px solid " . $subnav_menu_border_color . ";\n}\n\n.nav-secondary .wrap {\n\tbackground-color: transparent;\n}\n\n.menu-secondary .sub-menu {\n\tborder-left:" . ($subnav_menu_border_width == 0 ? 0 : $subnav_menu_border_width) . "px solid " . $subnav_menu_border_color . ";\n\tmargin-left:-" . ($subnav_menu_border_width == 0 ? 0 : $subnav_menu_border_width) . "px;\n\tpadding-bottom:" . ($subnav_menu_border_width == 0 ? 0 : $subnav_menu_border_width) . "px;\n\tborder-top:" . $subnav_menu_border_width . "px solid " . $subnav_menu_border_color . ";\n}\n\n.rtl .menu-secondary .sub-menu {\n\tborder-right:" . ($subnav_menu_border_width == 0 ? 0 : $subnav_menu_border_width) . "px solid " . $subnav_menu_border_color . ";\n\tborder-left:0;\n\tmargin-right:-" . ($subnav_menu_border_width == 0 ? 0 : $subnav_menu_border_width) . "px;\n\tmargin-left:0;\n}\n\n.menu-secondary  li {\n\tfont-size:" . $subnav_menu_font_size . "px;\n}\n\n.menu-secondary a,\n.menu-toggle {\n\tfont-family:" . $subnav_menu_font_family . ";\n\tfont-size:" . $subnav_menu_font_size . "px;\n\tfont-weight:" . $subnav_menu_font_weight . ";\n\tfont-style:" . $subnav_menu_font_style . ";\n\tcolor:" . $subnav_menu_link_text_color . ";\n\tbackground-color:" . $subnav_menu_link_bg_color . ";\n}\n\n.menu-secondary .sub-menu {\n\t-webkit-box-shadow:  1px 3px 5px 0px rgba(0, 0, 0, .2);\n\t-webkit-box-shadow:  2px 2px 2px 0px rgba(0, 0, 0, .2);\n\tbox-shadow:  1px 3px 5px 0px rgba(0, 0, 0, .2);\n\tbox-shadow:  2px 2px 2px 0px rgba(0, 0, 0, .2);\n}\n\n.menu-secondary .current-menu-ancestor > a {\n\tcolor:" . $subnav_menu_current_parent_link_text_color . ";\n\tbackground-color:" . $subnav_menu_current_parent_bg_color . ";\n}\n\n.menu-secondary .current-menu-item > a {\n\tcolor:" . $subnav_menu_current_link_text_color . ";\n\tbackground-color:" . $subnav_menu_current_bg_color . ";\n}\n\n.menu-secondary .sub-menu {\n\twidth:" . $subnav_menu_submenu_width . "px;\n}\n\n.rtl .menu-secondary .sub-menu .sub-menu {\n\tmargin-left: 0;\n}\n\n.menu-secondary a:hover {\n\tcolor:" . $subnav_menu_link_text_hover_color . ";\n\tbackground-color:" . $subnav_menu_hover_bg_color . ";\n}\n\n.menu-toggle {\n\tborder:" . $nav_menu_border_width . "px solid " . $nav_menu_border_color . ";\n\t}\n\n/*! BYLINES */\n.entry-meta,\n.entry-comments .comment-meta {\n\tfont-family:" . $byline_font_family . ";\n\tfont-size:" . $byline_font_size . "px;\n\tfont-weight:" . $byline_font_weight . ";\n\tfont-style:" . $byline_font_style . ";\n\tcolor:" . $byline_font_color . ";\n}\n\n/* */\n.entry-meta a,\n.entry-comments .comment-meta a {\n\tcolor:" . $byline_font_color . ";\n}\n\n\n.entry-meta a:hover {\n\tcolor:inherit;\n}\n\n/*! SB Widget Body */\n\n.widget-wrap {\n\tfont-family:" . $sidebar_font_family . ";\n\tfont-size:" . $sidebar_font_size . "px;\n\tfont-weight:" . $sidebar_font_weight . ";\n\tfont-style:" . $sidebar_font_style . ";\n\tcolor:" . $sidebar_font_color . ";\n}\n\n/*! SB Widget Title */\n.widget-title, .widgettitle {\n\tfont-family:" . $sidebar_heading_font_family . ";\n\tfont-size:" . $sidebar_heading_font_size . "px;\n\tfont-weight:" . $sidebar_heading_font_weight . ";\n\tfont-style:" . $sidebar_heading_font_style . ";\n\tcolor:" . $sidebar_heading_font_color . ";\n}\n\n.widget-title a, .widgettitle a {\n\tcolor:" . $sidebar_heading_font_color . ";\n}\n\n/*! Footer Widget Body */\n.footer-widgets .widget-wrap {\n\tfont-family:" . $footer_widgets_font_family . ";\n\tfont-size:" . $footer_widgets_font_size . "px;\n\tfont-weight:" . $footer_widgets_font_weight . ";\n\tfont-style:" . $footer_widgets_font_style . ";\n\tcolor:" . $footer_widgets_font_color . ";\n\t/* line-height:1.618em;  core */\n}\n\n/*! Footer Widgets Titles */\n.footer-widgets .widgettitle {\n\tfont-family:" . $footer_widgets_heading_font_family . ";\n\tfont-size:" . $footer_widgets_heading_font_size . "px;\n\tfont-weight:" . $footer_widgets_heading_font_weight . ";\n\tfont-style:" . $footer_widgets_heading_font_style . ";\n\tcolor:" . $footer_widgets_heading_font_color . ";\n}\n\n/*! Footer */\n.site-footer,\n#footer {\n\tfont-family:" . $footer_font_family . ";\n\tfont-size:" . $footer_font_size . "px;\n\tfont-weight:" . $footer_font_weight . ";\n\tfont-style:" . $footer_font_style . ";\n\tcolor:" . $footer_font_color . ";\n}\n\n.site-footer a,\n.site-footer a:hover {\n\tcolor:" . $footer_font_color . ";\n\tborder-bottom:1px solid " . $footer_font_color . ";\n\ttext-decoration:none;\n}\n\n.site-footer a:hover {\n\tborder-bottom-color: transparent;\n}\n\n.site-footer .cuttz-nav-footer a:hover {\n\tborder-bottom-color: " . $footer_font_color . ";\n}\n\n.full-width-content .content .sticky {\n\t_margin-left:-" . $padding . "px;\n\t_margin-right:-" . $padding . "px;\n\tpadding-left:" . $padding . "px;\n\tpadding-right:" . $padding . "px;\n\tpadding-top: " . $padding . "px;\n}\n\n.content-sidebar .content .sticky,\n.content-sidebar-sidebar .content .sticky {\n\tpadding-left:" . $padding . "px;\n\tpadding-right:" . $padding . "px;\n\t_margin-left:-" . $padding . "px;\n\tpadding-top: " . $padding . "px;\n}\n\n.rtl.content-sidebar .content .sticky,\n.rtl.content-sidebar-sidebar .content .sticky{\n\tmargin-left: initial;\n\t_margin-right:-" . $padding . "px;\n}\n\n.sidebar-content-sidebar .content .sticky {\n\tpadding-left:" . $padding . "px;\n\tpadding-right:" . $padding . "px;\n}\n\n.sidebar-content .content .sticky,\n.sidebar-sidebar-content .content .sticky {\n\tpadding-left:" . $padding . "px;\n\tpadding-right:" . $padding . "px;\n\t_margin-right:-" . $padding . "px;\n}\n\n.rtl.sidebar-content .content .sticky,\n.rtl.sidebar-sidebar-content .content .sticky {\n\t_margin-left:-" . $padding . "px;\n\tmargin-right: initial;\n}\n";
    $resp_css['three-two'] = '
		' . $site_container_three_two . '

		.content-sidebar-sidebar .wrap,
		.sidebar-content-sidebar .wrap,
		.sidebar-sidebar-content .wrap {
			width:' . ($content_w_3col + $sb1_w_3col + $padding * 3) . 'px;
		}
		.content-sidebar-sidebar .sidebar-secondary,
		.sidebar-content-sidebar .sidebar-secondary,
		.sidebar-sidebar-content .sidebar-secondary {
			float: none;
			clear: both;
			width: auto;
		}';
    $resp_css['three-one'] = '
		' . $site_container_three_one . '

		.content-sidebar-sidebar .wrap,
		.sidebar-content-sidebar .wrap,
		.sidebar-sidebar-content .wrap {
			width:' . ($content_w_3col + $padding * 2) . 'px;
			width: auto;
		}
		.content-sidebar-sidebar .wrap .content-sidebar-wrap,
		.sidebar-content-sidebar .wrap .content-sidebar-wrap,
		.sidebar-sidebar-content .wrap .content-sidebar-wrap {
			width:' . $content_w_3col . 'px;
			width: 100%;
		}
		.content-sidebar-sidebar .content,
		.sidebar-sidebar-content .content,
		.sidebar-content-sidebar .content {
			width: 100%;

		}
		.content-sidebar-sidebar .sidebar-primary,
		.sidebar-content-sidebar .sidebar-primary,
		.sidebar-sidebar-content .sidebar-primary {
			float: none;
			clear: both;
			width: auto;
		}
		.content-sidebar-sidebar .footer-widgets .widget-area,
		.sidebar-content-sidebar .footer-widgets .widget-area,
		.sidebar-sidebar-content .footer-widgets .widget-area {
			float: none;
			clear: both;
			display: block;
			width: auto;
		}';
    $resp_css['three-zero'] = '
		' . $site_container_three_zero . '
		.content-sidebar-sidebar .wrap,
		.sidebar-content-sidebar .wrap,
		.sidebar-sidebar-content .wrap {
			width:auto;
		}
		.content-sidebar-sidebar .wrap .content-sidebar-wrap,
		.sidebar-content-sidebar .wrap .content-sidebar-wrap,
		.sidebar-sidebar-content .wrap .content-sidebar-wrap {
			width:100%;
		}
		.content-sidebar-sidebar .content,
		.sidebar-content-sidebar .content,
		.sidebar-sidebar-content .content {
			width:100%;
		}
		.content-sidebar-sidebar .site-container,
		.sidebar-content-sidebar .site-container,
		.sidebar-sidebar-content .site-container{
			background-color:' . $page_bg_color . ';
		}
		.content-sidebar-sidebar .title-area,
		.sidebar-content-sidebar .title-area,
		.sidebar-sidebar-content .title-area {
			text-align: center;
		}
		.content-sidebar-sidebar .footer-widgets .widget-area,
		.sidebar-content-sidebar .footer-widgets .widget-area,
		.sidebar-sidebar-content .footer-widgets .widget-area {
			float: none;
			clear: both;
			display: block;
			width: auto;
		}';
    $resp_css['two-one'] = '
		' . $site_container_two_one . '

		.sidebar-content .wrap,
		.content-sidebar .wrap {
			width:' . ($content_w_2col + $padding * 2) . 'px;
			width: auto;
		}
		.sidebar-content .wrap .content-sidebar-wrap,
		.content-sidebar .wrap .content-sidebar-wrap {
			width:' . $content_w_2col . 'px;
			width: auto;

		}
		.content-sidebar .content,
		.sidebar-content .content {
			width: 100%;
		}
		.sidebar-content .sidebar-primary,
		.content-sidebar .sidebar-primary {
			float: none;
			clear: both;
			width: auto;
		}
		.sidebar-content .footer-widgets .widget-area,
		.content-sidebar .footer-widgets .widget-area {
			float: none;
			clear: both;
			width: auto;
			display: block;
		}';
    $resp_css['two-zero'] = '
		' . $site_container_two_zero . '
		.sidebar-content .wrap,
		.content-sidebar .wrap {
			width:auto;
		}
		.sidebar-content .wrap .content-sidebar-wrap,
		.content-sidebar .wrap .content-sidebar-wrap {
			width:100%;
		}
		.sidebar-content .content,
		.content-sidebar .content {
			width:100%;
		}
		.sidebar-content .site-container,
		.content-sidebar .site-container {
			background-color:' . $page_bg_color . ';
		}
		.sidebar-content .title-area,
		.content-sidebar .title-area {
			text-align: center;
		}
		.sidebar-content .footer-widgets .widget-area,
		.content-sidebar .footer-widgets .widget-area {
			float: none;
			clear: both;
			width: auto;
			display: block;
		}';
    $resp_css['one-zero'] = '
		' . $site_container_one_zero . '
		.full-width-content .wrap {
			width:auto;
		}
		.full-width-content .wrap .content-sidebar-wrap {
			width:100%;
		}
		.full-width-content .content {
			width:100%;
		}
		.full-width-content .site-container{
			background-color:' . $page_bg_color . ';
		}
		.full-width-content .title-area {
			text-align:center;
		}
		.full-width-content .footer-widgets .widget-area {
			float: none;
			clear: both;
			width: auto;
			display: block;
		}';
    $resp_css['min-width'] = '
		.content-sidebar-sidebar .wrap,
		.sidebar-content-sidebar .wrap,
		.sidebar-sidebar-content .wrap,
		.content-sidebar-sidebar .wrap,
		.sidebar-content-sidebar .wrap,
		.sidebar-sidebar-content .wrap,
		.sidebar-content .wrap,
		.content-sidebar .wrap,
		.sidebar-content .wrap,
		.content-sidebar .wrap,
		.full-width-content .wrap,
		.full-width-content .wrap {
			padding-left: 35px;
			padding-right: 35px;
		}
		.content-sidebar-sidebar .nav-primary .wrap,
		.sidebar-content-sidebar .nav-primary .wrap,
		.sidebar-sidebar-content .nav-primary .wrap,
		.content-sidebar-sidebar .nav-secondary .wrap,
		.sidebar-content-sidebar .nav-secondary .wrap,
		.sidebar-sidebar-content .nav-secondary .wrap,
		.sidebar-content .nav-primary .wrap,
		.content-sidebar .nav-primary .wrap,
		.sidebar-content .nav-secondary .wrap,
		.content-sidebar .nav-secondary .wrap,
		.full-width-content .nav-primary .wrap,
		.full-width-content .nav-secondary .wrap {
			padding: 0 0 0 0;
		}
		.nav-primary,
		.nav-secondary {
			margin-left: 35px;
			margin-right: 35px;
			display: none;
		}
		.genesis-nav-menu li,
		.site-header ul.genesis-nav-menu {
			float: none;
		}
		.menu-toggle,
		.sub-menu-toggle {
			display: block;
			visibility: visible;
		}
		.genesis-nav-menu .sub-menu {
			width: auto;
			box-shadow: none;
		}
		.genesis-nav-menu .sub-menu a {
			border-left:1px solid ' . $nav_menu_border_color . ';
		}
		.genesis-nav-menu .sub-menu li:first-child a {
			border-top: none;
		}
		.menu-toggle {
			margin-left: 35px;
			margin-right: 35px;
		}
		.menu-toggle:before {
			content: "\\2261\\00a0Menu";
		}
		.menu-toggle.activated:before {
			content: "\\2191\\00a0Menu";
		}
		.sub-menu-toggle:before {
			content: "+";
		}
		.sub-menu-toggle.activated:before {
			content: "-";
		}
		.genesis-nav-menu .menu-item {
			position: relative;
			display: block;
		}
		.nav-primary .genesis-nav-menu .sub-menu,
		.nav-secondary .genesis-nav-menu .sub-menu {
			display: none;
			opacity: 1;
			position: static;
			border-left: none;
		}
		.genesis-nav-menu .sub-menu .sub-menu {
			margin: 0;
		}
		.nav-primary .menu .sub-menu,
		.nav-secondary .menu .sub-menu {
			padding-left: 1.618em;
		}';
    $responsive = '';
    $media_queries_css = '';
    $resp_css = apply_filters('cuttz_media_queries', $resp_css, $widths, $settings);
    arsort($widths);
    $resp_css = sortArrayByArray($resp_css, $widths);
    foreach ($widths as $layout_css => $width) {
        $media_queries_css .= '@media only screen and (max-width: ' . $width . 'px) {' . "\n";
        $media_queries_css .= $resp_css[$layout_css];
        $media_queries_css .= '}' . "\n";
    }
    $css = apply_filters('cuttz_settings_css', $css, $settings, $widths);
    $css = $css . $media_queries_css;
    if (!$writecss) {
        return $css;
    }
    $layoutfile = cuttz_get_res('file', 'settingscss');
    touch($layoutfile);
    if (is_writable($layoutfile)) {
        $contents = cuttz_clean_css($css);
        $contents = apply_filters('cuttz_settings', $contents);
        $res = @fopen($layoutfile, 'w');
        if (is_resource($res)) {
            fwrite($res, $contents);
            fclose($res);
            wp_cache_flush();
        }
    } else {
        printf(__('<p>Cuttz Notice: The %s file is not writable.</p>', 'cuttz-framework'), $layoutfile);
    }
    $cuttz_debug = cuttz_get_res('dir') . 'debug.css';
    file_put_contents($cuttz_debug, apply_filters('cuttz_settings', $css));
    //llog($css);
}
 function __construct()
 {
     $page_id = cuttz_get_skin_page_id();
     $menu_ops = array('submenu' => array('parent_slug' => __('genesis', 'cuttz-framework'), 'page_title' => sprintf(__('&#8220;%s&#8221; Skin Design &mdash; Cuttz Framework', 'cuttz-framework'), cuttz_get_skin_page_title()), 'menu_title' => __('Cuttz Skin Design', 'cuttz-framework')));
     $page_ops = array('screen_icon' => 'themes', 'save_button_text' => sprintf(__('Save %s Options', 'cuttz-framework'), cuttz_get_skin_page_title()), 'reset_button_text' => sprintf(__('Reset %s To Defaults', 'cuttz-framework'), cuttz_get_skin_page_title()));
     $settings_field = cuttz_get_skin_page_id();
     $this->cuttz_fonts = cuttz_get_super_fonts();
     $this->create($page_id, $menu_ops, $page_ops, $settings_field, cuttz_skin_defaults());
     add_action('genesis_settings_sanitizer_init', array($this, 'sanitization_filters'));
     add_action('admin_print_styles', array($this, 'styles'));
 }