// Should we Disable the Header output and instead allow the wpg2header to control the Output?
if ( $g2_option[‘g2_externalheader’]==”Yes” ) {
include (TEMPLATEPATH.’/wpg2header.php’);
} else {
//Initialize the WP class to be able to get the header
wp();
//Set status to 200 to override the 404 set by WordPress
status_header(200);
//Set $g2_wp_init to TRUE so that won’t do again for footer
$g2_wp_init = TRUE;
//Include the WP Header
get_header();

// Should we Disable the Header output and instead allow the wpg2footer to control the Output?
if ($g2_option[‘g2_externalfooter’]==”Yes” ) {
include (TEMPLATEPATH.’/wpg2footer.php’);
} else {
//Initialize WP class if not already initialized to be able to get the footer
if(!$g2_wp_init)
wp();
//Set status to 200 to override the 404 set by WordPress
status_header(200);
//Include plug-in footer content
echo stripslashes($g2_option[‘g2_footer’]);
//Include WP footer
get_footer();
}
?>