/** * Page wrapper attributes. * * @since 1.0 * @access public * @param array $attr * @return array */ function hoot_theme_attr_page_wrapper($attr) { $site_layout = hoot_get_mod('site_layout'); $attr['class'] = $site_layout == 'boxed' ? 'grid site-boxed' : 'site-stretch'; $attr['class'] .= ' page-wrapper'; return $attr; }
/** * Build URL for loading Google Fonts * @credit http://themeshaper.com/2014/08/13/how-to-add-google-fonts-to-wordpress-themes/ * * @since 1.0 * @access public * @return void */ function hoot_google_fonts_enqueue_url() { $fonts_url = ''; $query_args = apply_filters('hoot_google_fonts_enqueue_url_args', array()); /** If no google font loaded, load the default ones **/ if (!is_array($query_args) || empty($query_args)) { /* Translators: If there are characters in your language that are not * supported by this font, translate this to 'off'. Do not translate * into your own language. */ $playball = 'cursive' == hoot_get_mod('headings_fontface') ? _x('on', 'Playball font: on or off', 'responsive-brix') : 'off'; /* Translators: If there are characters in your language that are not * supported by this font, translate this to 'off'. Do not translate * into your own language. */ $open_sans = _x('on', 'Open Sans font: on or off', 'responsive-brix'); if ('off' !== $playball || 'off' !== $open_sans) { $font_families = array(); if ('off' !== $playball) { $font_families[] = 'Playball:400'; } if ('off' !== $open_sans) { $font_families[] = 'Open Sans:300,400,400italic,700,700italic,800'; } $query_args = array('family' => urlencode(implode('|', $font_families)), 'subset' => urlencode('latin')); } } if (!empty($query_args)) { $fonts_url = add_query_arg($query_args, '//fonts.googleapis.com/css'); } return $fonts_url; }
/** * 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'], 20, 20); $settings['accent_font'] = hoot_get_mod('accent_font'); $settings['site_layout'] = hoot_get_mod('site_layout'); 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')))); /* 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', 'idtag' => 'box_background')); } /* Header */ hoot_add_css_rule(array('selector' => '#site-title, #site-title a', 'property' => 'color', 'value' => $accent_color, 'idtag' => 'accent_color')); // Overridden in premium /* Sidebars and Widgets */ hoot_add_css_rule(array('selector' => '.content-block-icon', 'property' => array('color' => array($accent_color, 'accent_color'), 'background' => array($accent_font, 'accent_font'), 'border-color' => array($accent_color, 'accent_color')))); hoot_add_css_rule(array('selector' => '.content-block-icon.icon-style-square', 'property' => array('color' => array($accent_font, 'accent_font'), 'background' => array($accent_color, 'accent_color')))); hoot_add_css_rule(array('selector' => '.content-blocks-widget .content-block:hover .content-block-icon.icon-style-circle', 'property' => array('color' => array($accent_font, 'accent_font'), 'background' => array($accent_color, 'accent_color')))); hoot_add_css_rule(array('selector' => '.content-blocks-widget .content-block:hover .content-block-icon.icon-style-square', 'property' => array('color' => array($accent_color, 'accent_color'), 'background' => array($accent_font, 'accent_font')))); /* 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')); }
/** * Get the image size to use in a span/column of the CSS grid * @todo Can be made more flexible, but for now this will have to do. * Case 1: $grid can be a container span, for when a spanN is in a grid which itself is a spanN/Column * Case 2: Account for responsive spans i.e. set a minimum span size for smaller spans so that mobile viewports * will show bigger width images for available screen space. Example: span1,2,3 will have image sizes * corresponding to span4, so that in mobile view where all spans have 100% width, images are displayed * more nicely! * Case 3: Maybe find a robust (not hard coded) way to account for span padding as well (curently $swidth * does not take padding into account) * * @since 1.0.0 * @access public * @param string $span span size or column size * @param NULL|bool $crop get only cropped if true, only noncropped if false, either for anything else. * @param int $gridadjust Grid's Width Adjustment for various paddings (possible value 80) * @return string */ function hoot_get_image_size_name($span, $crop = NULL, $gridadjust = 0) { $default_grid = 1260; /* Get the Span/Column factor */ if (strpos($span, 'span-') !== false) { $pieces = explode("span-", $span); $factor = $pieces[1]; } elseif (strpos($span, 'column-') !== false) { $pieces = explode("column-", $span); $factors = explode("-", $pieces[1]); $factor = $factors[0] * 12 / $factors[1]; } else { return false; } /* Responsive Grid: Any span below 3 gets an image size fit for atleast span3 to display nicely on smaller screens */ $factor = intval($factor) < 3 ? 3 : intval($factor); /* Get the Grid (int)Width from Hoot Options else Default */ $grid = function_exists('hoot_get_mod') ? intval(hoot_get_mod('site_width')) : 0; if (empty($grid)) { $grid = $default_grid; } $grid -= $gridadjust; /* Get width array arranged in ascending order */ if ($crop === true) { $iwidths = hoot_get_image_sizes('sort_by_width_crop'); } elseif ($crop === false) { $iwidths = hoot_get_image_sizes('sort_by_width_nocrop'); } else { $iwidths = hoot_get_image_sizes('sort_by_width'); } /* Get Image size corresponding to span width */ $swidth = $factor / 12 * $grid; foreach ($iwidths as $name => $iwidth) { if ((int) $swidth <= (int) $iwidth) { return $name; } } /* If this was a crop/no-crop request and we didn't find any image size, then search all available sizes. */ if ($crop === true || $crop === false) { $iwidths = hoot_get_image_sizes('sort_by_width'); foreach ($iwidths as $name => $iwidth) { if ((int) $swidth <= (int) $iwidth) { return $name; } } } /* Full size image (largest width) */ return 'full'; }
/** * Modify the exceprt length. * * @since 1.0 * @access public * @return void */ function custom_excerpt_length($length) { $excerpt_length = intval(hoot_get_mod('excerpt_length')); if (!empty($excerpt_length)) { return $excerpt_length; } return 105; }
?> "> <h4><?php echo $linktag; the_title(); echo $linktagend; ?> </h4> <div class="content-block-text"><?php if (empty($excerpt)) { the_content(); } else { the_excerpt(); } if ($linktag) { $linktext = !empty($box['link']) ? $box['link'] : hoot_get_mod('read_more'); $linktext = empty($linktext) ? sprintf(__('Read More %s', 'chromatic'), '→') : $linktext; echo '<p class="more-link linkstyle">' . $linktag . $linktext . $linktagend . '</p>'; } ?> </div> </div> </div><?php break; } } wp_reset_postdata(); ?> <?php
function hoot_woo_custom_loop_columns_css() { $columns = hoot_get_mod('wooshop_product_columns', 4); if ($columns == 4) { return; } switch ($columns) { case '2': $css = '.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { width: 48.1%; }'; break; case '3': $css = '.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { width: 30.8%; }'; break; case '5': $css = '.woocommerce ul.products li.product, .woocommerce-page ul.products li.product { width: 16.96%; }'; break; } if (!empty($css)) { wp_add_inline_style('style', $css); } }
/** * Create CSS styles from a typography type. * * @since 1.1.1 * @access public * @param string $idtag * @param bool|string $important * @param bool $reset Reset earlier css rules from stylesheets etc. * @return mixed empty if sanitization failed, else array of sanitized properties arrays */ function typography($idtag, $important = false, $reset = false) { if (empty($idtag) || !is_string($idtag)) { return; } /** Variables **/ $typography = array(); $properties = array('size', 'face', 'style', 'color'); foreach ($properties as $property) { $typography[$property] = hoot_get_mod("{$idtag}-{$property}"); } return $this->typographyarray($typography, $idtag, $important, $reset); }
/** * Filters the 'stylesheet_uri' returned by get_stylesheet_uri() to allow theme developers to offer a * minimized version of their main 'style.css' file. It will detect if a 'style.min.css' file is available * and use it if HOOT_DEBUG is disabled. * * @since 1.0.0 * @access public * @param string $stylesheet_uri The URI of the active theme's stylesheet. * @param string $stylesheet_dir_uri The directory URI of the active theme's stylesheet. * @return string $stylesheet_uri */ function hoot_min_stylesheet_uri($stylesheet_uri, $stylesheet_dir_uri) { if (defined('HOOT_DEBUG')) { $loadminified = HOOT_DEBUG ? false : true; } else { $loadminified = hoot_get_mod('load_minified', 0); } /* Use the .min stylesheet if available. */ if ($loadminified) { /* Remove the stylesheet directory URI from the file name. */ $stylesheet = str_replace(trailingslashit($stylesheet_dir_uri), '', $stylesheet_uri); /* Change the stylesheet name to 'style.min.css'. */ $stylesheet = str_replace('.css', ".min.css", $stylesheet); /* If the stylesheet exists in the stylesheet directory, set the stylesheet URI to the dev stylesheet. */ if (file_exists(trailingslashit(get_stylesheet_directory()) . $stylesheet)) { $stylesheet_uri = trailingslashit($stylesheet_dir_uri) . $stylesheet; } } /* Return the theme stylesheet. */ return $stylesheet_uri; }
function hoot_get_lite_slider($type) { $slides = array(); switch ($type) { case 'html': for ($i = 1; $i <= 4; $i++) { $slides[$i]['image'] = hoot_get_mod("wt_html_slide_{$i}-image"); $slides[$i]['content'] = hoot_get_mod("wt_html_slide_{$i}-content"); $slides[$i]['button'] = hoot_get_mod("wt_html_slide_{$i}-button"); $slides[$i]['url'] = hoot_get_mod("wt_html_slide_{$i}-url"); $slides[$i]['background']['color'] = hoot_get_mod("wt_html_slide_{$i}-background-color"); $slides[$i]['background']['type'] = hoot_get_mod("wt_html_slide_{$i}-background-type"); $slides[$i]['background']['pattern'] = hoot_get_mod("wt_html_slide_{$i}-background-pattern"); $slides[$i]['background']['image'] = hoot_get_mod("wt_html_slide_{$i}-background-image"); // $slides[ $i ]['background']['repeat'] = hoot_get_mod( "wt_html_slide_{$i}-background-repeat" ); // $slides[ $i ]['background']['position'] = hoot_get_mod( "wt_html_slide_{$i}-background-position" ); // $slides[ $i ]['background']['attachment'] = hoot_get_mod( "wt_html_slide_{$i}-background-attachment" ); } break; case 'image': case 'img': for ($i = 1; $i <= 4; $i++) { $slides[$i]['image'] = hoot_get_mod("wt_img_slide_{$i}-image"); $slides[$i]['caption'] = hoot_get_mod("wt_img_slide_{$i}-caption"); $slides[$i]['url'] = hoot_get_mod("wt_img_slide_{$i}-url"); $slides[$i]['button'] = hoot_get_mod("wt_img_slide_{$i}-button"); } break; } return $slides; }
} /* Display Slider Template */ get_template_part('template-parts/slider-html'); } } ?> </div> </div> </div> <?php break; // Display Image Slider // Display Image Slider case 'slider_img': $slider_width = hoot_get_mod('wt_img_slider_width'); $slider_grid = 'stretch' == $slider_width ? 'grid-stretch' : 'grid'; ?> <div id="widgetized-template-img-slider" class="widgetized-template-area"> <div class="widgetized-template-slider <?php echo $slider_grid; ?> "> <div class="grid-span-12"> <?php $widgetized_template_slider = apply_filters('widgetized_template_slider', '', 'wt_cpt_slider_b'); if (!empty($widgetized_template_slider)) { echo $widgetized_template_slider; } else { global $hoot_theme;
<?php // Begins the loop through found posts, and load the post data. while (have_posts()) { the_post(); // Loads the template-parts/content-{$post_type}.php template. hoot_get_content_template(); // End found posts loop. } ?> </div><!-- #content-wrap --> <?php // Loads the template-parts/loop-nav.php template. if (hoot_get_mod('post_prev_next_links')) { get_template_part('template-parts/loop-nav'); } // Template modification Hook do_action('hoot_template_after_content_wrap', 'single.php'); // Loads the comments.php template if (!is_attachment()) { comments_template('', true); } // If no posts were found. } else { // Loads the template-parts/error.php template. get_template_part('template-parts/error'); // End check for posts. } // Template modification Hook
/** * Helper function for getting the minified script/style uri if available. * * @since 2.0.0 * @access public * @param string $location absolute or relative path * @param string $type * @return string */ function hoot_locate_uri($location, $type) { $location = str_replace(array(trailingslashit(THEME_URI), trailingslashit(THEME_DIR)), '', $location); $pattern = apply_filters('hoot_locate_uri_extension_pattern', array('/\\.' . $type . '$/')); $location = preg_replace($pattern, '', $location); if (defined('HOOT_DEBUG')) { $loadminified = HOOT_DEBUG ? false : true; } else { $loadminified = hoot_get_mod('load_minified', 0); } /** Prepare Locations **/ $locations = array(); if (is_child_theme()) { if ($loadminified) { $locations['child-premium-min'] = array('path' => trailingslashit(CHILD_THEME_DIR) . 'premium/' . $location . '.min.' . $type, 'uri' => trailingslashit(CHILD_THEME_URI) . 'premium/' . $location . '.min.' . $type); } $locations['child-premium'] = array('path' => trailingslashit(CHILD_THEME_DIR) . 'premium/' . $location . '.' . $type, 'uri' => trailingslashit(CHILD_THEME_URI) . 'premium/' . $location . '.' . $type); if ($loadminified) { $locations['child-default-min'] = array('path' => trailingslashit(CHILD_THEME_DIR) . $location . '.min.' . $type, 'uri' => trailingslashit(CHILD_THEME_URI) . $location . '.min.' . $type); } $locations['child-default'] = array('path' => trailingslashit(CHILD_THEME_DIR) . $location . '.' . $type, 'uri' => trailingslashit(CHILD_THEME_URI) . $location . '.' . $type); } if ($loadminified) { $locations['premium-min'] = array('path' => trailingslashit(THEME_DIR) . 'premium/' . $location . '.min.' . $type, 'uri' => trailingslashit(THEME_URI) . 'premium/' . $location . '.min.' . $type); } $locations['premium'] = array('path' => trailingslashit(THEME_DIR) . 'premium/' . $location . '.' . $type, 'uri' => trailingslashit(THEME_URI) . 'premium/' . $location . '.' . $type); if ($loadminified) { $locations['default-min'] = array('path' => trailingslashit(THEME_DIR) . $location . '.min.' . $type, 'uri' => trailingslashit(THEME_URI) . $location . '.min.' . $type); } $locations['default'] = array('path' => trailingslashit(THEME_DIR) . $location . '.' . $type, 'uri' => trailingslashit(THEME_URI) . $location . '.' . $type); $locations = apply_filters('hoot_locate_uri', $locations, $location, $type); /** Locate the file **/ $located = ''; foreach ($locations as $locate) { if (file_exists($locate['path'])) { $located = $locate['uri']; break; } } return $located; }
/** * 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><!-- .entry-content --> <div class="screen-reader-text" itemprop="datePublished" itemtype="https://schema.org/Date"><?php echo get_the_date('Y-m-d'); ?> </div> <?php $hide_meta_info = apply_filters('hoot_hide_meta_info', false, 'bottom'); ?> <?php if (!$hide_meta_info && 'bottom' == hoot_get_mod('post_meta_location')) { ?> <footer class="entry-footer"> <?php hoot_meta_info_blocks(hoot_get_mod('page_meta'), 'page'); ?> </footer><!-- .entry-footer --> <?php } ?> </article><!-- .entry --> <?php /** * If not viewing a single page i.e. viewing the page in a list index (Example: search results) */ } else { global $hoot_theme; if (empty($hoot_theme->searchresults_hide_pages)) {
</div> <?php } ?> <div class="screen-reader-text" itemprop="datePublished" itemtype="https://schema.org/Date"><?php echo get_the_date('Y-m-d'); ?> </div> <?php hoot_meta_info_blocks(hoot_get_mod('archive_post_meta'), 'archive-big'); ?> <div <?php hoot_attr('entry-summary'); ?> > <?php if ('full-content' == hoot_get_mod('archive_post_content')) { the_content(); } else { the_excerpt(); } ?> </div><!-- .entry-summary --> </div><!-- .entry-grid-content --> </div><!-- .entry-grid --> </article><!-- .entry -->
<?php // Get Content $topbar_left = is_active_sidebar('topbar-left'); $topbar_right = is_active_sidebar('topbar-right'); // Show Search $search = !(bool) hoot_get_mod('topbar_hide_search'); // Display Topbar if (!empty($topbar_left) || !empty($topbar_right) || $search) { ?> <div id="topbar" class="grid-stretch"> <div class="grid"> <div class="grid-span-12"> <div class="table"> <?php if ($topbar_left) { ?> <div id="topbar-left" class="table-cell-mid"> <?php dynamic_sidebar('topbar-left'); ?> </div> <?php } ?> <?php if ($topbar_right || $search) { ?> <div id="topbar-right" class="table-cell-mid">
</div><!-- .entry-content --> <div class="screen-reader-text" itemprop="datePublished" itemtype="https://schema.org/Date"><?php echo get_the_date('Y-m-d'); ?> </div> <?php $hide_meta_info = apply_filters('hoot_hide_meta_info', false, 'bottom'); ?> <?php if (!$hide_meta_info && 'bottom' == hoot_get_mod('post_meta_location') && !is_attachment()) { ?> <footer class="entry-footer"> <?php hoot_meta_info_blocks(hoot_get_mod('post_meta'), 'post'); ?> </footer><!-- .entry-footer --> <?php } ?> </article><!-- .entry --> <?php /** * If not viewing a single post i.e. viewing the post in a list index (archive etc.) */ } else { $archive_type = apply_filters('hoot_default_archive_type', 'big', 'content'); $archive_template = apply_filters('hoot_default_archive_location', 'template-parts/content-archive', $archive_type, 'content');
<?php $site_info = hoot_get_mod('site_info'); $site_info = str_replace("<!--year-->", date_i18n('Y'), $site_info); if (!empty($site_info)) { ?> <div id="post-footer" class="grid-stretch"> <div class="grid"> <div class="grid-span-12"> <p class="credit small"> <?php if (trim($site_info) == '<!--default-->') { printf(__('Copyright © %1$s %2$s. Designed using %3$s. Powered by %4$s.', 'chromatic'), date_i18n('Y'), hoot_get_site_link(), hoot_get_wp_theme_link(apply_filters('hoot_footer_wp_theme_link', 'https://wordpress.org/themes/chromatic/')), hoot_get_wp_link()); } else { echo $site_info; } ?> </p><!-- .credit --> </div> </div> </div> <?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')); }