Example #1
0
 function weaver_generate_wphead()
 {
     /* this guy does ALL the work for generating theme look - it writes out the over-rides to the standard style.css */
     global $weaver_main_options, $weaver_cur_page_ID;
     // if ( have_posts() )
     //   the_post();
     $weaver_cur_page_ID = get_the_ID();
     // we're on a page now, so set the post id for the rest of the session
     // rewind_posts();
     printf("\n<!-- This site is using %s %s subtheme: %s -->\n", WEAVER_THEMENAME, WEAVER_VERSION, weaver_getopt('ttw_subtheme'));
     if (!weaver_getopt('ttw_hide_metainfo')) {
         echo weaver_getopt('ttw_metainfo') . "\n";
     }
     // handle 3 stylesheet situations
     //	default: used weaver-style.css
     //	no weaver-style.css: when first installed, there will not be a weaver-style.css, so use inline instead
     //	force inline: user wants inline css
     if (weaver_use_inline_css(weaver_get_css_filename())) {
         // generate inline CSS
         if (!weaver_getopt('ttw_subtheme')) {
             // It would be nice to use wp_enqueue_style, but it is too late at this point, so we
             // will generate the code manually - this is a one-shot special case that happens ONLY
             // when the theme preview option is being used from the themes admin page
             echo '<link rel="stylesheet" type="text/css" media="all" href="' . get_stylesheet_directory_uri() . '/subthemes/style-weaver-preview.css" />' . "\n";
         } else {
             require_once 'wvr-generatecss.php';
             // include only now at runtime.
             echo '<style type="text/css">' . "\n";
             $output = weaver_f_open('php://output', 'w+');
             weaver_output_style($output);
             echo "</style> <!-- end of main options style section -->\n";
         }
     } else {
         // file should have been added from header.php
     }
     /* now head options */
     echo weaver_getopt('ttw_theme_head_opts');
     echo weaver_getopt('ttw_head_opts');
     /* let the user have the last word! */
     $per_page_code = weaver_get_per_page_value('page-head-code');
     if (!empty($per_page_code)) {
         echo $per_page_code;
     }
     weaver_fix_IE();
     do_action('wvrx_extended_wp_head');
     /* call extended wp_head stuff */
     do_action('wvrx_plus_wp_head');
     // future header plugin
     echo "\n<!-- End of Weaver options -->\n";
 }
Example #2
0
function weaver_put_area($name)
{
    // for the extra code areas between major divs
    $area_name = 'ttw_' . $name . '_insert';
    $hide_front = 'ttw_hide_front_' . $name;
    $hide_rest = 'ttw_hide_rest_' . $name;
    if (weaver_getopt($area_name)) {
        /* area insert defined? */
        if (is_front_page()) {
            if (!weaver_getopt($hide_front)) {
                echo do_shortcode(weaver_getopt($area_name));
            }
        } else {
            if (!weaver_getopt($hide_rest)) {
                echo do_shortcode(weaver_getopt($area_name));
            }
        }
    }
    $per_page_code = weaver_get_per_page_value('page-' . $name . '-code');
    /* or on a per page basis! */
    if (!empty($per_page_code)) {
        echo do_shortcode($per_page_code);
    }
}
Example #3
0
            ?>
    </ul></div> <!-- #ttw-header-widget -->
    <?php 
        }
        /* end if non-empty widgets */
    }
    ?>
	<div id="masthead">
<?php 
    /* ======== SITE TITLE ======== */
    get_template_part('hdr', 'sitetitle');
    /* ======== TOP MENU ======== */
    get_template_part('nav', 'top');
    /* ======== HEADER INSERT CODE ======== */
    echo "\n\t    " . '<div id="branding" role="banner">' . "\n";
    $per_page_code = weaver_get_per_page_value('page-header-insert-code');
    /* or on a per page basis! */
    if (!empty($per_page_code)) {
        echo do_shortcode($per_page_code);
    } elseif (weaver_getopt('ttw_custom_header_insert')) {
        /* header insert defined? */
        echo do_shortcode(weaver_getopt('ttw_custom_header_insert'));
    }
    /* 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();
    }
    /* **Dynamic Headers** built-in support for plugin */
    ?>

	    </div><!-- #branding -->