" rel="home"> <?php echo $title; ?> </a></h1> <?php /* ======== SEARCH BOX ======== */ $hide_tag = weaverx_getopt('hide_site_tagline'); $tagline = apply_filters('weaverx_tagline', esc_html(get_bloginfo('description'))); ?> <h2 id="site-tagline" class="<?php echo $hide_tag; ?> "><span<?php echo weaverx_title_class('tagline'); ?> ><?php echo $tagline; ?> </span></h2> <div id="site-logo" class="site-logo <?php echo $hide_logo; ?> "><?php echo $logo; ?> </div> <?php get_template_part('templates/menu', 'header-mini'); ?>
function weaverx_single_title($title = '') { // The page title for single view page if (weaverx_is_checked_post_opt('_pp_hide_post_title') || weaverx_t_get('hide_title')) { return; } if (!$title) { $title = the_title('', '', false); } ?> <header class="page-header"> <?php weaverx_fi('post', 'title-before'); ?> <h1 class="page-title entry-title title-single <?php echo weaverx_title_class('post_title', true); ?> "><?php echo $title; ?> </h1> <?php weaverx_post_top_meta('single'); ?> </header><!-- .page-header --> <?php }
/** * Adds the classes to the widget in the front-end */ function weaverx_add_widget_classes($params) { global $wp_registered_widgets; $arr_registered_widgets = wp_get_sidebars_widgets(); // Get an array of ALL registered widgets $sb_id = $params[0]['id']; // Get the id for the current sidebar we're processing $widget_id = $params[0]['widget_id']; // add first, last, even, and odd, and widget classes $area_map = array('primary-widget-area' => 'primary', 'secondary-widget-area' => 'secondary', 'footer-widget-area' => 'footer', 'sitewide-top-widget-area' => 'top', 'page-top-widget-area' => 'top', 'postpages-widget-area' => 'top', 'blog-top-widget-area' => 'top', 'sitewide-bottom-widget-area' => 'bottom', 'page-bottom-widget-area' => 'bottom', 'blog-bottom-widget-area' => 'bottom', 'header-widget-area' => 'header_sb', 'footer-widget-area' => 'footer_sb', 'primary' => 'primary', 'secondary' => 'secondary', 'widget' => 'widget', 'header' => 'header_sb', 'footer' => 'footer_sb', 'top' => 'top', 'bottom' => 'bottom'); $opt_name = 'widget'; // default styling option name: widget-xxx $search_sb_id = $sb_id; if (weaverx_t_get('use_widget_area')) { // map from replacement area or [extra_widget_area] $search_sb_id = weaverx_t_get('use_widget_area'); } foreach ($area_map as $area => $opt) { // need to find name to use for option values if ($search_sb_id == $area) { $opt_name = $opt; break; } } $cols = weaverx_getopt_default($opt_name . '_cols_int', 1); if ($cols > 8) { $cols = 8; } // sanity check $show_number = true; $show_evenodd = true; if (!isset($arr_registered_widgets[$sb_id]) || !is_array($arr_registered_widgets[$sb_id])) { return $params; } if (empty($GLOBALS['wvr_widget_number']) || !isset($GLOBALS['wvr_widget_number']) || !$GLOBALS['wvr_widget_number']) { // global to keep track of which widget this is $GLOBALS['wvr_widget_number'] = array(); } if (isset($GLOBALS['wvr_widget_number'][$sb_id])) { // initialize or bump widget number $GLOBALS['wvr_widget_number'][$sb_id]++; } else { $GLOBALS['wvr_widget_number'][$sb_id] = 1; } $is_sidebar = in_array($sb_id, array('primary-widget-area', 'secondary-widget-area')); // this is a vertical widget $no_smart = weaverx_getopt($opt_name . '_no_widget_margins'); $is_vert = $cols == 1; $per_row_tail = $is_vert || $no_smart ? ' ' : '-m '; $class = ''; $sides = $is_sidebar ? '-b' : '-rb'; $cur_widget = $GLOBALS['wvr_widget_number'][$sb_id]; $widget_count = count($arr_registered_widgets[$sb_id]); $first = $cur_widget == 1; $last = $cur_widget == $widget_count; $def_bottom = 'margin-bottom'; if ($opt_name == 'header_sb') { $def_bottom = 'no-margin-vertical '; } $area_class = weaverx_area_class('widget', 'not-pad', $sides, $def_bottom) . ' '; if ($area_class) { $class .= $area_class; } if (!$is_vert) { $class .= 'per-row-' . $cols . $per_row_tail; $end_of_row = $cur_widget % $cols == 0; if ($widget_count > 1 && !$end_of_row && !$no_smart) { $class .= 'smart-rm '; } if ($end_of_row) { $class .= 'end-of-row '; } if ($cur_widget % $cols == 1) { $class .= 'begin-of-row '; } } $class .= 'widget-' . $GLOBALS['wvr_widget_number'][$sb_id] . ' '; if ($is_vert) { $widget_first = 'widget-first widget-first-vert '; $widget_last = 'widget-last widget-last-vert '; } else { $widget_first = 'widget-first '; $widget_last = 'widget-last '; } if ($first) { $class .= $widget_first; } if ($last) { $class .= $widget_last; } if ($show_evenodd) { $widget_even = 'widget-even '; $widget_odd = 'widget-odd '; $class .= $cur_widget % 2 ? $widget_odd : $widget_even; } // need no-margin-bottom if $cols > 1 $params[0]['before_widget'] = str_replace('">', ' ' . trim($class) . '">', $params[0]['before_widget']); $title_class = weaverx_title_class('widget_title', true); if ($title_class) { $params[0]['before_title'] = str_replace('">', ' ' . trim($title_class) . '">', $params[0]['before_title']); } return $params; }
function wvrx_ts_sc_site_tagline($args = '') { extract(shortcode_atts(array('style' => '', 'matchtheme' => false), $args)); $title = get_bloginfo('description'); $before = ''; $after = ''; if ($matchtheme == 'true' || $matchtheme == 1) { $before = '<h2' . weaverx_title_class('tagline', false, 'site-tagline') . '>'; $after = '</h2>'; } if ($style) { return $before . '<span style="' . $style . '">' . $title . '</span>' . $after; } return $before . $title . $after; }