function hoot_get_custom_text_logo() { $title = ''; $logo_custom = apply_filters('hoot_logo_custom_text', hoot_sortlist(hoot_get_mod('logo_custom'))); if (is_array($logo_custom) && !empty($logo_custom)) { $lcount = 1; foreach ($logo_custom as $logo_custom_line) { if (!$logo_custom_line['sortitem_hide'] && !empty($logo_custom_line['text'])) { $line_class = 'site-title-line site-title-line' . $lcount; $line_class .= $logo_custom_line['font'] == 'standard' ? ' site-title-body-font' : ''; $line_class .= $logo_custom_line['font'] == 'heading' ? ' site-title-heading-font' : ''; $title .= '<span class="' . $line_class . '">' . esc_html($logo_custom_line['text']) . '</span>'; } $lcount++; } } return $title; }
/** * Registers widgetized template widget areas. * * @since 1.0.0 * @access public * @return void */ function hoot_widgetized_template_register_sidebars() { if (current_theme_supports('hoot-widgetized-template')) { $areas = array(); /* Set up defaults */ $defaults = apply_filters('hoot_widgetized_template_widget_areas', array('a', 'b', 'c', 'd', 'e')); $locations = array(__('Left', 'responsive-brix'), __('Center Left', 'responsive-brix'), __('Center', 'responsive-brix'), __('Center Right', 'responsive-brix'), __('Right', 'responsive-brix')); // Get user settings $sections = hoot_sortlist(hoot_get_mod('widgetized_template_sections')); foreach ($defaults as $key) { $id = "area_{$key}"; if (empty($sections[$id]['sortitem_hide'])) { $columns = isset($sections[$id]['columns']) ? $sections[$id]['columns'] : ''; $count = count(explode('-', $columns)); // empty $columns still returns array of length 1 $location = ''; for ($c = 1; $c <= $count; $c++) { switch ($count) { case 2: $location = $c == 1 ? $locations[0] : $locations[4]; break; case 3: $location = $c == 1 ? $locations[0] : ($c == 2 ? $locations[2] : $locations[4]); break; case 4: $location = $c == 1 ? $locations[0] : ($c == 2 ? $locations[1] : ($c == 3 ? $locations[3] : $locations[4])); } $areas[$id . '_' . $c] = sprintf(__('Widgetized Template - Area %s %s', 'responsive-brix'), strtoupper($key), $location); } } } foreach ($areas as $key => $name) { hoot_register_sidebar(array('id' => 'widgetized-template-' . $key, 'name' => $name, 'description' => __("You can order Widgetized Template areas in Customizer > 'Templates' panel > 'Widgetized Template' section.", 'responsive-brix'))); } } }
<div class="<?php echo $wt_content_grid; ?> "> <main <?php hoot_attr('page-template-content', $wt_content_context); ?> > <?php // Template modification Hook do_action('hoot_template_main_start', 'template-widgetized.php'); // Get Sections List $sections = hoot_sortlist(hoot_get_mod('widgetized_template_sections')); // Display Each Section according to ther sort order. if (is_array($sections) && !empty($sections)) { foreach ($sections as $key => $section) { if (empty($section['sortitem_hide'])) { $key = apply_filters('widgetized_template_sections_switch', $key); $section['columns'] = isset($section['columns']) ? $section['columns'] : '100'; switch ($key) { // Display Widget Areas case 'area_a': case 'area_b': case 'area_c': case 'area_d': case 'area_e': ?> <div id="widgetized-template-<?php
/** * Custom CSS built from user theme options * For proper sanitization, always use functions from hoot/includes/sanitization.php * and hoot/customizer/sanitization.php * * @since 1.0 * @access public */ function hoot_dynamic_cssrules() { /*** Settings Values ***/ /* Lite Settings */ $settings = array(); $settings['grid_width'] = intval(hoot_get_mod('site_width', 1260)) . 'px'; $settings['accent_color'] = hoot_get_mod('accent_color'); $settings['accent_color_dark'] = hoot_color_increase($settings['accent_color'], 10, 10); $settings['accent_font'] = hoot_get_mod('accent_font'); $settings['headings_fontface'] = hoot_get_mod('headings_fontface'); $settings['site_layout'] = hoot_get_mod('site_layout'); $settings['box_background_color'] = hoot_get_mod('box_background_color'); $settings['content_bg_color'] = $settings['site_layout'] == 'boxed' ? $settings['box_background_color'] : hoot_get_mod('background-color'); $settings['logo_background_type'] = hoot_get_mod('logo_background_type'); $settings['site_title_icon_size'] = hoot_get_mod('site_title_icon_size'); $settings['site_title_icon'] = hoot_get_mod('site_title_icon'); $settings['logo_image_width'] = hoot_get_mod('logo_image_width'); $settings['logo_image_width'] = intval($settings['logo_image_width']) ? intval($settings['logo_image_width']) . 'px' : '120px'; $settings['logo'] = hoot_get_mod('logo'); $settings['logo_custom'] = apply_filters('hoot_logo_custom_text', hoot_sortlist(hoot_get_mod('logo_custom'))); extract(apply_filters('hoot_custom_css_settings', $settings, 'lite')); /*** Add Dynamic CSS ***/ /* Hoot Grid */ hoot_add_css_rule(array('selector' => '.grid', 'property' => 'max-width', 'value' => $grid_width, 'idtag' => 'grid_width')); /* Base Typography and HTML */ hoot_add_css_rule(array('selector' => 'a', 'property' => 'color', 'value' => $accent_color, 'idtag' => 'accent_color')); // Overridden in premium hoot_add_css_rule(array('selector' => '.invert-typo', 'property' => array('background' => array($accent_color, 'accent_color'), 'color' => array($accent_font, 'accent_font')))); hoot_add_css_rule(array('selector' => '.invert-typo a, .invert-typo a:hover, .invert-typo h1, .invert-typo h2, .invert-typo h3, .invert-typo h4, .invert-typo h5, .invert-typo h6, .invert-typo .title', 'property' => 'color', 'value' => $accent_font, 'idtag' => 'accent_font')); hoot_add_css_rule(array('selector' => 'input[type="submit"], #submit, .button', 'property' => array('background' => array($accent_color, 'accent_color'), 'color' => array($accent_font, 'accent_font')))); hoot_add_css_rule(array('selector' => 'input[type="submit"]:hover, #submit:hover, .button:hover', 'property' => array('background' => array($accent_color_dark, 'accent_color'), 'color' => array($accent_font, 'accent_font')))); if ('cursive' != $headings_fontface) { // Override @headingsFontFamily if selected in options hoot_add_css_rule(array('selector' => 'h1, h2, h3, h4, h5, h6, .title, .titlefont', 'property' => array('font-family' => array('"Open Sans", sans-serif'), 'font-weight' => array('300'), 'color' => array('#000000')))); } /* Layout */ hoot_add_css_rule(array('selector' => 'body', 'property' => 'background', 'idtag' => 'background')); if ($site_layout == 'boxed') { hoot_add_css_rule(array('selector' => '#page-wrapper', 'property' => 'background', 'value' => $box_background_color, 'idtag' => 'box_background_color')); } /* Header (Topbar, Header, Main Nav Menu) */ // Topbar hoot_add_css_rule(array('selector' => '.topbar-right-inner input', 'property' => 'background', 'value' => $content_bg_color)); /* Header (Topbar, Header, Main Nav Menu) */ // Header Layout if ($logo_background_type == 'accent') { hoot_add_css_rule(array('selector' => '#header:before', 'property' => 'background', 'value' => $accent_color, 'idtag' => 'accent_color')); } else { hoot_add_css_rule(array('selector' => '#header:before, #site-logo', 'property' => 'background', 'value' => 'none')); hoot_add_css_rule(array('selector' => '#header, #branding, #header-aside', 'property' => 'background', 'value' => 'none')); hoot_add_css_rule(array('selector' => '#site-logo #site-title, #site-logo #site-description', 'property' => 'color', 'value' => $accent_color, 'idtag' => 'accent_color')); // Overridden in premium } /* Header (Topbar, Header, Main Nav Menu) */ // Logo (with icon) if (intval($site_title_icon_size)) { hoot_add_css_rule(array('selector' => '.site-logo-with-icon #site-title i', 'property' => 'font-size', 'value' => $site_title_icon_size, 'idtag' => 'site_title_icon_size')); } if ($site_title_icon && intval($site_title_icon_size)) { hoot_add_css_rule(array('selector' => '.site-logo-with-icon #site-title', 'property' => 'padding-left', 'value' => $site_title_icon_size, 'idtag' => 'site_title_icon_size')); } /* Header (Topbar, Header, Main Nav Menu) */ // Mixed Logo (with image) hoot_add_css_rule(array('selector' => '.site-logo-with-image .site-logo-mixed-image, .site-logo-with-image .site-logo-mixed-image img', 'property' => 'width', 'value' => $logo_image_width, 'idtag' => 'logo_image_width')); // Important to have logo img width as img does not follow max-width inside non-fixed tables in Firefox /* Header (Topbar, Header, Main Nav Menu) */ // Custom Logo if ('custom' == $logo || 'mixedcustom' == $logo) { if (is_array($logo_custom) && !empty($logo_custom)) { $lcount = 1; foreach ($logo_custom as $logo_custom_line) { if (!$logo_custom_line['sortitem_hide'] && !empty($logo_custom_line['size'])) { hoot_add_css_rule(array('selector' => '#site-logo-custom .site-title-line' . $lcount . ',#site-logo-mixedcustom .site-title-line' . $lcount, 'property' => 'font-size', 'value' => $logo_custom_line['size'])); } $lcount++; } } } /* Light Slider */ hoot_add_css_rule(array('selector' => '.lSSlideOuter .lSPager.lSpg > li:hover a, .lSSlideOuter .lSPager.lSpg > li.active a', 'property' => 'background-color', 'value' => $accent_color, 'idtag' => 'accent_color')); }