function snp_run_camp($POST_META) { global $snp_ignore_cookies, $wp_scripts; $snp_ignore_cookies = true; snp_run_popup($POST_META['snp_camp_popup'], $POST_META['snp_camp_use']); echo '<!DOCTYPE html>'; echo '<html><head>'; echo '<style> body, html { height: 100%; width: 100%;} '; echo 'body { display: block;margin: 0;padding: 0;} </style>'; snp_init(); //wp_head(); wp_enqueue_scripts(); foreach ($wp_scripts->registered as $k => $v) { //print_r($v); if (!in_array($v->handle, array('jquery', 'jquery-core', 'fancybox2', 'jquery-ui-core', 'jquery-migrate', 'js-ninjapopups', 'jquery-np-cookie', 'jquery-np-placeholder'))) { wp_deregister_script($v->handle); } } wp_print_styles(); print_admin_styles(); wp_print_head_scripts(); echo '</head><body>'; echo '<iframe src="' . $POST_META['snp_camp_dest_url'] . '" style="width: 100%; height: 100%; border: 0; padding: 0; margin: 0; line-height: 0; display: block;"></iframe>'; snp_footer(); wp_print_footer_scripts(); echo '</body></html>'; die(''); }
/** * **/ function get_resources() { ob_start(); wp_print_styles(); print_admin_styles(); $this->styles = ob_get_clean(); if (!is_admin()) { ob_start(); wp_print_scripts(); $this->scripts = ob_get_clean(); } $this->wrote_footer = TRUE; }
/** * Sending output to an iframe */ function pte_init_iframe() { global $title, $pte_iframe; $pte_iframe = true; // Provide the base framework/HTML for the editor. require_once ABSPATH . WPINC . '/script-loader.php'; // Check the input parameters and create the HTML pte_edit_setup(); print "<!DOCTYPE html>\n<html><head><title>{$title}</title>\n"; print_head_scripts(); print_admin_styles(); print '</head><body class="wp-core-ui pte-iframe">'; // Simply echo the created HTML pte_edit_page(); wp_print_footer_scripts(); print '</body></html>'; }
<html> <head> <meta http-equiv="Content-Type" content="<?php echo 'Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'); ?> " /> <title> Prevew Email Template </title> <?php do_action('ec_render_template_head_scripts'); print_head_scripts(); //This is the main one print_admin_styles(); ?> </head> <body id="ec-template" class="ec-template" > <?php $mails = $woocommerce->mailer()->get_emails(); // Ensure gateways are loaded in case they need to insert data into the emails $woocommerce->payment_gateways(); $woocommerce->shipping(); /* Get Email to Show */ if (isset($_REQUEST['ec_email_type'])) { $email_type = $_REQUEST['ec_email_type']; } else { $email_type = current($mails)->id;
function _displayHead(&$output) { // get line endings $lnEnd = "\n"; $tab = "\t"; $tagEnd = ' />'; $strHtml = ''; // Enqueue Styles $deps = array(); foreach ($this->_styles as $style_priority) { foreach ($style_priority as $strSrc) { if ($strSrc->type == 'local') { $path = parse_url($strSrc->url, PHP_URL_PATH); if ($this->baseUrl != "/") { $path = '/' . preg_replace('#^' . quotemeta($this->baseUrl) . '#', "", $path); } $filename = strtolower(basename($path, '.css')) . rand(0, 1000); wp_enqueue_style($filename, $path, array(), '1.26'); $deps[] = $path; } } } // Add scripts to the header $deps = array(); foreach ($this->_scripts as $strSrc) { $path = parse_url($strSrc, PHP_URL_PATH); if ($this->baseUrl != "/") { $path = '/' . preg_replace('#^' . quotemeta($this->baseUrl) . '#', "", $path); } wp_enqueue_script($path, $path, $deps, '1.26'); $deps[] = $path; } foreach ($this->_full_scripts as $strSrc) { wp_enqueue_script($strSrc, $strSrc, $deps, '1.26'); $deps[] = $strSrc; } if (!$this->isAdmin()) { $strHtml .= $this->_renderCharset(); $strHtml .= $this->_renderTitle(); add_action('wp_head', array($this, '_renderRemoteStyles'), 8); add_action('wp_head', array($this, '_renderRemoteScripts'), 9); ob_start(); wp_head(); $strHtml .= ob_get_clean(); $strHtml .= $this->_renderStylesHead(); $strHtml .= $this->_renderScriptsHead(); } else { ob_start(); $this->_renderRemoteStyles(); print_admin_styles(); $this->_renderRemoteScripts(); print_head_scripts(); $strHtml .= ob_get_clean(); $strHtml .= $this->_renderStylesHead(); $strHtml .= $this->_renderScriptsHead(); } $output = preg_replace("#<gantry:header/>#", $strHtml, $output); }