PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/princesspicnicevents.com/wp-content/plugins/wp2speed/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/princesspicnicevents.com/wp-content/plugins/wp2speed/wp2speed-nocdn.php

<?php
/*
Plugin Name: Penci PageSpeed Optimizer
Plugin URI: https://pencidesign.net/
Description: A Product from PenciDesign to help you can make your website faster, speed up page load time and improve performance scores in services like Google PageSpeed, GTmetrix, Pingdom, YSlow.
Version: 2.0.7
Author: PenciDesign
Author URI: https://pencidesign.net/
*/

/* Only running when option is enabled */
if( ! get_theme_mod( 'penci_enable_spoptimizer' ) ) {
	return;
}

 goto p3Bfu; s2X2y: class WP2Speed { private $host = ''; private $root = ''; private $refreshed = false; private $mergecss = true; private $checkcssimports = true; private $mergejs = true; private $cssmin = true; private $jsmin = true; private $http2pushCSS = false; private $http2pushJS = false; private $outputbuffering = false; private $buffering = false; private $gzip = false; private $ignore = array(); private $wordpressdir = ''; private $scriptcount = 0; private $hasMerged = false; private $rootRelativeWPContentDir = ''; private $inline_scripts = ['js' => [], 'css' => []]; private $scripts = ['js' => ['log' => [], 'files' => []], 'css' => ['log' => [], 'style' => [], 'files' => []]]; private $_data = ['filter_assets' => [], 'lazy_assets' => []]; public function __construct() { goto hwHd7; hwHd7: $this->outputbuffering = 0; goto QFwei; PWJkw: $this->buffering = ob_start(); goto MmdIf; zUwyH: add_action('init', array($this, 'init'), $this->max); goto DSz6c; t5Jjj: $this->max = defined('PHP_INT_MAX') ? PHP_INT_MAX : 9223372036854775807; goto zUwyH; zMXGN: $this->min = defined('PHP_INT_MIN') ? PHP_INT_MIN : -9.223372036854776E+18; goto t5Jjj; MmdIf: NaLz8: goto zMXGN; QFwei: if (!(!is_admin() && $this->outputbuffering)) { goto NaLz8; } goto PWJkw; DSz6c: } function init() { goto XcNdW; H9YG1: add_action('wp_ajax_mmr_files', array($this, 'mmr_files_callback')); goto I2Ua7; ymtEZ: goto sXx05; goto dPTVT; VA1G0: add_action('admin_menu', array($this, 'admin_menu')); goto Ozbwn; lq7hq: add_action('wp_print_scripts', array($this, 'inspect_scripts'), $this->max); goto ob7wX; nd4gn: FObjE: goto GCJRW; h72Jp: add_action('shutdown', array($this, 'refreshed'), 10); goto iCOqb; QFKkk: if (defined('MMR_CACHE_URL')) { goto dqDEM; } goto G_WjB; tG_Ej: goto cpDz_; goto llEA0; QCgJw: if (apply_filters('should_mmr', true)) { goto I23q0; } goto gkEnA; fuaWg: JVq_c: goto rVKh8; I2Ua7: register_deactivation_hook(__FILE__, array($this, 'plugin_deactivate')); goto i2vhu; uzqI6: add_action('wp_print_footer_scripts', array($this, 'inspect_stylescripts_footer'), 9.999999000000001); goto s1Z8t; h6DsM: add_filter('script_loader_src', array($this, 'remove_cssjs_ver'), 10, 2); goto uzqI6; llEA0: jN0qs: goto e9pFO; hygVM: mkdir(MMR_CACHE_DIR); goto PwllC; Ozbwn: add_action('admin_enqueue_scripts', array($this, 'load_admin_jscss')); goto H9YG1; bAO5x: $this->ignore = []; goto lq7hq; qm9bK: add_action('mmr_minify_check', array($this, 'minify_action'), 10, 1); goto GmPbZ; SCkgM: $this->buffering = false; goto PIoSU; i2vhu: if (!(hw_config('minify_merge') && !wp_next_scheduled('mmr_minify_check'))) { goto aWBOr; } goto Mdecu; EN0rR: $this->checkcssimports = 0; goto RBj7R; ou7EH: goto b8ick; goto ngPAD; XcNdW: if (!defined('MMR_CACHE_DIR')) { goto OPg1t; } goto zaXEc; HLXlI: if (defined('MMR_JS_CACHE_URL')) { goto uC_xS; } goto dkXfU; myjPv: goto Z6tpi; goto nd4gn; g3Hz2: add_filter('style_loader_src', array($this, 'remove_cssjs_ver'), 10, 2); goto h6DsM; dPTVT: OPg1t: goto pIHSq; TIqtt: eBudp: goto ou7EH; rVKh8: Z6tpi: goto c9gAl; PgcKz: if (defined('WP_CONTENT_URL')) { goto FObjE; } goto TSDB9; lLIrD: aWBOr: goto KBEBk; g7xSN: if (is_dir(MMR_CACHE_DIR)) { goto ci5n_; } goto hygVM; MeZy4: $this->host = parse_url(WP_SITEURL, PHP_URL_HOST); goto ZoYQi; KBEBk: XTT76: goto LXxJu; s1Z8t: add_action('wp_footer', array($this, 'print_footer'), PHP_INT_MAX); goto h72Jp; j1XGK: $this->gzip = 0; goto bAO5x; f8uuQ: $this->cssmin = 1; goto JewEZ; pIHSq: define('MMR_CACHE_DIR', WP_CONTENT_DIR . '/mmr'); goto QFKkk; ZXqM1: if ($this->rootRelativeWPContentDir) { goto JVq_c; } goto sLqbC; WnKqi: wp_die("You must specify MMR_CACHE_URL or MMR_JS_CACHE_URL & MMR_CSS_CACHE_URL"); goto Owmvz; PwllC: ci5n_: goto PgcKz; c9gAl: $this->root = $_SERVER["DOCUMENT_ROOT"]; goto Ygi0J; Ygi0J: $this->wordpressdir = apply_filters('hpp_sitedir', rtrim(parse_url(network_site_url(), PHP_URL_PATH), '/')); goto ii9k_; Mdecu: wp_schedule_event(time(), 'hourly', 'mmr_minify_check'); goto lLIrD; TXLdW: m4w5u: goto g7xSN; OvK42: add_action('compress_js', array($this, 'minify_action'), 10, 1); goto KX3RP; TSDB9: $this->rootRelativeWPContentDir = str_replace($_SERVER['DOCUMENT_ROOT'], '', WP_CONTENT_DIR); goto myjPv; LXxJu: cpDz_: goto hPBjr; gkEnA: if (!$this->buffering) { goto eBudp; } goto SCkgM; PIoSU: ob_end_flush(); goto TIqtt; bW5h3: dqDEM: goto EPaGW; ii9k_: add_action('mmr_minify', array($this, 'minify_action'), 10, 1); goto qm9bK; p7kBm: if (defined('MMR_CSS_CACHE_URL')) { goto m4w5u; } goto eOoV1; iCOqb: b8ick: goto tG_Ej; ngPAD: I23q0: goto MeZy4; ob7wX: add_action('wp_print_styles', array($this, 'inspect_styles'), $this->max); goto g3Hz2; eOoV1: define('MMR_CSS_CACHE_URL', MMR_CACHE_URL); goto TXLdW; e9pFO: if (!current_user_can('administrator')) { goto XTT76; } goto VA1G0; JewEZ: $this->jsmin = 1; goto j1XGK; EPaGW: sXx05: goto HLXlI; ZoYQi: $this->mergecss = 1; goto EN0rR; GmPbZ: add_action('compress_css', array($this, 'minify_action'), 10, 1); goto OvK42; dkXfU: define('MMR_JS_CACHE_URL', MMR_CACHE_URL); goto Scnlk; RBj7R: $this->mergejs = 1; goto f8uuQ; KX3RP: if (is_admin()) { goto jN0qs; } goto QCgJw; GCJRW: $this->rootRelativeWPContentDir = parse_url(WP_CONTENT_URL, PHP_URL_PATH); goto ZXqM1; sLqbC: $this->rootRelativeWPContentDir = '/wp-content'; goto fuaWg; G_WjB: define('MMR_CACHE_URL', apply_filters('hpp_cache_url', WP_CONTENT_URL . '/mmr')); goto bW5h3; zaXEc: if (!(WP_DEBUG && !defined('MMR_CACHE_URL') && (!defined('MMR_JS_CACHE_URL') || !defined('MMR_CSS_CACHE_URL')))) { goto hOpRA; } goto WnKqi; Owmvz: hOpRA: goto ymtEZ; Scnlk: uC_xS: goto p7kBm; hPBjr: } public function mmr_files_callback() { goto wp7NJ; u8Xw6: OrKw3: goto tFCzz; oG3Ic: header('Content-Type: application/json'); goto X_ZSa; JEDj0: wp_die(); goto LASZ4; tFCzz: $return = array('js' => array(), 'css' => array(), 'stamp' => $_POST['stamp']); goto o7x_C; Uvwvz: if (!isset($_POST['purge'])) { goto xpdQ3; } goto xvIoD; yOwG6: hpp_purge_cache(); goto aa00k; MCrIW: gPOWl: goto h5VN6; i2cGA: if (!(count($files) > 0)) { goto w0BWz; } goto Iipaw; enQTx: wp_clear_scheduled_hook('mmr_minify'); goto TJ9Pf; Iipaw: foreach ($files as $file) { goto lHbja; T_LME: cQzW0: goto giKdC; rMide: gLOJZ: goto YjWLU; C61L2: aEW_Z: goto KjTKL; f227T: RyuwI: goto GnPWL; q396G: $accessed = date(get_option('date_format'), $accessed); goto uhISb; kg6FZ: if (!file_exists($script_path . '.accessed')) { goto FFePZ; } goto xJYGr; YjWLU: goto cQzW0; goto zDrB5; Nmwou: if (strtotime('this week') <= $accessed) { goto Pu7VE; } goto W3Mq_; DkZPO: $accessed = 'This Week'; goto T_LME; kCsn6: qRpPJ: goto zarhZ; EtCS0: jf3Wo: goto QtUDm; SKcCw: array_push($return[$ext], array('hash' => $hash, 'filename' => $filename, 'log' => $log, 'error' => $error, 'accessed' => $accessed)); goto f227T; Xf6kX: $ext = pathinfo($script_path, PATHINFO_EXTENSION); goto MZ7mI; MZ7mI: $log = file_get_contents($file); goto lSPo7; U1Es7: $error = true; goto IgeKs; uhISb: goto gLOJZ; goto uwzb2; xJYGr: $accessed = file_get_contents($script_path . '.accessed'); goto vJvV3; Su7bg: $hash = md5($filename); goto FzBTa; y9iXU: $filename = basename($script_path); goto N9xMH; Ee8WN: goto jf3Wo; goto C61L2; uwzb2: NwzHL: goto RNThF; HMy0H: uapZG: goto oXYpb; zDrB5: Pu7VE: goto DkZPO; lHbja: $script_path = substr($file, 0, -4); goto Xf6kX; KjTKL: $accessed = 'Today'; goto EtCS0; QtUDm: FFePZ: goto SKcCw; oXYpb: $accessed = 'Yesterday'; goto yUZzE; yUZzE: mFDHH: goto Ee8WN; lSPo7: $error = false; goto ZU0Kc; giKdC: goto mFDHH; goto HMy0H; nouKp: if (strtotime('yesterday') <= $accessed) { goto uapZG; } goto Nmwou; zarhZ: LLQBU: goto MoUv_; W3Mq_: if (strtotime('this month') <= $accessed) { goto NwzHL; } goto q396G; RNThF: $accessed = 'This Month'; goto rMide; K1Doq: w0qhM: goto i0fQ2; kSoGk: $filename = basename($minpath); goto K1Doq; IgeKs: C3zEa: goto y9iXU; i0fQ2: $hash = substr($filename, 0, strpos($filename, '-')); goto Su7bg; FzBTa: $accessed = 'Unknown'; goto kg6FZ; MoUv_: if (!file_exists($minpath)) { goto w0qhM; } goto kSoGk; N9xMH: switch ($ext) { case 'css': $minpath = substr($script_path, 0, -4) . '.min.css'; goto LLQBU; case 'js': $minpath = substr($script_path, 0, -3) . '.min.js'; goto LLQBU; } goto kCsn6; vJvV3: if (strtotime('today') <= $accessed) { goto aEW_Z; } goto nouKp; ZU0Kc: if (!(strpos($log, 'COMPRESSION FAILED') !== false)) { goto C3zEa; } goto U1Es7; GnPWL: } goto MCrIW; Zc0mk: if (!function_exists('hpp_purge_cache')) { goto TrpAO; } goto yOwG6; AYxIu: if (!hw_config('minify_merge')) { goto WdIIr; } goto enQTx; xvIoD: array_map('unlink', glob(MMR_CACHE_DIR . '/' . basename($_POST['purge']) . '*')); goto GdfJv; Elu1t: goto OrKw3; goto kZeh3; aa00k: TrpAO: goto u8Xw6; X_ZSa: echo json_encode($return); goto JEDj0; TJ9Pf: WdIIr: goto Oi_dd; wp7NJ: if (isset($_POST['purge']) && $_POST['purge'] == 'all') { goto NpHmt; } goto Uvwvz; kZeh3: NpHmt: goto AYxIu; GdfJv: xpdQ3: goto Elu1t; o7x_C: $files = (array) glob(MMR_CACHE_DIR . '/*.log', GLOB_BRACE); goto i2cGA; Oi_dd: $this->rrmdir(MMR_CACHE_DIR); goto Zc0mk; h5VN6: w0BWz: goto oG3Ic; LASZ4: } public function plugin_deactivate() { goto s6Qyv; FaHPP: $this->rrmdir(MMR_CACHE_DIR); goto qQxcX; Qo7ib: GTnar: goto Dt_o2; s6Qyv: if (!hw_config('minify_merge')) { goto GTnar; } goto Pw5hk; Dt_o2: if (!is_dir(MMR_CACHE_DIR)) { goto YemDF; } goto FaHPP; BuTM0: wp_clear_scheduled_hook('mmr_minify_check'); goto Qo7ib; qQxcX: YemDF: goto THHnk; Pw5hk: wp_clear_scheduled_hook('mmr_minify'); goto BuTM0; THHnk: } private function rrmdir($dir) { goto csJbH; csJbH: foreach (glob($dir . '/{,.}*', GLOB_BRACE) as $file) { goto AA0n9; rqqa5: WZOl5: goto iEe9q; iEe9q: ss1Vj: goto lz0cw; zjTxv: goto Qilih; goto zCftr; AA0n9: if (!(basename($file) != '.' && basename($file) != '..')) { goto WZOl5; } goto CPkof; UZwAd: $this->rrmdir($file); goto o1xGx; Avyw2: unlink($file); goto zjTxv; CPkof: if (is_dir($file)) { goto LBLeU; } goto Avyw2; zCftr: LBLeU: goto UZwAd; o1xGx: Qilih: goto rqqa5; lz0cw: } goto qODog; yvcj9: rmdir($dir); goto khq_s; qODog: xhxGM: goto yvcj9; khq_s: } public function load_admin_jscss($hook) { goto zBoQZ; zBoQZ: if (!('settings_page_wp2speed' != $hook)) { goto BWom1; } goto Z7yKc; E_28k: wp_enqueue_script('wp2speed', plugins_url('lib/asset/admin.js', __FILE__), array(), false, true); goto xvciI; Z7yKc: return; goto xjfk7; xjfk7: BWom1: goto OnO6Y; OnO6Y: wp_enqueue_style('wp2speed', plugins_url('lib/asset/admin.css', __FILE__)); goto E_28k; xvciI: } public function admin_menu() { add_options_page('PageSpeed Optimizer Settings', 'PageSpeed Optimizer', 'manage_options', 'wp2speed', array($this, 'merge_minify_refresh_settings')); } public function merge_minify_refresh_settings() { goto yiyrV; tcfBH: QfrLD: goto prve7; prve7: $class = empty($_GET['hpp-dev']) ? 'mmr-hidden' : ''; goto e103B; e103B: echo <<<END
\t\t<div id="pagespeed-optimizer-page">
\t\t\t\t<h2>Re-build Merge Files</h2>\t\t\t\t
\t\t\t\t<p>When a CSS or JS file is modified the plugin will automatically re-process the files. However, when a dependancy changes these files may become stale.<br>You can click to button below to re-build the merge files.</p>
\t\t
\t\t\t\t<div id="mmr_processed">
\t\t\t\t\t<a href="#" class="button button-secondary purgeall">Purge All</a>
\t\t\t\t
\t\t\t\t\t<div id="mmr_jsprocessed" class="{$class}">
\t\t\t\t\t\t<h4>The following Javascript files have been processed:</h4>
\t\t\t\t\t\t<ul class="processed"></ul>
\t\t\t\t\t</div>
\t\t\t\t
\t\t\t\t\t<div id="mmr_cssprocessed" class="{$class}">
\t\t\t\t\t\t<h4>The following CSS files have been processed:</h4>
\t\t\t\t\t\t<ul class="processed"></ul>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t
\t\t\t\t<p id="mmr_noprocessed"><strong style="display:none">No files have been processed</strong></p>
\t\t\t
\t\t\t</div>
END;
goto WAzk7; yiyrV: if (current_user_can('manage_options')) { goto QfrLD; } goto iccJc; iccJc: wp_die(__('You do not have sufficient permissions to access this page.')); goto tcfBH; WAzk7: } public function remove_cssjs_ver($src) { goto Pbe5i; Pbe5i: if (!strpos($src, '?ver=')) { goto sBeFd; } goto tQPFa; x7HJI: sBeFd: goto vsbMU; tQPFa: $src = remove_query_arg('ver', $src); goto x7HJI; vsbMU: return $src; goto besK0; besK0: } private function http2push_reseource($url, $type = '') { goto BJIjV; BJIjV: if (!headers_sent()) { goto CLPrR; } goto US_sg; YnMda: if (!($type == 'style' && !$this->http2pushCSS)) { goto fsPxU; } goto wFI1y; WG4O4: $http_link_header = array("Link: <{$url}>; rel=preload"); goto H1GDc; Ty4J5: header(implode('; ', $http_link_header), false); goto JIK3u; CLJ9R: Sx641: goto Ty4J5; US_sg: return false; goto aoKr9; gNN3Q: $http_link_header[] = "as={$type}"; goto CLJ9R; cw6IB: $url = parse_url($url, PHP_URL_PATH); goto WG4O4; eUaBn: if (!($type == 'script' && !$this->http2pushJS)) { goto mrZ59; } goto OJjYj; aoKr9: CLPrR: goto YnMda; H1GDc: if (!($type != '')) { goto Sx641; } goto gNN3Q; OJjYj: return false; goto uocVL; Qu4nk: fsPxU: goto eUaBn; uocVL: mrZ59: goto cw6IB; wFI1y: return false; goto Qu4nk; JIK3u: } private function host_match($url) { goto nFxB8; XgjTW: tV2na: goto G1DMr; Cgh42: goto tV2na; goto rc4qS; yLMAb: return false; goto a61Ob; bGG4a: $url_host = parse_url($url, PHP_URL_HOST); goto zlLTz; IuOqG: return false; goto Cgh42; rc4qS: ILb0G: goto GuA4q; zlLTz: if (!$url_host || $url_host == $this->host || strpos($url_host, $this->host) !== false) { goto ILb0G; } goto IuOqG; a61Ob: u7gJS: goto u2c36; nFxB8: if (!empty($url)) { goto u7gJS; } goto yLMAb; u2c36: $url = $this->ensure_scheme($url); goto bGG4a; GuA4q: return true; goto XgjTW; G1DMr: } private function ensure_scheme($url) { return preg_replace("/(http(s)?:\\/\\/|\\/\\/)(.*)/i", "http\$2://\$3", $url); } private function remove_scheme($url) { return preg_replace("/(http(s)?:\\/\\/|\\/\\/)(.*)/i", "//\$3", $url); } private function fix_wp_subfolder($file_path) { goto AgWn8; eD2V6: return $file_path; goto XnJRg; GI6cF: $this->wordpressdir = ''; goto rVVD9; t0VRL: $file_path = preg_replace('|^' . $details->path . '|', '/', $file_path); goto w36h1; LEgGV: QWEYf: goto GI6cF; sPr1d: if (!(!is_main_site() && defined('SUBDOMAIN_INSTALL') && !SUBDOMAIN_INSTALL)) { goto tgi2c; } goto ygWYk; AgWn8: if (!(0 && strpos($file_path, '/wp-') !== 0)) { goto f2S18; } goto YL_c1; vGxx6: if (!($this->wordpressdir != '' && substr($file_path, 0, strlen($this->wordpressdir) + 1) != $this->wordpressdir . '/' && substr($file_path, 0, strlen($this->rootRelativeWPContentDir) + 1) != $this->rootRelativeWPContentDir . '/')) { goto fd7j3; } goto V0dM7; YL_c1: $file_path = "/wp-content{$file_path}"; goto bv4l9; bv4l9: f2S18: goto sPr1d; V0dM7: if ($this->wordpressdir && !file_exists($this->root . '/' . $this->wordpressdir . $file_path)) { goto QWEYf; } goto e3efv; w36h1: tgi2c: goto vGxx6; ygWYk: $details = get_blog_details(); goto t0VRL; RgW1q: fd7j3: goto eD2V6; uLtR0: goto JqWWW; goto LEgGV; rVVD9: JqWWW: goto RgW1q; e3efv: $file_path = $this->wordpressdir . $file_path; goto uLtR0; XnJRg: } private function fix_path_url($file_path) { goto ZoFSs; FCiZl: q1Ss7: goto ZHyy_; ZoFSs: if (!($this->wordpressdir != '' && strpos($file_path, $this->wordpressdir . '/') === 0)) { goto q1Ss7; } goto UFS3V; UFS3V: $file_path = substr($file_path, strlen($this->wordpressdir)); goto FCiZl; ZHyy_: return $file_path; goto WGhQn; WGhQn: } private function fix_resource_url($url) { goto cPuR3; D1YD5: return $url; goto Rts8n; u2g6g: $fpath = trim(substr($url, strlen($home_url)), '/'); goto VwWVP; hpzNy: GyuWw: goto Npkxb; jK3Cy: if (!($this->wordpressdir != '' && strpos($url, $home_url) === 0)) { goto Jdi9I; } goto u2g6g; VwWVP: if (!(strpos($fpath, $this->wordpressdir . '/') === 0)) { goto GyuWw; } goto R6AYB; R6AYB: $url = rtrim($home_url, '/') . substr($fpath, strlen($this->wordpressdir)); goto hpzNy; Npkxb: Jdi9I: goto D1YD5; cPuR3: $home_url = $this->home_url(); goto jK3Cy; Rts8n: } function home_url() { goto hb6qa; qP5oj: $url = preg_replace('#\\/(' . apply_filters('hpp_url_langs', 'en|vi') . ')/?$#', '', $url); goto tKoGU; tKoGU: $this->_data['siteurl'] = $url; goto CxJIe; fKV0w: $url = trim(get_home_url(), '/'); goto qP5oj; Zusnz: return $this->_data['siteurl']; goto oeyZ2; hb6qa: if (isset($this->_data['siteurl'])) { goto Toite; } goto fKV0w; CxJIe: Toite: goto Zusnz; oeyZ2: } public function inspect_styles() { goto m3NM3; YUypF: return; goto dv5ft; M9qLY: global $wp_styles; goto ryzf_; ryzf_: $this->process_scripts($wp_styles, 'css'); goto gg2VU; dv5ft: J30y9: goto iztnt; iztnt: wp_styles(); goto M9qLY; m3NM3: if (hpp_shouldLazy()) { goto J30y9; } goto YUypF; gg2VU: } public function inspect_scripts() { goto x10Mx; EezOv: global $wp_scripts; goto m5BTH; m5BTH: $this->process_scripts($wp_scripts, 'js'); goto XkKx6; xfMio: return; goto NOTe7; NOTe7: gapIz: goto W331Q; x10Mx: if (hpp_shouldLazy()) { goto gapIz; } goto xfMio; W331Q: wp_scripts(); goto EezOv; XkKx6: } public function inspect_stylescripts_footer() { goto n7rTR; y9rER: slew0: goto fcqTR; NTRlJ: $this->buffering = false; goto Exz_P; b39p3: if (!$this->buffering) { goto slew0; } goto NTRlJ; E752C: Klwq3: goto O0N5O; EkFLX: $this->process_scripts($wp_scripts, 'js', true); goto St7zV; TZhti: eCtGI: goto SrzLL; CSABH: do_action('wp2speed_merged'); goto TZhti; oqTM8: return; goto E752C; n7rTR: if (hpp_shouldLazy()) { goto Klwq3; } goto oqTM8; M9OAI: $this->process_scripts($wp_styles, 'css', true); goto b39p3; Exz_P: ob_end_flush(); goto y9rER; fcqTR: if (!$this->hasMerged) { goto eCtGI; } goto DfBGp; St7zV: global $wp_styles; goto M9OAI; O96Iv: wp_schedule_single_event(time(), 'mmr_minify'); goto FV8UH; O0N5O: global $wp_scripts; goto EkFLX; DfBGp: if (!hw_config('minify_merge')) { goto IIRjA; } goto O96Iv; FV8UH: IIRjA: goto CSABH; SrzLL: } function _delay_js($code, $file_path) { goto WHMuL; SMMPi: if (!isset($this->_data['first_js'])) { goto GTb9y; } goto I_PHv; ZRG1P: $this->save_asset(MMR_CACHE_DIR . "/child-{$fn}.js", hqp_fix_encoding($code)); goto I2GNP; bqpku: if (!hw_config('merge_js')) { goto UD9px; } goto nimHf; I2GNP: etMff: goto XWn5t; xoAps: UD9px: goto GAqgw; jGz4R: $this->save_asset(MMR_CACHE_DIR . "/site-{$fn}.js", hqp_fix_encoding($code)); goto XC2iB; JZ8x7: $this->_data['lazy_assets']['hpp-0'] = ['t' => 'js', 'l' => MMR_JS_CACHE_URL . '/child-' . $fn . '.js']; goto NXCEm; Czqp4: if (!hw_config('merge_js')) { goto DkuK0; } goto JZ8x7; I_PHv: if (!(hw_config('merge_js') && !file_exists(MMR_CACHE_DIR . "/site-{$fn}.js"))) { goto AOZK1; } goto jGz4R; wEfeY: $fn = basename($file_path, '.js'); goto SMMPi; NXCEm: DkuK0: goto YKl2D; EYLNm: return true; goto ZEYI0; MSO_b: $this->_data['first_js'] = $file_path; goto kmlJJ; FD8Fn: qO6hV: goto EYLNm; kmlJJ: $c = file_get_contents(file_exists(__DIR__ . '/main.min.js') ? __DIR__ . '/main.min.js' : __DIR__ . '/main.js'); goto Czqp4; XWn5t: if (file_exists(MMR_CACHE_DIR . '/bootstrap.js')) { goto qO6hV; } goto OEPSO; nimHf: $this->_data['lazy_assets']['hpp-1'] = ['t' => 'js', 'l' => MMR_JS_CACHE_URL . '/site-' . $fn . '.js', 'deps' => 'hpp-0']; goto xoAps; OEPSO: file_put_contents(MMR_CACHE_DIR . '/bootstrap.js', $c); goto FD8Fn; GAqgw: return false; goto kf2dH; YKl2D: if (!(hw_config('merge_js') && !file_exists(MMR_CACHE_DIR . "/child-{$fn}.js"))) { goto etMff; } goto ZRG1P; kf2dH: GTb9y: goto MSO_b; XC2iB: AOZK1: goto bqpku; WHMuL: $code = $this->fixOtherJS($code); goto wEfeY; ZEYI0: } function _delay_asset($file_path, $type = 'js', array $att = []) { goto ZJliN; d2frC: if (!isset($att['id'])) { goto o3fUl; } goto A1ScM; yYwO9: QjhoI: goto zk_at; cNdh7: if (!(empty($att['id']) && $file_path == '/wp-includes/js/jquery/jquery.min.js')) { goto kdMR2; } goto fTJBo; PONlj: $att['deps'] = 'jquery'; goto D4RVo; HGqHC: ZJwVZ: goto Vl_7E; BMxFp: o1CTI: goto BE_Dr; BaqeA: goto st0gK; goto ct7DP; BqhCM: sSi8X: goto jW2QA; Uo6oe: ePhnc: goto BNUFO; VJpka: global $wp_scripts, $wp_styles; goto hc5Cx; zk_at: if (!(isset($att['id']) && $att['id'] == '-' . $type)) { goto GEZ7f; } goto MdHe6; el2xF: UQiGI: goto g8eVF; g8eVF: if (!empty($att['id'])) { goto HXZZe; } goto z8BLb; BNUFO: $this->_data['filter_assets'][$file_path] = 1; goto PzUj4; xkmYp: if (!(!(strpos($file_path, 'http://') !== false || strpos($file_path, 'https://') !== false) && strpos($file_path, '/') !== 0)) { goto sSi8X; } goto n35Pi; CHLUP: a35BZ: goto f0Rla; LM7D3: FLyXF: goto tHNE9; fTJBo: $att['id'] = 'jquery'; goto GDN63; LT1Tb: $att['id'] = 'jquery'; goto okxAt; MdHe6: $att['id'] = basename(basename($file_path, '.min.' . $type), '.' . $type); goto ib1yx; Kx5EO: if ($type == 'css' && !hw_config('merge_css')) { goto IG4c4; } goto sNn_K; iELwv: $att['id'] = substr($att['id'], 0, -3); goto irsKw; USU2z: $wp_scripts->done[] = $att['id']; goto HGqHC; sNn_K: if (!($type == 'js' && !hw_config('merge_js'))) { goto a35BZ; } goto Cr6Wu; oEl6s: $att['deps'] = 'hpp-s-' . $this->_data['last_css_i']++; goto BaqeA; jW2QA: if (!isset($this->_data['filter_assets'][$file_path])) { goto ePhnc; } goto Z742J; tHNE9: $this->_data['lazy_assets'][$att['id']] = array_filter(array_merge(['t' => $type, 'l' => $file_path], $att, ['id' => ''])); goto lFbJ1; Vl_7E: if (!($type == 'css' && !in_array($att['id'], $wp_styles->done))) { goto o1CTI; } goto yPm00; irsKw: NH1ic: goto KT3RU; ZDroZ: HXZZe: goto TLF_f; sKNlN: if (!isset($this->_data['last_css_i'])) { goto cYfTr; } goto oEl6s; IXGRX: if (!(in_array($att['id'], ['jquery-migrate', 'jquery-migrate-js']) && empty($att['deps']))) { goto aTh4M; } goto PONlj; Yqjsj: $att['id'] = 'hpp-s-' . $this->_data['last_css_i']; goto el2xF; Cr6Wu: if (!in_array($att['id'], ['jquery-core', 'jquery-core-js'])) { goto lu5pL; } goto LT1Tb; t2bNm: o3fUl: goto Yqjsj; ib1yx: GEZ7f: goto cNdh7; i046T: st0gK: goto d2frC; S6s6X: return; goto Xe5Ip; f0Rla: goto UQiGI; goto pfiHV; ZJliN: $file_path = hpp_attr_value($file_path); goto EoWiH; n35Pi: $file_path = MMR_JS_CACHE_URL . '/' . ltrim($file_path, '/'); goto BqhCM; jlKs4: $att['id'] .= '-' . $type; goto LM7D3; Z742J: return; goto Uo6oe; MhGNc: if (!(isset($att['id']) && in_array($att['id'], ['jquery-js', 'jquery-core-js']))) { goto NH1ic; } goto iELwv; GDN63: kdMR2: goto MhGNc; EJOeP: $this->_data['lazy_assets'] = array(); goto yYwO9; BE_Dr: WM6uT: goto Kx5EO; z8BLb: $att['id'] = md5($file_path); goto ZDroZ; Xe5Ip: zEBII: goto xkmYp; KT3RU: if (!(!empty($att['id']) && strpos($file_path, '/mmr/') === false)) { goto WM6uT; } goto VJpka; hc5Cx: if (!($type == 'js' && !in_array($att['id'], $wp_scripts->done))) { goto ZJwVZ; } goto USU2z; pfiHV: IG4c4: goto sKNlN; A1ScM: $att['_id'] = $att['id']; goto t2bNm; okxAt: lu5pL: goto IXGRX; yPm00: $wp_styles->done[] = $att['id']; goto BMxFp; EoWiH: if ($file_path) { goto zEBII; } goto S6s6X; D4RVo: aTh4M: goto CHLUP; Y2y9E: if (!isset($this->_data['lazy_assets'][$att['id']])) { goto FLyXF; } goto jlKs4; PzUj4: if (isset($this->_data['lazy_assets'])) { goto QjhoI; } goto EJOeP; ct7DP: cYfTr: goto HCLJB; HCLJB: $this->_data['last_css_i'] = 0; goto i046T; TLF_f: $att = apply_filters('hpp_delay_asset_att', array_merge($att, ['l' => $file_path]), $type); goto Y2y9E; lFbJ1: } function fixOtherJS($code, $ready = 0) { goto AKURb; yJ4S1: $jq1 = ['noreg' => ['jQuery(function', 'jQuery( function', '$(function', '$( function']]; goto Iy_JU; BURMH: QZ8RG: goto s8ZL3; XPw2x: if (!hpp_in_str($code, ['_HWIO.timeout('])) { goto QZ8RG; } goto a5Tix; a5Tix: return $code; goto BURMH; YLb3c: sJJKR: goto yJ4S1; fMBPK: $code = str_replace($jq1['noreg'], $repl, $code); goto kWEwb; FeFYi: $code = str_replace($jq['noreg'], $repl, $code); goto GRIzE; s8ZL3: $jq = ['noreg' => ['jQuery(document).ready(', '$(document).ready(', 'jQuery( document ).ready(', '$( document ).ready(', 'jQuery().ready(', '$().ready(', 'jQuery( ).ready(', '$( ).ready(', 'jQuery(window).load(', '$(window).load(', 'jQuery( window ).load(', '$( window ).load('], 'reg' => ['#(document|window).addEventListener\\s?\\(\\s?("|\')(DOMContentLoaded|load)("|\')\\s?,#']]; goto Ex2tP; GRIzE: foreach ($jq['reg'] as $regex) { $code = preg_replace($regex, $repl, $code); XF31J: } goto YLb3c; AKURb: $code = preg_replace('#window\\.lazySizesConfig\\.(.*?)=(.*?);#si', '1?1: $0', $code); goto XPw2x; kWEwb: return $code; goto Vtk7Y; Ex2tP: $repl = $ready || hw_config('merge_js') ? '_HWIO.readyjs(' : '_HWIO.docReady('; goto FeFYi; Iy_JU: $repl = $ready || hw_config('merge_js') ? '_HWIO.readyjs(function' : '_HWIO.timeout(function'; goto fMBPK; Vtk7Y: } function fixCSS($code) { goto SJ2aM; tSbno: if (!(strpos($code, '@font-face') !== false)) { goto QjUOs; } goto v24Ad; bZONJ: if (!count($m[0])) { goto QgSC0; } goto xotGx; v24Ad: preg_match_all('#@font-face(\\s+)?\\{(.*?)\\}([\\s;]+)?#si', $code, $m); goto PX9SK; og6Ni: $code = '@charset "UTF-8";' . "\n" . $code; goto cQe0W; cKU3i: if (!(strpos($code, '@charset "UTF-8";') !== false)) { goto ZqUcv; } goto GK33x; PX9SK: foreach ($m[0] as $i => $str) { goto TLH9u; c2D6A: $m[2][$i] = preg_replace('#font-display(.*?);#s', 'font-display:swap;', $m[2][$i]); goto cHGmM; eYEhU: P6HEI: goto E7jG6; E7jG6: $code = str_replace($str, '@font-face{' . $m[2][$i] . '}', $code); goto eJx7a; LPdos: vQ5sc: goto KmGAE; cHGmM: goto P6HEI; goto LPdos; KmGAE: $m[2][$i] = 'font-display:swap;' . $m[2][$i]; goto eYEhU; TLH9u: if (strpos($str, 'font-display') === false) { goto vQ5sc; } goto c2D6A; eJx7a: zMJRk: goto cGdIB; cGdIB: } goto rI6au; GxJ82: $code = join("\n", $m[0]) . "\n" . $code; goto W1U5s; W1U5s: QgSC0: goto fZatZ; F4DTI: return $code; goto qYOlI; xotGx: foreach ($m[0] as $s) { $code = str_replace($s, '', $code); tFT1o: } goto SJXYv; rI6au: h2dl0: goto C2HSg; fZatZ: PFEQQ: goto tSbno; GK33x: $code = str_replace('@charset "UTF-8";', '', $code); goto og6Ni; SJ2aM: if (!(strpos($code, '@import') !== false)) { goto PFEQQ; } goto j6D5e; C2HSg: QjUOs: goto cKU3i; j6D5e: preg_match_all('#@import(\\s+)url\\((.*?)\\)([\\s;]+)?#si', $code, $m); goto bZONJ; cQe0W: ZqUcv: goto F4DTI; SJXYv: a8PMK: goto GxJ82; qYOlI: } function jqueryInJS($js) { return stripos($js, ' jQuery Migrate ') !== false || stripos($js, '/*! jQuery v') !== false; } function getExtraAssets() { return isset($this->_data['lazy_assets']) ? $this->_data['lazy_assets'] : array(); } function can_merge_handle(&$scripts, $handle, $ext) { goto XHe1n; zxjS_: HaWR3: goto FVO2x; XHe1n: $deps = $this->get_all_deps($scripts, $handle, $ext); goto UFw5n; bLqKm: foreach ($this->_data['active_handles'] as $it) { goto DPE6o; BLzUt: goto rTaFH; goto rq0Yo; OdpdJ: if (!isset($it['handle'])) { goto Sx_un; } goto DdxH_; hK0Zg: j6MWS: goto IAnAB; DPE6o: if (isset($it['handles'])) { goto RTyHs; } goto OdpdJ; LY_Qf: $handles = array_merge($it['handles'], $handles); goto VGDK2; VGDK2: rTaFH: goto hK0Zg; rq0Yo: RTyHs: goto LY_Qf; DdxH_: $handles[] = $it['handle']; goto fHveB; fHveB: Sx_un: goto BLzUt; IAnAB: } goto hvt8j; tWZSJ: return apply_filters('hpp_can_merge_file', true, $handle, $ext, array_unique($handles)); goto hCLqG; hvt8j: ocCU3: goto tWZSJ; FVO2x: $handles = []; goto bLqKm; UFw5n: foreach ($deps as $dep) { goto tgfF0; KHgVj: nNYqy: goto ic8EX; h_JjO: return false; goto KHgVj; ic8EX: u22hr: goto emoEJ; tgfF0: if (!($scripts->registered[$dep]->src && !$this->host_match($scripts->registered[$dep]->src))) { goto nNYqy; } goto h_JjO; emoEJ: } goto zxjS_; hCLqG: } function get_all_deps($scripts, $handle, $ext) { goto iGL2K; h9Yh6: if (empty($r['deps'])) { goto SLL4d; } goto NgvTl; Bkoa_: $all = array_merge($all, $scripts->registered[$handle]->deps); goto zcFwJ; xdncH: return $all; goto ItEn7; nDyFy: SLL4d: goto xdncH; NgvTl: $all = array_unique(array_merge($all, array_filter(explode(',', $r['deps'])))); goto nDyFy; iGL2K: $all = []; goto Bkoa_; HG_9n: $r = apply_filters('hpp_delay_asset_att', ['id' => $handle, 'deps' => join(',', $all)], $ext); goto h9Yh6; zcFwJ: foreach ($all as $dep) { $all = array_merge($all, $this->get_all_deps($scripts, $dep, $ext)); ciYPQ: } goto d1i6I; d1i6I: oeTnp: goto HG_9n; ItEn7: } static function inline_text($str) { return preg_replace('/(\\s+){2,}/', ' ', preg_replace("/[\r\n]*/", "", $str)); } function save_asset($file, $text) { file_put_contents($file, apply_filters('hpp_save_merge_file', $text, $file)); } function ext2local(&$ourList, $handle, $script_path = '', $tp = '') { goto kIbo3; vnJpa: $path = dirname($this->root . $script_path); goto yfHx2; yfHx2: if (is_dir($path)) { goto W6a7c; } goto hE4k6; KJXYP: $script_path = $this->script_path($ourList->registered[$handle]->src); goto jDGAH; jDGAH: NPDAf: goto rKk30; F2Crb: JvH3M: goto RNsYd; kIbo3: if (!(hw_config('merge_' . $tp) && isset($ourList->registered[$handle]))) { goto JvH3M; } goto xMP_W; xT9JW: W6a7c: goto enWW_; xMP_W: if ($script_path) { goto NPDAf; } goto KJXYP; rKk30: $url = !hpp_in_str($ourList->registered[$handle]->src, ['http://', 'https://']) ? 'https://' . trim($ourList->registered[$handle]->src, '/') : $ourList->registered[$handle]->src; goto vnJpa; yU_t3: $ourList->registered[$handle]->src = $this->home_url() . $script_path; goto F2Crb; hE4k6: @mkdir($path, 0755, true); goto xT9JW; enWW_: file_put_contents($this->root . $script_path, hpp_curl_get($url, [], false, 200)); goto yU_t3; RNsYd: } function if_merge($val, $def = 'jquery', $tp = 'js') { return hw_config('merge_' . $tp) ? $val : $def; } function get_css_import($script_path, $text) { goto qEn_g; oucor: return $text . "\n"; goto EvrEz; jra0n: if (!(strpos($text, '@import ') !== false)) { goto cxQ3P; } goto B_01L; B_01L: $home_url = $this->home_url(); goto qlS4B; oIf5_: cxQ3P: goto oucor; qEn_g: return $text; goto jra0n; inbdm: szLw1: goto oIf5_; qlS4B: preg_match_all('#@import(\\s+)url\\((.*?)\\)([\\s;]+)?#si', hpp_strip_comment($text, 'css'), $m); goto iBOMK; iBOMK: foreach ($m[0] as $i1 => $l) { goto S54Io; S54Io: if ($this->host_match($m[2][$i1])) { goto Ps71g; } goto MqPU8; TH1_A: $script_path = isset($p['path']) ? $p['path'] : ''; goto DXI50; cN1XX: qCD0B: goto NRpzr; BcxSA: if (!file_exists($fpath)) { goto ZEquW; } goto hjPuk; ih3hX: $text = str_replace($l, '/*[' . $fpath . ']*/' . "\n" . $this->get_css_import($script_path, $css), $text); goto uDywa; wBVos: $css = hpp_curl_get($path, [], false, 200); goto gtwS_; nwW6Y: $path = trim(trim(trim($path), '"'), "'"); goto goLvy; tGdyv: Ps71g: goto jInPB; zdgAe: VLTAW: goto FmTm2; jInPB: $path = strpos($m[2][$i1], $home_url) === 0 ? trim(substr($m[2][$i1], strlen($home_url)), '/') : $m[2][$i1]; goto nwW6Y; triDJ: if (!($path != '')) { goto mFxT2; } goto eUY3G; kVlth: $css = preg_replace_callback("/url\\(\\s*['\"]?(?!data:)(?!http)(?![\\/'\"])(.+?)['\"]?\\s*\\)/i", function ($m) use($_url) { $m[1] = trim(trim(trim($m[1]), '"'), "'"); return "url('" . $_url . "/{$m[1]}')"; }, $css); goto G33WQ; XrA4G: $css = preg_replace_callback("/url\\(\\s*['\"]?(?!data:)(?!http)(?![\\/'\"])(.+?)['\"]?\\s*\\)/i", function ($m) use($_url) { $m[1] = trim(trim(trim($m[1]), '"'), "'"); return "url('" . $_url . "/{$m[1]}')"; }, $css); goto ih3hX; w0xdu: $fpath = $this->root . '/' . rtrim($script_path, '/') . '/' . $path; goto BcxSA; NRpzr: $path = hpp_fix_resource_url($path); goto wBVos; eUY3G: $script_path .= '/' . dirname($path); goto iLqS4; uDywa: ZEquW: goto Ho5bz; efwlh: hXeMu: goto GMj_h; FmTm2: if (!(strpos($path, parse_url($home_url, PHP_URL_HOST)) === false)) { goto qCD0B; } goto D5Mm7; D5Mm7: goto hXeMu; goto cN1XX; gtwS_: $p = parse_url($path); goto TH1_A; G33WQ: $text = str_replace($l, '/*[' . $path . ']*/' . "\n" . $this->get_css_import($script_path, $css), $text); goto XlIzF; MqPU8: goto hXeMu; goto tGdyv; iLqS4: mFxT2: goto Y37Jm; XlIzF: KwtA3: goto efwlh; Ho5bz: goto KwtA3; goto zdgAe; hjPuk: $css = file_get_contents($fpath); goto triDJ; goLvy: if (hpp_is_url($path)) { goto VLTAW; } goto w0xdu; DXI50: $_url = dirname($path); goto kVlth; Y37Jm: $_url = $this->fix_resource_url($home_url . $this->fix_path_url($script_path)); goto XrA4G; GMj_h: } goto inbdm; EvrEz: } private function process_scripts(&$script_list, $ext, $in_footer = false) { goto Nodyu; bY0Wo: J28q3: goto mxTzu; MFptb: GP9ae: goto YnMIg; YnMIg: $this->hasMerged = true; goto NIpS6; JTGjB: $done = array_merge($done, $handles[$i]['handles']); goto Iq1Zc; gUnlC: if ($ext == 'js') { goto BrptX; } goto FY5HX; Cs80K: wp_dequeue_style($handles[$i]['handle']); goto SPGiW; NIpS6: $output[$i] = ''; goto Rbalz; oltJk: $script_line_end = "\n"; goto zgi4P; wkbAT: $output = array_filter($output); goto T6vzB; rwFCD: WmKiG: goto sLuch; bHimB: $i++; goto mkvDb; k7O6T: l9eMf: goto dXZwE; xH3lX: try { $style = apply_filters('hpp_inline_style', $style); } catch (Exception $e) { hpp_write_log($e->getMessage()); } goto wXpmS; m8z4G: goto cX2Du; goto ovITr; uItdZ: $this->_data['active_handles'] = $handles; goto nq09a; dXZwE: $this->scripts[$ext]['q'] = [$scripts->queue]; goto oschN; Lkq2I: xFALM: goto r1671; mxTzu: $this->inline_scripts['css'] = []; goto DOSvC; z9uWg: $file_path = '/' . $hash . '-' . $handles[$i]['modified'] . '.' . $ext; goto zolpF; oschN: RK4KL: goto pCt3i; tIg03: QvI0B: goto JTGjB; zcBEN: $script_list->done = array_unique(array_merge($script_list->done, $done)); goto eVFTU; zgi4P: if (!($ext == 'js')) { goto DUe06; } goto hfx3o; ou4MA: $style = ''; goto U5cZ0; FY5HX: $att['media'] = !empty($handles[$i]['media']) ? $handles[$i]['media'] : 'all'; goto Cs80K; FOYqj: LUeen: goto bHimB; M_Hh3: lKrSu: goto z9uWg; jKlkE: VvAYG: goto XUj3t; oBPMm: $this->scriptcount++; goto XwTEu; XUROu: $att['deps'] = join(",", $deps); goto jKlkE; hY61n: Tdgmc: goto zSE7U; Nodyu: global $blog_id; goto LG13G; xhrgE: GrxrB: goto Tjc52; bftgW: wp_dequeue_script($handles[$i]['handle']); goto YgREj; YgREj: $this->_delay_asset($scripts->registered[$handles[$i]['handle']]->src, 'js', $att); goto bAx4N; pCt3i: $scripts->all_deps($scripts->queue); goto IN3k5; ldNKl: sVGWN: goto A75V5; lW5TY: $this->scripts['css']['style'][$handles[$i]['media']] = ''; goto rwFCD; yYRmg: if (empty($deps)) { goto VvAYG; } goto XUROu; Tjc52: if (!$style) { goto J28q3; } goto xH3lX; wXpmS: printf("<style type='text/css'>\n%s\n</style>\n", $style); goto bY0Wo; r1671: if (empty($handles[$i]['handles'])) { goto x9swl; } goto W6hJI; fmNKm: $this->scripts[$ext]['log'] = array_merge($this->scripts[$ext]['log'], $log); goto z9IAj; eVFTU: if (!($ext == 'css' && !empty($this->inline_scripts['css']))) { goto z1Jgi; } goto ou4MA; W6hJI: $this->inline_scripts[$ext] = array_merge((array) $this->inline_scripts[$ext], $handles[$i]['handles']); goto psYlx; mkvDb: goto XIGuH; goto BE1_2; OlIxa: miDNr: goto Lkq2I; AbV2F: $i = 0; goto B15gu; bNTjV: wp_enqueue_style($handles[$i]['handle']); goto kv2X1; pNJjX: if (isset($this->scripts['css']['style'][$handles[$i]['media']])) { goto WmKiG; } goto lW5TY; T6vzB: if (!($ext == 'js')) { goto peOO3; } goto E5eEE; sLuch: $this->scripts['css']['style'][$handles[$i]['media']] .= $output[$i] . "\n"; goto OlIxa; Hlij8: $min_path = '/' . $hash . '-' . $handles[$i]['modified'] . '.min.' . $ext; goto aeLeX; zHEIQ: if (!($i < $l)) { goto YvsHT; } goto I4v1l; aeLeX: $min_exists = file_exists(MMR_CACHE_DIR . $min_path); goto OP9g1; E5eEE: if ($in_footer) { goto sVGWN; } goto Yc5As; ePX5D: if (!isset($this->scripts[$ext]['q'])) { goto l9eMf; } goto P0k39; U5cZ0: foreach ($this->inline_scripts['css'] as $i => $handle) { goto PvbIw; I6fF1: if (empty($output)) { goto cwCJ3; } goto kgyF5; YdUmi: goto AOdQv; goto lI0S6; PvbIw: if (!empty($handle)) { goto Uk2nc; } goto YdUmi; Mabrj: cwCJ3: goto pC5AO; mTROJ: $output = $this->get_inline_data($handle, 'css'); goto I6fF1; kgyF5: $style .= hw_config_val('debug', 1, '/*[' . $handle . ']*/') . "\n" . $output; goto Mabrj; pC5AO: AOdQv: goto OZ3g5; lI0S6: Uk2nc: goto mTROJ; OZ3g5: } goto xhrgE; Igp2l: $should_minify = true; goto gTkpr; P0k39: $this->scripts[$ext]['q'][] = $scripts->queue; goto zNjxs; H6dG3: goto xFALM; goto MFptb; zNjxs: goto RK4KL; goto k7O6T; RhbNQ: $hash = $blog_id . '-' . $hash; goto M_Hh3; XUj3t: $this->inline_scripts[$ext][] = $handles[$i]['handle']; goto gUnlC; psYlx: x9swl: goto oBPMm; hfx3o: $script_line_end = ";\n"; goto IdYvK; BGUIX: $deps = $scripts->registered[$handles[$i]['handle']]->deps; goto yYRmg; jlmmQ: $this->_delay_asset($scripts->registered[$handles[$i]['handle']]->src, 'css', $att); goto m8z4G; O3Wb8: mVr9G: goto EQO8q; XwTEu: JOi37: goto FOYqj; LG13G: if (!$script_list) { goto Tdgmc; } goto oltJk; bAx4N: cX2Du: goto OeTLN; B15gu: $l = count($handles); goto damQn; IdYvK: DUe06: goto PYlkA; ovITr: BrptX: goto bftgW; T2gZB: $log = $output = []; goto AbV2F; IN3k5: $handles = $this->get_handles($ext, $scripts, !$in_footer); goto uItdZ; DOSvC: z1Jgi: goto hY61n; A75V5: peOO3: goto Fnr0S; yFnNo: if (!(is_multisite() && $blog_id > 1)) { goto lKrSu; } goto RhbNQ; kv2X1: Mmv1p: goto jlmmQ; sk5gB: $att = ['id' => $handles[$i]['handle']]; goto BGUIX; PYlkA: $scripts = clone $script_list; goto ePX5D; nq09a: $done = $scripts->done; goto T2gZB; OP9g1: if (1) { goto GP9ae; } goto H6dG3; EQO8q: if (!($ext == 'css' && !empty($output[$i]))) { goto miDNr; } goto pNJjX; Rbalz: $log[$i] = ""; goto Igp2l; BE1_2: YvsHT: goto wkbAT; I4v1l: if (!isset($handles[$i]['handle'])) { goto QvI0B; } goto sk5gB; Iq1Zc: $hash = hash('adler32', $this->home_url() . implode('', $handles[$i]['handles'])); goto yFnNo; damQn: XIGuH: goto zHEIQ; Fnr0S: if (!hw_config('merge_' . $ext)) { goto GFTnJ; } goto fmNKm; SPGiW: if (!isset($_GET['hpp-gen-critical'])) { goto Mmv1p; } goto bNTjV; zolpF: $full_path = MMR_CACHE_DIR . $file_path; goto Hlij8; z9IAj: GFTnJ: goto zcBEN; gTkpr: foreach ($handles[$i]['handles'] as $handle) { goto GutWc; N8qR8: $att['media'] = !empty($handles[$i]['media']) ? $handles[$i]['media'] : 'all'; goto v7T2P; NSwnV: $this->scripts[$ext]['files'][$handle] = apply_filters('hpp_merge_file', $contents, $handle, $ext, $this->root . $script_path); goto sdPEp; OqCs0: wMvXr: goto sQ197; sdPEp: $log[$i] .= "\n"; goto e3Pxv; jyYNq: $script_path = $this->script_path($scripts->registered[$handle]->src); goto EhIwN; nkFFa: Pm2uJ: goto JRFhe; E7z1w: if (!(extension_loaded('mbstring') && mb_detect_encoding($scriptContent, 'UTF-8,ISO-8859-1', true) == 'ISO-8859-1')) { goto TisoM; } goto rEc0F; sQ197: $log[$i] .= " - " . $handle . " - " . $scripts->registered[$handle]->src; goto jyYNq; vC_T2: $contents .= preg_replace("/^/", '', $scriptContent) . $script_line_end; goto Qqktu; etQj0: gEYkT: goto ggG26; EXTM0: $output[$i] .= hw_config_val('debug', 1, '/*[' . $handle . ']*/') . "\n" . $contents; goto NSwnV; Vub2f: i2rB_: goto LAI9m; Ygf63: $this->_delay_asset($scripts->registered[$handle]->src, $ext, $att); goto etQj0; Vr66o: $contents = $this->get_css_import(dirname($script_path), $contents); goto OTOEI; LAI9m: $contents = ''; goto TdkdS; OTOEI: $contents = preg_replace("/url\\(\\s*['\"]?(?!data:)(?!http)(?![\\/'\"])(.+?)['\"]?\\s*\\)/i", "url('" . $this->fix_resource_url($this->home_url() . $this->fix_path_url(dirname($script_path))) . "/\$1')", $contents); goto rSaOW; JRFhe: if (!($ext == 'css')) { goto GBlxm; } goto Vr66o; tnrfo: A634N: goto qSOTY; v7T2P: KjgAU: goto Ygf63; EhIwN: if (file_exists($this->root . $script_path)) { goto i2rB_; } goto e5DBW; GutWc: if (!($ext == 'js' && !$this->can_merge_handle($scripts, $handle, $ext))) { goto wMvXr; } goto YD0hG; M9OxF: goto PZdF_; goto OqCs0; e5DBW: goto PZdF_; goto Vub2f; qSOTY: $scriptContent = file_get_contents($this->root . $script_path); goto E7z1w; YD0hG: $this->_delay_asset($scripts->registered[$handle]->src, 'js', array_filter(['id' => $handle, 'deps' => join(',', $scripts->registered[$handle]->deps)])); goto M9OxF; GqZQt: $contents .= implode($script_line_end, $scripts->registered[$handle]->extra['before']) . $script_line_end; goto tnrfo; Qqktu: if (!(!empty($scripts->registered[$handle]->extra['after']) && count($scripts->registered[$handle]->extra['after']) > 0)) { goto Pm2uJ; } goto zuR9c; rEc0F: $scriptContent = utf8_encode($scriptContent); goto Zwzsh; TdkdS: if (!($ext == 'js' && isset($scripts->registered[$handle]->extra['before']) && count($scripts->registered[$handle]->extra['before']) > 0)) { goto A634N; } goto GqZQt; GOqns: if (!($ext == 'css')) { goto KjgAU; } goto N8qR8; e3Pxv: if (hw_config('merge_' . $ext)) { goto gEYkT; } goto JaSsw; zuR9c: $contents .= implode($script_line_end, $scripts->registered[$handle]->extra['after']) . $script_line_end; goto nkFFa; JaSsw: $att = array_filter(['id' => $handle, 'deps' => join(',', $scripts->registered[$handle]->deps)]); goto GOqns; Zwzsh: TisoM: goto vC_T2; rSaOW: GBlxm: goto EXTM0; ggG26: PZdF_: goto AKxuF; AKxuF: } goto O3Wb8; OeTLN: goto JOi37; goto tIg03; Yc5As: wp_enqueue_script('hpp-bootstrap', MMR_JS_CACHE_URL . '/bootstrap.js', array(), false, false); goto ldNKl; zSE7U: } function get_inline_data($handle, $ext) { goto tf_6Y; hRvek: $out .= implode("\n", (array) $wp_styles->get_data($handle, 'after')); goto i4d0N; buAkC: $out .= implode($script_line_end, $scripts->registered[$handle]->extra['before']) . $script_line_end; goto KZpd_; ibBzw: return $out; goto Kopj4; KZpd_: TRr0B: goto rgWA5; V65D_: WxkBT: goto TZvDI; Naglk: if (!(isset($scripts->registered[$handle]->extra['before']) && count($scripts->registered[$handle]->extra['before']) > 0)) { goto TRr0B; } goto buAkC; sMcNC: if (!($ext == 'js')) { goto WxkBT; } goto Z7UKC; i4d0N: UnRZ3: goto ibBzw; yWl1T: $out .= $scripts->registered[$handle]->extra['data']; goto IHFhl; sthBg: if (!(!empty($scripts->registered[$handle]->extra['after']) && count($scripts->registered[$handle]->extra['after']) > 0)) { goto hl6mz; } goto gaHvu; rgWA5: if (!isset($scripts->registered[$handle]->extra['data'])) { goto Cxuyu; } goto yWl1T; TZvDI: if (!($ext == 'css')) { goto UnRZ3; } goto hRvek; tf_6Y: global $wp_scripts, $wp_styles; goto in8xo; kMkr9: $out = ''; goto sMcNC; Syf_e: hl6mz: goto V65D_; IHFhl: Cxuyu: goto sthBg; in8xo: $scripts = $wp_scripts; goto kMkr9; gaHvu: $out .= implode($script_line_end, $scripts->registered[$handle]->extra['after']) . $script_line_end; goto Syf_e; Z7UKC: $script_line_end = ";\n"; goto Naglk; Kopj4: } function get_processed_scripts() { return $this->scripts; } function print_footer() { goto rfwp0; XevpD: if (!count($not_handles)) { goto trP9l; } goto B7Uf9; qqc4I: $script .= '_HWIO.assets=_HWIO.assets||{};_HWIO.extra_assets=_HWIO.assign(_HWIO.assets,' . json_encode(apply_filters('hpp_lazy_assets', $this->_data['lazy_assets'])) . ');'; goto v5XO4; pfgL2: if (!(is_multisite() && $blog_id > 1)) { goto mCCz0; } goto xA1Ul; i3tp2: $not_handles = array_diff($this->scripts['js']['q'][0], $this->scripts['js']['q'][1]); goto Hbztm; eaCwt: $output = ''; goto dYcHm; z0qYc: $c = file_get_contents(file_exists(__DIR__ . '/main.min.js') ? __DIR__ . '/main.min.js' : __DIR__ . '/main.js'); goto xULh3; W5sBT: foreach ($this->inline_scripts['js'] as $i => $handle) { goto B2hyR; j3KRh: if (empty($js)) { goto SwkG8; } goto RgUn0; aPtbs: tsl97: goto JFcrs; B2hyR: $js = $this->get_inline_data($handle, 'js'); goto j3KRh; RgUn0: $script .= hw_config_val('debug', 1, '/*[' . $handle . ']*/') . "\n" . apply_filters('hpp_inline_script_part', $js, $handle) . "\n"; goto XhCPh; XhCPh: SwkG8: goto aPtbs; JFcrs: } goto SEUIj; RJPEs: $body = ''; goto hIvWE; SjUfE: $this->save_asset(MMR_CACHE_DIR . "/{$hash}.js", hqp_fix_encoding($this->fixOtherJS($body, 1))); goto ZuDnj; iRE9_: $handles = $this->fix_asset_deps($handles, 'js'); goto RJPEs; SkO67: $this->save_asset(MMR_CACHE_DIR . $file_path, $this->fixCSS($output)); goto oWdT7; Hbztm: $handles = array_keys($this->scripts['js']['files']); goto G4emj; EReu7: if (!(is_multisite() && $blog_id > 1)) { goto hECbp; } goto jdvWG; CNYGz: hECbp: goto folDU; keQNg: tPkTb: goto SkO67; z605n: $this->_data['lazy_assets'] = []; goto jiDdM; PDMie: $hash = hash('adler32', $this->home_url() . implode('', call_user_func(function (array $a) { sort($a); return $a; }, $handles))); goto EReu7; B7Uf9: $handles = array_filter($handles, function ($v) use($not_handles) { return $v != '' && !in_array($v, $not_handles); }); goto VdbT2; CWik5: if (empty($this->inline_scripts['js'])) { goto ibQR1; } goto W5sBT; G4emj: if (!count($not_handles)) { goto UOsRd; } goto V4iap; zkl8c: if (!hw_config('merge_js')) { goto rnVNl; } goto i3tp2; VdbT2: trP9l: goto ZAsUl; euvwd: MXs7v: goto qqc4I; V4iap: $handles = array_filter($handles, function ($v) use($not_handles) { return $v != '' && !in_array($v, $not_handles); }); goto bFuRB; LS6yE: $not_handles = array_diff($this->scripts['css']['q'][0], $this->scripts['css']['q'][1]); goto dLTmu; oWdT7: file_put_contents(MMR_CACHE_DIR . '/' . $file_path . '.log', date('c') . " - MERGED:\n" . join("\n", $this->scripts['css']['log'])); goto DnZAV; xULh3: file_put_contents(MMR_CACHE_DIR . '/bootstrap.js', $c); goto dHu9i; DozR4: $this->_data['lazy_assets']['hpp_uncritical'] = ['t' => 'css', 'media' => 'all', 'l' => $GLOBALS['hpp-uncritical']]; goto euvwd; Gc5bL: gQaF3: goto C1H7c; v5XO4: xUKpI: goto Qk6NL; odUJT: if (file_exists(MMR_CACHE_DIR . $file_path)) { goto WfOTb; } goto eaCwt; dYcHm: foreach ($this->scripts['css']['style'] as $media => $css) { goto QPfjJ; QPfjJ: if ($media != 'all') { goto f28p0; } goto g9TVY; H0HVV: f28p0: goto UXQL2; vpolz: xv8Rs: goto M0tO7; MF1Mq: goto eGKm5; goto H0HVV; UXQL2: $output .= '@media ' . $media . "{\n" . $css . "\n}\n"; goto mxgxf; mxgxf: eGKm5: goto vpolz; g9TVY: $output .= $css; goto MF1Mq; M0tO7: } goto keQNg; dHu9i: z9lQe: goto s6p5q; NVZ4z: $this->_delay_asset(MMR_CSS_CACHE_URL . $file_path, 'css', ['id' => 'hpp-s-0']); goto Hy69x; N4DJI: if (file_exists(MMR_CACHE_DIR . "/{$hash}.js")) { goto gQaF3; } goto iRE9_; pkKs1: if (empty($this->_data['lazy_assets'])) { goto xUKpI; } goto Esj_L; SEUIj: ULlUn: goto yA0eU; ZuDnj: file_put_contents(MMR_CACHE_DIR . '/' . $hash . '.js.log', date('c') . " - MERGED:\n" . join("\n", $this->scripts['js']['log'])); goto Gc5bL; DchRN: mCCz0: goto YXiFF; pEXxX: if (hpp_shouldLazy()) { goto dNg8u; } goto b_ERs; Qk6NL: try { $script = apply_filters('hpp_inline_script', $this->fixOtherJS($script, 1)); } catch (Exception $e) { $script = $this->fixOtherJS($script, 1); hpp_write_log($e->getMessage()); } goto w7jSU; jdvWG: $hash = $blog_id . '-' . $hash; goto CNYGz; J_hm2: printf('<link rel="stylesheet" id="%s" href="%s"/>', 'hpp-s-0', MMR_CSS_CACHE_URL . $file_path); goto Q73jj; YXiFF: $file_path = '/' . $hash . '.css'; goto odUJT; DnZAV: WfOTb: goto GCmu_; dLTmu: $handles = array_keys($this->scripts['css']['files']); goto XevpD; eGqIZ: if (file_exists(MMR_CACHE_DIR . '/bootstrap.js')) { goto z9lQe; } goto z0qYc; xA1Ul: $hash = $blog_id . '-' . $hash; goto DchRN; Hy69x: LO8RR: goto zkl8c; w7jSU: echo "<script id=\"hqjs\">/* <![CDATA[ */\n{$script}\n/* ]]> */</script>"; goto z605n; ZAsUl: $hash = hash('adler32', $this->home_url() . implode('', call_user_func(function (array $a) { sort($a); return $a; }, $handles))); goto pfgL2; hIvWE: foreach ($handles as $handle) { $body .= hw_config_val('debug', 1, '/*[' . $handle . ']*/') . "\n" . $this->scripts['js']['files'][$handle]; mu5Sf: } goto cUGb1; rfwp0: global $blog_id; goto pEXxX; b_ERs: return; goto RMzG1; Esj_L: $this->_data['lazy_assets']['hpp-1'] = ['t' => 'js', 'l' => plugins_url('lib/asset/custom.js', __FILE__), 'deps' => $this->if_merge('hpp-0')]; goto FqFgg; S4_TI: $script = ''; goto CWik5; C1H7c: rnVNl: goto S4_TI; s6p5q: if (!hw_config('merge_css')) { goto LO8RR; } goto LS6yE; folDU: $this->_data['lazy_assets']['hpp-0'] = ['t' => 'js', 'l' => MMR_JS_CACHE_URL . '/' . $hash . '.js']; goto N4DJI; Q73jj: bZcfc: goto NVZ4z; cUGb1: V8_M5: goto SjUfE; RMzG1: dNg8u: goto eGqIZ; GCmu_: if (isset($GLOBALS['hpp-criticalfile'])) { goto bZcfc; } goto J_hm2; bFuRB: UOsRd: goto PDMie; FqFgg: if (!isset($GLOBALS['hpp-uncritical'])) { goto MXs7v; } goto DozR4; yA0eU: ibQR1: goto pkKs1; jiDdM: } function fix_asset_deps($list, $ext) { goto rqxix; avKRg: hpp_array_insert($list, [$track[$s]], $max_i + 1); goto TRPWK; qM4R3: if (!isset($track[$s])) { goto Ha3A1; } goto avKRg; y2haY: goto uDiEI; goto BaQv0; T1YwZ: unset($list[$i]); goto ujeTi; rqxix: global $wp_scripts; goto luXYJ; QLA_Y: foreach ($list as $i => $s) { goto SjdeZ; fE5Ha: $r = 1; goto gL66a; c7FQx: if (!($i < $max_i)) { goto aoDJG; } goto R6zKb; SiwBz: GOA_Y: goto btOpj; DLZQm: dalLk: goto c7FQx; UPhkU: foreach ($deps as $dep) { goto wvJ4P; cvZUd: $n = array_search($dep, $list); goto xY2Ll; lIM69: SJ4Oe: goto cvZUd; Bk_bj: $dep = $dep === 'jquery' ? 'jquery-core' : 'jquery'; goto lIM69; xY2Ll: if (!($n !== false && $max_i < $n)) { goto n0UB9; } goto yTaDd; yTaDd: $max_i = $n; goto vLrAg; kQS3x: usUl2: goto oOlnH; wvJ4P: if (!(in_array($dep, ['jquery', 'jquery-core']) && !isset($list[$dep]))) { goto SJ4Oe; } goto Bk_bj; vLrAg: n0UB9: goto sb_I6; sb_I6: $track[$dep] = $s; goto kQS3x; oOlnH: } goto DLZQm; Xew5M: $att = ['id' => $s, 'deps' => '']; goto TxUiu; PAPuV: $att['deps'] = join(',', $wp_scripts->registered[$s]->deps); goto SiwBz; gL66a: goto dARFD; goto HRDp9; muMog: nxEbQ: goto Xew5M; SjdeZ: if (!in_array($s, $ignore)) { goto nxEbQ; } goto Pw71k; TxUiu: if (empty($wp_scripts->registered[$s]->deps)) { goto GOA_Y; } goto PAPuV; khqDe: C7ENT: goto uWQy6; JUUwA: $deps = array_unique(array_filter(explode(',', $att['deps']))); goto Behzy; btOpj: $att = apply_filters('hpp_delay_asset_att', $att, $ext); goto qZLVV; Behzy: $max_i = $i; goto UPhkU; LBiou: RI6du: goto khqDe; HRDp9: aoDJG: goto LBiou; Pw71k: goto C7ENT; goto muMog; qZLVV: if (empty($att['deps'])) { goto RI6du; } goto JUUwA; R6zKb: $ignore[] = $s; goto fE5Ha; uWQy6: } goto C7I2g; BaQv0: NTNKu: goto OpmEJ; bLxgR: uDiEI: goto lbkAU; ujeTi: hpp_array_insert($list, [$s], $max_i); goto qM4R3; qjHoI: goto NTNKu; goto yneEG; s83Zt: if (!$r) { goto gQa5W; } goto T1YwZ; lbkAU: if (!true) { goto NTNKu; } goto Dl8JR; TRPWK: Ha3A1: goto lKuHb; yneEG: kvDfK: goto y2haY; luXYJ: $ignore = []; goto nsNC9; q73Wy: gQa5W: goto qjHoI; nsNC9: $track = []; goto bLxgR; OpmEJ: return $list; goto wg1JG; Dl8JR: $r = 0; goto QLA_Y; lKuHb: goto kvDfK; goto q73Wy; C7I2g: dARFD: goto s83Zt; wg1JG: } function script_path($url) { goto FTWTO; EU07r: goto ddcxf; goto c1GNm; Uaa98: $script_path = parse_url($this->ensure_scheme($url), PHP_URL_PATH); goto EORrg; mYWUE: return $script_path; goto oWaa4; c1GNm: yHIbL: goto oMGOd; EORrg: $script_path = $this->fix_wp_subfolder($script_path); goto EU07r; FTWTO: if (0 && strpos($url, $home) === 0) { goto yHIbL; } goto Uaa98; oMGOd: $script_path = '/' . ltrim(str_replace($home, '', $url), '/'); goto D1ytw; D1ytw: ddcxf: goto mYWUE; oWaa4: } private function get_handles($type, &$ourList, $ignoreFooterScripts = false) { goto dT_TD; ApXJW: $currentHandle = -1; goto nY2nS; nY2nS: foreach ($ourList->to_do as $handle) { goto fJzvE; KkDtG: $handles['_other_'] = array('modified' => 0, 'handles' => array()); goto Xu2eD; YdohO: ANf3m: goto vKX5E; ajMQ6: $media = isset($ourList->registered[$handle]->args) ? $ourList->registered[$handle]->args : 'all'; goto oqDAd; k1Fmj: RtSJe: goto iRy1g; fIdJb: $hasCSSImport = strpos($contents, '@import') !== false; goto YdohO; sFvwl: if (!$ignoreFooterScripts) { goto Cg7eg; } goto SPO_p; hRvXg: XETM_: goto d2V0k; jBjF4: goto vyt2t; goto s88Lw; PXjIh: $handles['ext-' . md5($handle)] = array('handle' => $handle); goto hRvXg; Zjj1P: uhKuY: goto n536Y; vWf_L: $this->_data['head_handles'] = []; goto Zjj1P; vgVxx: $this->ext2local($ourList, $handle, $script_path, $type); goto D7woO; qsx3f: rPVFo: goto obHjw; cJFT_: $this->_delay_asset($ourList->registered[$handle]->src, $type, array_filter(['id' => $handle, 'deps' => join(',', $ourList->registered[$handle]->deps)])); goto QEOh3; fJzvE: if (apply_filters($srcFilter, $ourList->registered[$handle]->src, $handle) !== false && $this->host_match($ourList->registered[$handle]->src)) { goto pHvx2; } goto cJFT_; SSr3n: Cg7eg: goto hWs6M; d2V0k: MJKTZ: goto LGCnE; SHHxv: if (!$checkForCSSImports) { goto ANf3m; } goto tTkqy; uaH4c: NZyGh: goto tNx5T; VIpJa: if ($checkMedia) { goto Nmq3z; } goto T2GXM; s88Lw: Nmq3z: goto nAnSc; OAH7A: vyt2t: goto by44M; QVWk0: $modified = 0; goto tcNHX; gY4LE: if (file_exists($this->root . $script_path) && $extension == $ext && $this->host_match($ourList->registered[$handle]->src) && !in_array($ourList->registered[$handle]->src, $this->ignore) && !isset($ourList->registered[$handle]->extra["conditional"])) { goto NZyGh; } goto iRSbj; Xu2eD: V9hGO: goto RbJvX; obHjw: $currentHandle = $media; goto OAH7A; vKX5E: if (!($hasCSSImport || $dontMerge || $currentHandle == -1 || isset($handles[$currentHandle]['handle']) || !$mediaMatches)) { goto kiDPR; } goto VIpJa; WsWGE: fOy_W: goto SSr3n; mRlvR: if (!$is_footer) { goto fOy_W; } goto t_xmF; QEOh3: goto MJKTZ; goto loaGW; by44M: kiDPR: goto QVWk0; REvZ0: if (!($type == 'js' && in_array($handle, ['jquery', 'jquery-core']) && !empty($ourList->registered[$handle]->src) && !$this->host_match($ourList->registered[$handle]->src))) { goto dT7R_; } goto vgVxx; btusT: $extension = pathinfo($script_path, PATHINFO_EXTENSION); goto REvZ0; tcNHX: if (!is_file($this->root . $script_path)) { goto mweeH; } goto d4qqg; tNx5T: $mediaMatches = true; goto NB9gE; RbJvX: $currentHandle = '_other_'; goto jBjF4; iRSbj: if (!isset($ourList->registered[$handle]->extra["conditional"])) { goto QEFi5; } goto b47MU; WQ46g: array_push($handles[$currentHandle]['handles'], $handle); goto JoV8k; ine9G: $handles[$media] = array('modified' => 0, 'handles' => array(), 'media' => $media); goto qsx3f; oA_l9: mweeH: goto WQ46g; UnzG_: $hasCSSImport = false; goto SHHxv; LGCnE: kuBY5: goto qjdxO; SPO_p: $is_footer = isset($ourList->registered[$handle]->extra['group']); goto mRlvR; iRy1g: goto XETM_; goto S4d7e; T2GXM: if (isset($handles['_other_'])) { goto V9hGO; } goto KkDtG; S4d7e: QEFi5: goto PXjIh; JoV8k: if (!($modified > $handles[$currentHandle]['modified'])) { goto RtSJe; } goto rbd3M; loaGW: pHvx2: goto sFvwl; t_xmF: if (isset($this->_data['head_handles'])) { goto uhKuY; } goto vWf_L; n536Y: $this->_data['head_handles'][] = $handle; goto qCjR0; b47MU: goto XETM_; goto uaH4c; d4qqg: $modified = filemtime($this->root . $script_path); goto oA_l9; rbd3M: $handles[$currentHandle]['modified'] = $modified; goto k1Fmj; oqDAd: $mediaMatches = $currentHandle != -1 && isset($handles[$currentHandle]['media']) && $handles[$currentHandle]['media'] == $media; goto KEPuu; D7woO: dT7R_: goto gY4LE; NB9gE: if (!$checkMedia) { goto BOJcs; } goto ajMQ6; qCjR0: goto kuBY5; goto WsWGE; hWs6M: $script_path = $this->script_path($ourList->registered[$handle]->src); goto btusT; tTkqy: $contents = file_get_contents($this->root . $script_path); goto fIdJb; KEPuu: BOJcs: goto UnzG_; nAnSc: if (isset($handles[$media])) { goto rPVFo; } goto ine9G; qjdxO: } goto Q7eLm; AvbC1: $handles = array(); goto ApXJW; dT_TD: switch ($type) { case 'js': goto ZL0p6; y1Mzs: $checkForCSSImports = false; goto vIq2c; vIq2c: goto yHffu; goto YO7TQ; Sjr8U: $srcFilter = 'script_loader_src'; goto R36SL; R36SL: $checkMedia = false; goto y1Mzs; ZL0p6: $ext = 'js'; goto Pdumz; Pdumz: $dontMerge = !$this->mergejs; goto Sjr8U; YO7TQ: case 'css': goto KX0Rq; irAnu: goto yHffu; goto KidC5; b7XL4: $dontMerge = !$this->mergecss; goto dP_Zm; E2naJ: $checkForCSSImports = $this->checkcssimports; goto irAnu; t7bw3: $checkMedia = true; goto E2naJ; dP_Zm: $srcFilter = 'style_loader_src'; goto t7bw3; KX0Rq: $ext = 'css'; goto b7XL4; KidC5: default: return array(); } goto LBXri; AXwOf: $this->_data['head_handles'] = []; goto lQ0FM; LVn2t: yHffu: goto q7oFo; Q7eLm: WWffH: goto LidqZ; lQ0FM: G5D6J: goto AvbC1; eNV11: foreach ($this->_data['head_handles'] as $handle) { goto rl7fU; CpWI8: $ourList->to_do[] = $handle; goto gJK9M; gJK9M: ig1dh: goto Zjin7; rl7fU: if (in_array($handle, $ourList->to_do)) { goto ig1dh; } goto CpWI8; Zjin7: eX818: goto Cr5Hy; Cr5Hy: } goto Q7gbz; Q7gbz: YiObt: goto AXwOf; cUQGV: WLOQP: goto r79XH; q7oFo: if (!apply_filters('ignore_' . $srcFilter, false)) { goto WLOQP; } goto fXsA1; fXsA1: return; goto cUQGV; r79XH: if (!(!$ignoreFooterScripts && !empty($this->_data['head_handles']))) { goto G5D6J; } goto eNV11; LBXri: qZD_N: goto LVn2t; LidqZ: return array_values($handles); goto fTeqx; fTeqx: } private function compress_css($full_path) { goto DEreg; JEy2o: try { goto BANmQ; Sc0s_: require_once 'Minify/Converter.php'; goto hkyfT; On3KP: $this->refreshed = true; goto YhXbe; hkyfT: require_once 'Minify/src/Exception.php'; goto fQcc7; kSnCQ: require_once 'Minify/ConverterInterface.php'; goto Sc0s_; SpIqR: unlink($min_path); goto LSFvd; xYcTR: file_put_contents($full_path . '.log', date('c') . " - COMPRESSION COMPLETE - " . $this->human_filesize($file_size_before - $file_size_after) . " saved\n", FILE_APPEND); goto XXagI; BANmQ: $min_path = str_replace('.css', '.min.css', $full_path); goto On3KP; nIMcv: $minifier = new MatthiasMullie\Minify\CSS($full_path); goto ZLJza; ib4Ck: $file_size_after = filesize($min_path); goto xYcTR; YhXbe: require_once 'Minify/src/Minify.php'; goto xKBqg; M3q9p: file_put_contents($full_path . '.log', date('c') . ' - GZIPPED - ' . $min_path . ".gz\n", FILE_APPEND); goto Oenc0; fQcc7: file_put_contents($full_path . '.log', date('c') . " - COMPRESSING CSS\n", FILE_APPEND); goto Mc0q6; XMJuf: if (!$this->gzip_file($min_path)) { goto iv6We; } goto M3q9p; Mc0q6: $file_size_before = filesize($full_path); goto nIMcv; xKBqg: require_once 'Minify/src/CSS.php'; goto kSnCQ; Oenc0: iv6We: goto ib4Ck; ZLJza: $minifier->minify($min_path); goto XMJuf; XXagI: $this->save_asset($full_path, $this->fixCSS(file_get_contents($min_path))); goto SpIqR; LSFvd: } catch (Exception $e) { } goto Po63c; DEreg: if (!(hw_config('merge_css') && is_file($full_path))) { goto V951K; } goto JEy2o; Po63c: V951K: goto O5WFA; O5WFA: } private function compress_js($full_path) { goto SMShh; SMShh: if (!(hw_config('merge_js') && is_file($full_path))) { goto noaBd; } goto v9YjK; v9YjK: try { goto Dmcnu; UX0V2: if (!(is_countable($output) && count($output) != 0)) { goto I0hEm; } goto yKzyb; uzpXb: DzYZI: goto pKFJl; yKzyb: ob_start(); goto W32s8; hpt8p: unlink($full_path . '.tmp'); goto bakbn; aHz7f: I0hEm: goto QXKXs; dt96Y: $minifier->minify($min_path); goto KQuuQ; dmBRQ: $file_size_before = filesize($full_path); goto wxRJE; iPh6d: require_once 'Minify/src/Minify.php'; goto fSEIJ; ykC8J: file_put_contents($full_path . '.log', date('c') . " - COMPRESSION COMPLETE - " . $this->human_filesize($file_size_before - $file_size_after) . " saved\n", FILE_APPEND); goto oblkK; OWdyT: $error = ob_get_contents(); goto dpGmf; oblkK: $this->save_asset($full_path, file_get_contents($min_path)); goto eFDzg; wxRJE: if (function_exists('exec') && exec('command -v java >/dev/null && echo "yes" || echo "no"') == 'yes' && exec('java -version 2>&1', $jvoutput) && preg_match("/version\\ \"(1\\.[7-9]{1}+|[7-9]|[0-9]{2,})/", $jvoutput[0])) { goto DzYZI; } goto iPh6d; E4NeY: $minifier = new MatthiasMullie\Minify\JS($full_path); goto dt96Y; Dmcnu: $min_path = str_replace('.js', '.min.js', $full_path); goto Tzb2E; I2Jd9: exec($cmd . ' 2>&1', $output); goto UX0V2; KQuuQ: goto TqYjO; goto uzpXb; kI8eu: if (!$this->gzip_file($min_path)) { goto iDBl4; } goto lBXQE; yIn_I: file_put_contents($full_path . '.log', date('c') . " - COMPRESSING WITH MINIFY (PHP exec not available or java not found)\n", FILE_APPEND); goto E4NeY; lBXQE: file_put_contents($full_path . '.log', date('c') . ' - GZIPPED - ' . $min_path . ".gz\n", FILE_APPEND); goto tQdaR; bR7VW: file_put_contents($full_path . '.log', date('c') . " - COMPRESSION FAILED\n" . $error, FILE_APPEND); goto hpt8p; pKFJl: file_put_contents($full_path . '.log', date('c') . " - COMPRESSING JS WITH CLOSURE\n", FILE_APPEND); goto cz8eL; sCxRs: $file_size_after = filesize($min_path); goto ykC8J; Tzb2E: $this->refreshed = true; goto dmBRQ; cz8eL: $cmd = 'java -jar \'' . WP_PLUGIN_DIR . '/wp2speed/closure-compiler.jar\' --warning_level QUIET --js \'' . $full_path . '\' --js_output_file \'' . $full_path . '.tmp\''; goto I2Jd9; bakbn: return; goto aHz7f; eFDzg: unlink($min_path); goto IORQZ; fSEIJ: require_once 'Minify/src/JS.php'; goto yIn_I; W32s8: var_dump($output); goto OWdyT; dpGmf: ob_end_clean(); goto bR7VW; QXKXs: rename($full_path . '.tmp', $min_path); goto S1Z1d; S1Z1d: TqYjO: goto kI8eu; tQdaR: iDBl4: goto sCxRs; IORQZ: } catch (Exception $e) { } goto yMxnN; yMxnN: noaBd: goto RcAl3; RcAl3: } public function minify_action() { goto d7Uto; NiYnm: NLw2g: goto UJT36; Vpgnb: z1q7b: goto EdQMe; d7Uto: if (!(!hw_config('minify_merge') || isset($_GET['hpp-gen-critical']))) { goto z1q7b; } goto L0NT5; z7HqG: zxmnZ: goto kt2Mr; tasln: V80tp: goto p3Fe7; Pb8Yq: if (!$this->jsmin) { goto zxmnZ; } goto ev58G; ev58G: foreach ($this->get_files_to_minify('js') as $path) { $this->compress_js($path); a4AAJ: } goto yb8A_; EdQMe: if (!$this->cssmin) { goto mFxDp; } goto lywfq; yb8A_: gpZNo: goto z7HqG; L0NT5: return; goto Vpgnb; lywfq: foreach ($this->get_files_to_minify('css') as $path) { $this->compress_css($path); H88JY: } goto NiYnm; kt2Mr: if (!function_exists('hpp_purge_cache')) { goto V80tp; } goto KBAzl; KBAzl: hpp_purge_cache(); goto tasln; UJT36: mFxDp: goto Pb8Yq; p3Fe7: } private function get_files_to_minify($ext) { return array_filter(glob(MMR_CACHE_DIR . '/*.' . $ext), function ($file) use($ext) { goto QwVTZ; nAwCT: return false; goto fEMxi; QwVTZ: if (!strpos($file, '.min.' . $ext)) { goto TXYuy; } goto nAwCT; fEMxi: TXYuy: goto RhDnl; RhDnl: return strpos(file_get_contents($file . '.log'), 'COMPRESSION COMPLETE') === false; goto EJBKj; EJBKj: }); } private function human_filesize($bytes, $decimals = 2) { goto JpNHN; jM0Pc: $factor = floor((strlen($bytes) - 1) / 3); goto EiLsw; JpNHN: $sz = 'BKMGTP'; goto jM0Pc; EiLsw: return sprintf('%.' . $decimals . 'f', $bytes / pow(1024, $factor)) . @$sz[$factor]; goto ryfuX; ryfuX: } private function gzip_file($path) { goto d4GSg; XvUJh: return $gzipped; goto FT1qg; BLOvT: if (!($this->gzip && function_exists('exec') && exec('command -V gzip >/dev/null && echo "yes" || echo "no"') == 'yes')) { goto oAvY9; } goto rGDh4; d4GSg: $gzipped = false; goto BLOvT; kkBpR: $gzipped = true; goto yX01f; rGDh4: exec("gzip -9 < '" . $path . "' > '" . $path . ".gz'", $output, $return); goto hlObf; hlObf: if (!($return == 0)) { goto tByuN; } goto kkBpR; n1IGM: oAvY9: goto XvUJh; yX01f: tByuN: goto n1IGM; FT1qg: } public function refreshed() { goto DLXzV; BKqPJ: do_action('wp2speed_done'); goto CYZ75; CYZ75: yQ4QD: goto ilUmH; DLXzV: if (!($this->refreshed === true)) { goto yQ4QD; } goto BKqPJ; ilUmH: } } goto yrfmb; yrfmb: global $wp2speed; goto s7wc2; p3Bfu: include_once __DIR__ . '/lib/custom.php'; goto s2X2y; s7wc2: $wp2speed = new WP2Speed();