' . __('Fatal G2 error', 'wpg2') . ' ' . __("Here's the error from G2: ", 'wpg2') . $ret->getAsHtml(); exit; } // Pass through WP URL / Blog Name $site_url = get_option('home'); $site_name = get_option('blogname'); GalleryUtilities::putRequestVariable('wpg2_returnurl', $site_url); GalleryUtilities::putRequestVariable('wpg2_returnname', $site_name); // Switch on Lightbox if ($wpg2_option['wpg2_enableg2lightbox']) { GalleryUtilities::putRequestVariable('wpg2_lightbox', "active"); GalleryUtilities::putRequestVariable('wpg2_lightboxsize', $wpg2_option['g2_lightboximgsize']); } // Grab Gallery2 Output $g2data = GalleryEmbed::handleRequest(); if ($g2data['isDone']) { exit; // G2 has already sent output (redirect or binary data) } // Theme Switcher Hook if(!empty($_COOKIE['wp_ts2_'.COOKIEHASH])) { if ( file_exists( TEMPLATEPATH . '/wpg2header.php') ) { $wpg2_option['g2_externalheader'] = "Yes"; } else { $wpg2_option['g2_externalheader'] = "No"; } if ( file_exists( TEMPLATEPATH . '/wpg2footer.php') ) { $wpg2_option['g2_externalfooter'] = "Yes"; } else { $wpg2_option['g2_externalfooter'] = "No"; } } // Add G2 Title to Header - - Bug Fix #44 add_filter ( 'wp_title', 'wp_outputpagetitle' ); // How Should We Generate the WPG2 Page, Without WP Headers or With? if ($wpg2_option['g2_embedpagetype'] == 'gallery2' ) { echo $wpg2_option['g2_htmlheader']; $title = '
'.__(' Sorry.. WPG2 Page can not be displayed until WPG2 Plugin has been Validated.', 'wpg2').'