function weaverx_has_widgetarea($area_name) { // see if a widget area is available to show... $area = apply_filters('weaverx_replace_widget_area', $area_name); if (weaverx_is_checked_page_opt('_pp_' . $area_name)) { return false; } // hide area option checked if (is_active_sidebar($area)) { return true; } return false; }
get_template_part('templates/menu', 'header-mini'); ?> </div><!-- /.title-tagline --> <?php /* The Dynamic Headers shows headers on a per page basis - will also optionally add site link */ if (function_exists('show_media_header')) { show_media_header(); } // Plugin support: **Dynamic Headers** weaverx_header_widget_area('before_header'); // show header widget area if set to this position /* ======== HEADER IMAGE ======== */ global $weaverx_header; if (!(weaverx_is_checked_page_opt('_pp_hide_header_image') && !is_search())) { // don't bother if hide per page $h_hide = weaverx_getopt_default('hide_header_image', 'hide-none'); // really hide - don't need to have device download the image $really_hide = $h_hide == 'hide' || weaverx_getopt('hide_header_image_front') && is_front_page(); if ($h_hide == 'hide-none' || $h_hide == 'hide') { $h_hide = ' class="header-image"'; } else { $h_hide = ' class="header-image ' . $h_hide . '"'; } if (weaverx_getopt('header_image_add_class') != '') { $h_hide = str_replace('"header-image', '"header-image ' . weaverx_getopt('header_image_add_class'), $h_hide); } if (!$really_hide) { echo "<div id=\"header-image\"" . $h_hide . ">\n"; global $weaverx_header;
case 'xl-font-size': $h_fontmult = 1.25; break; case 'xxl-font-size': $h_fontmult = 1.5; break; default: $h_fontmult = 1; break; } if (isset($GLOBALS['weaverx_sb_layout'])) { $sb_layout = $GLOBALS['weaverx_sb_layout']; } else { $sb_layout = 'none'; } $local = array('hideTip' => weaverx_getopt('hide_tooltip') ? '1' : '0', 'hFontFamily' => $content_h_ff, 'hFontMult' => $h_fontmult, 'sbLayout' => $sb_layout, 'flowColor' => weaverx_getopt('flow_color') ? '1' : '0', 'full_browser_height' => weaverx_getopt('full_browser_height') || weaverx_is_checked_page_opt('_pp_full_browser_height') ? '1' : '0', 'primary' => weaverx_getopt('primary_eq_widgets') ? '1' : '0', 'secondary' => weaverx_getopt('secondary_eq_widgets') ? '1' : '0', 'top' => weaverx_getopt('top_eq_widgets') ? '1' : '0', 'bottom' => weaverx_getopt('bottom_eq_widgets') ? '1' : '0', 'header_sb' => weaverx_getopt('header_sb_eq_widgets') ? '1' : '0', 'footer_sb' => weaverx_getopt('footer_sb_eq_widgets') ? '1' : '0'); wp_localize_script('weaverxJSLibEnd', 'wvrxEndOpts', $local); // in footer.php because don't know the values yet in functions.php wp_footer(); weaverx_masonry('invoke-code'); if (WEAVERX_DEV_MODE) { $end_time = microtime(true); weaverx_debug_comment('Page generated in: ' . round($end_time - $GLOBALS['wvrx_timer'], 3) . ' seconds.'); } ?> <script> function bigImg(x) { x.style.height = "219px"; x.style.width = "300px"; }
// reuse $wp_query to make paging work } // now have to put the sidebar get_template_part('templates/infobar'); // put the info bar now that the posts info is available echo $top_of_pwp; if (have_posts()) { // same loop as index.php global $weaverx_sticky; weaverx_content_nav('nav-above'); $sticky_posts = false; // really ugly kludge. This code is copied from WP's WP_Query code. If you specify filters, // then the sticky post code is essentially ignored by WP, so we have to do this ourselves. // So - if there are sticky posts, we have to move them to the top of the posts list, and // manually add 'sticky' to the post's class. (1/11/12) if (!weaverx_is_checked_page_opt('_pp_hide_sticky') && (weaverx_get_per_page_value('_pp_category') || weaverx_get_per_page_value('_pp_tag') || weaverx_get_per_page_value('_pp_author'))) { // move sticky posts when cat or tag filters? // Put sticky posts at the top of the posts array $sticky_posts = get_option('sticky_posts'); global $page; if (is_array($sticky_posts) && !empty($sticky_posts)) { $num_posts = count($wp_query->posts); $sticky_offset = 0; // Loop over posts and relocate stickies to the front. for ($i = 0; $i < $num_posts; $i++) { if (in_array($wp_query->posts[$i]->ID, $sticky_posts)) { $sticky_post = $wp_query->posts[$i]; // Remove sticky from current position array_splice($wp_query->posts, $i, 1); // Move to front, after other stickies array_splice($wp_query->posts, $sticky_offset, 0, array($sticky_post));
<?php if (!defined('ABSPATH')) { exit; } // Exit if accessed directly $menu = apply_filters('weaverx_menu_name', 'primary'); if (weaverx_getopt('m_primary_hide') != 'hide' && !weaverx_is_checked_page_opt('_pp_hide_menus')) { $use_smart = weaverx_getopt('use_smartmenus') && function_exists('weaverxplus_plugin_installed'); weaverx_clear_both('menu-primary'); $class = weaverx_menu_class('m_primary'); $align = weaverx_getopt('m_primary_align'); $left = weaverx_getopt('m_primary_html_left'); $right = weaverx_getopt('m_primary_html_right'); if ($left) { $hide = ' ' . weaverx_getopt('m_primary_hide_left'); $left = '<span class="wvrx-menu-html wvrx-menu-left' . $hide . '">' . do_shortcode($left) . '</span>'; $left = str_replace('%', '%%', $left); // wp_nav_menu uses sprintf! This will almost always fix the issue. } elseif (is_customize_preview()) { $hide = ' ' . weaverx_getopt('m_primary_hide_left'); $left = '<span class="wvrx-menu-html wvrx-menu-left' . $hide . '"></span>'; } if ($right) { $hide = ' ' . weaverx_getopt('m_primary_hide_right'); $right = '<span class="wvrx-menu-html wvrx-menu-right ' . $hide . '">' . do_shortcode($right) . '</span>'; $right = str_replace('%', '%%', $right); // wp_nav_menu uses sprintf! } elseif (is_customize_preview()) { $hide = ' ' . weaverx_getopt('m_primary_hide_right'); $right = '<span class="wvrx-menu-html wvrx-menu-right ' . $hide . '"></span>';
<?php weaverx_entry_header('image'); ?> </header><!-- .page-header --> <?php if (weaverx_show_only_title()) { return; } weaverx_post_div('content'); weaverx_the_post_full(); weaverx_link_pages(); ?> </div><!-- .entry-content --> <?php if (!weaverx_is_checked_post_opt('_pp_hide_top_post_meta') && !weaverx_is_checked_post_opt('_pp_hide_bottom_post_meta') && !weaverx_is_checked_page_opt('_pp_hide_infotop') && !weaverx_is_checked_page_opt('_pp_hide_infobottom')) { ?> <footer class="entry-utility-wrap"> <div class="entry-utility<?php echo weaverx_text_class('post_info_bottom'); ?> "> <?php printf(__('<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span></span>', 'weaver-xtreme'), esc_url(get_permalink()), get_the_date('c'), get_the_date(), esc_url(get_author_posts_url(get_the_author_meta('ID'))), sprintf(esc_attr__('View all posts by %s', 'weaver-xtreme'), get_the_author()), get_the_author()); /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(__(', ', 'weaver-xtreme')); if ($categories_list) { ?> <span class="cat-links"> <?php printf(__('<span class="%1$s">Posted in</span> %2$s', 'weaver-xtreme'), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list);
weaverx_entry_header('audio'); ?> </header><!-- .entry-header --> <?php if (weaverx_show_only_title()) { return; } } weaverx_post_div('content'); echo weaverx_the_post_full(); wp_link_pages(array('before' => '<div class="page-link"><span>' . __('Pages:', 'weaver-xtreme') . '</span>', 'after' => '</div>')); ?> </div><!-- .entry-content --> <?php if (!weaverx_compact_post() && !weaverx_is_checked_post_opt('hide_bottom_post_meta') && !weaverx_is_checked_page_opt('ttw_hide__pp_infobot')) { ?> <footer class="entry-utility<?php echo weaverx_text_class('post_info_bottom'); ?> "> <?php printf(__('<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s">%3$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span></span>', 'weaver-xtreme'), esc_url(get_permalink()), get_the_date('c'), get_the_date(), esc_url(get_author_posts_url(get_the_author_meta('ID'))), sprintf(esc_attr__('View all posts by %s', 'weaver-xtreme'), get_the_author()), get_the_author()); ?> <?php /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(__(', ', 'weaver-xtreme')); if ($categories_list) { ?>
function weaverx_the_contnt() { if (weaverx_is_checked_page_opt('_pp_raw_html') && !weaverx_t_get('showposts') || weaverx_is_checked_post_opt('_pp_raw_html')) { remove_filter('the_content', 'wpautop'); remove_filter('the_content', 'wptexturize'); } the_content(weaverx_continue_reading_link()); }
<?php if (!defined('ABSPATH')) { exit; } // Exit if accessed directly $menu = apply_filters('weaverx_menu_name', 'secondary'); if (weaverx_getopt('m_secondary_hide') != 'hide' && has_nav_menu($menu) && !weaverx_is_checked_page_opt('_pp_hide_menus')) { $class = weaverx_menu_class('m_secondary'); $left = weaverx_getopt('m_secondary_html_left'); $right = weaverx_getopt('m_secondary_html_right'); if ($left) { $hide = ' ' . weaverx_getopt('m_secondary_hide_left'); $left = '<span class="wvrx-menu-html wvrx-menu-left' . $hide . '">' . do_shortcode($left) . '</span>'; $left = str_replace('%', '%%', $left); // wp_nav_menu uses sprintf! This will almost always fix the issue. } elseif (is_customize_preview()) { $hide = ' ' . weaverx_getopt('m_secondary_hide_left'); $left = '<span class="wvrx-menu-html wvrx-menu-left' . $hide . '"></span>'; } if ($right) { $hide = ' ' . weaverx_getopt('m_secondary_hide_right'); $right = '<span class="wvrx-menu-html wvrx-menu-right ' . $hide . '">' . do_shortcode($right) . '</span>'; $right = str_replace('%', '%%', $right); // wp_nav_menu uses sprintf! } elseif (is_customize_preview()) { $hide = ' ' . weaverx_getopt('m_secondary_hide_right'); $right = '<span class="wvrx-menu-html wvrx-menu-right ' . $hide . '"></span>'; } $use_smart = weaverx_getopt('use_smartmenus') && function_exists('weaverxplus_plugin_installed'); if ($use_smart) {
function weaverx_generate_wphead() { /* this guy does ALL the work for generating theme look - it writes out the over-rides to the standard style.css */ global $weaverx_main_options, $weaverx_cur_page_ID; global $post; $weaverx_cur_page_ID = 0; // need this for 404 page when this is not valid if (is_object($post)) { $weaverx_cur_page_ID = get_the_ID(); } // we're on a page now, so set the post id for the rest of the session printf("\n<!-- This site is using %s %s (%s) subtheme: %s -->\n", WEAVERX_THEMENAME, WEAVERX_VERSION, weaverx_getopt('style_version'), weaverx_getopt('themename')); do_action('weaverxplus_show_version'); if (weaverx_use_inline_css(weaverx_get_css_filename())) { // generate inline CSS echo '<style type="text/css">' . "\n"; if (isset($_REQUEST['wp_customize'])) { // don't use cached CSS from customizer $css = ''; } else { $css = weaverx_getopt_default('wvrx_css_saved', ''); } if ($css == '' || $css[0] != '/') { // there isn't an entry in the DB, so do it on the fly require_once get_template_directory() . '/includes/generatecss.php'; // include only now at runtime. $output = weaverx_f_open('php://output', 'w+'); weaverx_output_style($output); } else { weaverx_echo_css($css); } echo "\n</style> <!-- end of main options style section -->\n"; } else { // include generated file $vers = weaverx_getopt('style_version'); if (!$vers) { $vers = '1'; } else { $vers = sprintf("%d", $vers); } wp_enqueue_style('weaverxp-style-sheet', weaverx_get_css_url(), array('weaver-root-style-sheet'), $vers); wp_enqueue_style('weaverxp-style-sheet'); } /* now head options */ weaverx_echo_css(weaverx_getopt('_althead_opts')); weaverx_echo_css(weaverx_getopt('head_opts')); /* let the user have the last word! */ $per_page_code = weaverx_get_per_page_value('page-head-code'); if (!empty($per_page_code)) { weaverx_echo_css($per_page_code); } if (weaverx_is_checked_page_opt('_pp_hide_site_title')) { /* best to just do this inline */ echo '<style type="text/css">#site-title,#site-tagline{display:none;}#nav-header-mini{margin-top:32px!important;}</style>' . "\n"; } if ($ppsb = weaverx_get_per_page_value('_pp_sidebar_width') > 0) { require_once get_template_directory() . '/includes/generatecss.php'; // include only now at runtime. $ppsb = weaverx_get_per_page_value('_pp_sidebar_width'); echo "<style type=\"text/css\"> /* Per Page Sidebar Width */\n"; weaverx_sidebar_style('echo', $ppsb); echo "</style>\n"; } echo "\n<!-- End of Weaver Xtreme options -->\n"; }
* The default template for displaying content * * This will display unmatched post-type blog posts from main blog page and archive-type pages * Note - if you are building a custom content-xxx.php page for a custom post type, you should * be sure that Feature Images are processed correctly via weaverx_the_post_full(). * * @package WordPress * @subpackage Weaver X * @since Weaver Xtreme 1.0 */ weaverx_per_post_style(); $do_excerpt = weaverx_do_excerpt(); $me = $do_excerpt ? 'post_excerpt' : 'post_full'; weaverx_fi($me, 'post-before'); // ------------------------------------------------- COMPACT POSTS --------------------------------------- if (weaverx_is_checked_page_opt('_pp_pwp_compact_posts') && ($the_image = weaverx_get_first_post_image()) != '') { // = Compact Posts ?> <article id="post-<?php the_ID(); ?> " <?php post_class('post-content content-default content-compact-post ' . weaverx_post_class()); ?> > <header class="entry-header"> <?php weaverx_entry_header(''); // compact header
<?php if (!defined('ABSPATH')) { exit; } // Exit if accessed directly /* Weaver X Inject - injects userdefined HTML inject-infobar - adds both the infobar and the user pre-main area. Order of these two can be swapped easily in a child theme simply by reversing the order here */ if (weaverx_getopt('infobar_hide') != 'hide' && !weaverx_is_checked_page_opt('_pp_hide_page_infobar')) { // let's really not include it rather than display:none. $c_class = weaverx_area_class('infobar', 'not-pad', '-none', 'margin-none'); ?> <div id="infobar" class="<?php echo $c_class; ?> "> <?php if (!weaverx_getopt_checked('info_hide_breadcrumbs')) { $weaverx_crumbs = ''; if (has_action('weaverx_breadcrumbs')) { // allow anyone to override bradcrumbs via action do_action('weaverx_breadcrumbs'); } else { if (function_exists('yoast_breadcrumb')) {
function weaverx_compact_post() { return weaverx_getopt('compact_post_formats') || weaverx_is_checked_page_opt('_pp_pwp_compact'); }