Changeset 1271293
- Timestamp:
- 10/22/2015 06:54:48 PM (10 years ago)
- Location:
- wp-minify-fix
- Files:
-
- 5 edited
- 14 copied
-
tags/1.4.1 (copied) (copied from wp-minify-fix/trunk)
-
tags/1.4.1/min/config.php (copied) (copied from wp-minify-fix/trunk/min/config.php)
-
tags/1.4.1/min/lib/CSSmin.php (copied) (copied from wp-minify-fix/trunk/min/lib/CSSmin.php)
-
tags/1.4.1/min/lib/DooDigestAuth.php (copied) (copied from wp-minify-fix/trunk/min/lib/DooDigestAuth.php)
-
tags/1.4.1/min/lib/Minify/ClosureCompiler.php (copied) (copied from wp-minify-fix/trunk/min/lib/Minify/ClosureCompiler.php)
-
tags/1.4.1/min/lib/Minify/DebugDetector.php (copied) (copied from wp-minify-fix/trunk/min/lib/Minify/DebugDetector.php)
-
tags/1.4.1/min/lib/Minify/HTML (copied) (copied from wp-minify-fix/trunk/min/lib/Minify/HTML)
-
tags/1.4.1/min/lib/Minify/HTML.php (modified) (1 diff)
-
tags/1.4.1/min/lib/Minify/JS (copied) (copied from wp-minify-fix/trunk/min/lib/Minify/JS)
-
tags/1.4.1/min/lib/Minify/Loader.php (copied) (copied from wp-minify-fix/trunk/min/lib/Minify/Loader.php)
-
tags/1.4.1/min/lib/Minify/YUI (copied) (copied from wp-minify-fix/trunk/min/lib/Minify/YUI)
-
tags/1.4.1/min/lib/MrClay (copied) (copied from wp-minify-fix/trunk/min/lib/MrClay)
-
tags/1.4.1/options-generic.php (copied) (copied from wp-minify-fix/trunk/options-generic.php) (4 diffs)
-
tags/1.4.1/readme.txt (copied) (copied from wp-minify-fix/trunk/readme.txt) (3 diffs)
-
tags/1.4.1/wp-minify.php (copied) (copied from wp-minify-fix/trunk/wp-minify.php) (11 diffs)
-
trunk/min/lib/Minify/HTML.php (modified) (1 diff)
-
trunk/options-generic.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/wp-minify.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-minify-fix/tags/1.4.1/min/lib/Minify/HTML.php
r891097 r1271293 146 146 147 147 // use newlines before 1st attribute in open tags (to limit line lengths) 148 $this->_html = preg_replace('/(<[a-z\\-]+)\\s+([^>]+>)/i', "$1\n$2", $this->_html); 148 //$this->_html = preg_replace('/(<[a-z\\-]+)\\s+([^>]+>)/i', "$1\n$2", $this->_html); 149 150 // remove newlines 151 $this->_html = str_replace("\n", ' ', $this->_html); 149 152 150 153 // fill placeholders -
wp-minify-fix/tags/1.4.1/options-generic.php
r1081305 r1271293 115 115 printf(' 116 116 <h2 class="wpm_advanced" '.$advanced_style.'>%s</h2> 117 <p><label>%s<br/><textarea name="wpm_options_update[js_exclude]" style="width:600px" rows="5">'. attribute_escape(implode(chr(10), $wpm_options['js_exclude'])).'</textarea></label></p>118 <p><label>%s<br/><textarea name="wpm_options_update[css_exclude]" style="width:600px" rows="5">'. attribute_escape(implode(chr(10), $wpm_options['css_exclude'])).'</textarea></label></p>119 <p class="wpm_advanced" '.$advanced_style.'><label>%s<br/><textarea name="wpm_options_update[uri_exclude]" style="width:600px" rows="5">'. attribute_escape(implode(chr(10), $wpm_options['uri_exclude'])).'</textarea></label></p>117 <p><label>%s<br/><textarea name="wpm_options_update[js_exclude]" style="width:600px" rows="5">'.esc_attr(implode(chr(10), $wpm_options['js_exclude'])).'</textarea></label></p> 118 <p><label>%s<br/><textarea name="wpm_options_update[css_exclude]" style="width:600px" rows="5">'.esc_attr(implode(chr(10), $wpm_options['css_exclude'])).'</textarea></label></p> 119 <p class="wpm_advanced" '.$advanced_style.'><label>%s<br/><textarea name="wpm_options_update[uri_exclude]" style="width:600px" rows="5">'.esc_attr(implode(chr(10), $wpm_options['uri_exclude'])).'</textarea></label></p> 120 120 ', 121 121 __('Local Files Minification', $this->name), … … 128 128 <h2 class="wpm_advanced" '.$advanced_style.'>%s</h2> 129 129 <p class="wpm_advanced" '.$advanced_style.'><label>%s <input name="wpm_options_update[cache_external]" id="cache_external_checkbox" state="'.$include_toggle_state.'" type="checkbox" '.checked(true, $wpm_options['cache_external'], false).'/> (%s)</label></p> 130 <p class="wpm_advanced wpm_include" '.$advanced_style.' '.$include_style.'><label>%s (%s, <a href="http://omninoggin.com/wordpress-posts/tutorial-wp-minify-options/#include_external_files">%s</a>)<br/><textarea name="wpm_options_update[js_include]" style="width:600px" rows="5">'. attribute_escape(implode(chr(10), $wpm_options['js_include'])).'</textarea></label></p>131 <p class="wpm_advanced wpm_include" '.$advanced_style.' '.$include_style.'><label>%s (%s, <a href="http://omninoggin.com/wordpress-posts/tutorial-wp-minify-options/#include_external_files">%s</a>)<br/><textarea name="wpm_options_update[css_include]" style="width:600px" rows="5">'. attribute_escape(implode(chr(10), $wpm_options['css_include'])).'</textarea></label></p>130 <p class="wpm_advanced wpm_include" '.$advanced_style.' '.$include_style.'><label>%s (%s, <a href="http://omninoggin.com/wordpress-posts/tutorial-wp-minify-options/#include_external_files">%s</a>)<br/><textarea name="wpm_options_update[js_include]" style="width:600px" rows="5">'.esc_attr(implode(chr(10), $wpm_options['js_include'])).'</textarea></label></p> 131 <p class="wpm_advanced wpm_include" '.$advanced_style.' '.$include_style.'><label>%s (%s, <a href="http://omninoggin.com/wordpress-posts/tutorial-wp-minify-options/#include_external_files">%s</a>)<br/><textarea name="wpm_options_update[css_include]" style="width:600px" rows="5">'.esc_attr(implode(chr(10), $wpm_options['css_include'])).'</textarea></label></p> 132 132 ', 133 133 __('Non-Local Files Minification', $this->name), … … 144 144 printf(' 145 145 <h2 class="wpm_advanced" '.$advanced_style.'>%s</h2> 146 <p class="wpm_advanced" '.$advanced_style.'><label>%s<input name="wpm_options_update[cache_interval]" type="text" size="4" value="'. attribute_escape($wpm_options['cache_interval']).'"/>%s <span class="submit"><input type="submit" name="wpm_options_clear_cache_submit" value="%s"/></span></p></label>146 <p class="wpm_advanced" '.$advanced_style.'><label>%s<input name="wpm_options_update[cache_interval]" type="text" size="4" value="'.esc_attr($wpm_options['cache_interval']).'"/>%s <span class="submit"><input type="submit" name="wpm_options_clear_cache_submit" value="%s"/></span></p></label> 147 147 ', 148 148 __('Caching', $this->name), … … 188 188 printf(' 189 189 <p class="wpm_advanced" '.$advanced_style.'><label>%s <input name="wpm_options_update[auto_base]" type="checkbox" '.checked(true, $wpm_options['auto_base'], false).'/></label></p> 190 <p class="wpm_advanced" '.$advanced_style.'><label>%s<br/><input name="wpm_options_update[extra_minify_options]" type="text" size="100" value="'. attribute_escape($wpm_options['extra_minify_options']).'"/><br/><em>%s</em></label></p>190 <p class="wpm_advanced" '.$advanced_style.'><label>%s<br/><input name="wpm_options_update[extra_minify_options]" type="text" size="100" value="'.esc_attr($wpm_options['extra_minify_options']).'"/><br/><em>%s</em></label></p> 191 191 ', 192 192 __('Automatically set your Minify base per siteurl setting (recommended)', $this->name), -
wp-minify-fix/tags/1.4.1/readme.txt
r1081305 r1271293 1 1 === WP Minify Fix === 2 Tags: minify, js, css, html, javascript, cascading style sheets, optimize, performance, speed, http request, phpspeedy, fix, compress, performance, import2 Tags: minify, js, css, html, javascript, cascading style sheets, optimize, performance, performance optimization, optimize, optimizer, speed, http request, phpspeedy, fix, compress, performance, import, cache, combine, bundle, plugin, google page speed, nginx 3 3 Contributors: NodeCode, madeinthayaland 4 Requires at least: 2. 75 Tested up to: 4. 16 Stable Tag: 1.4. 04 Requires at least: 2.8 5 Tested up to: 4.3.1 6 Stable Tag: 1.4.1 7 7 8 8 [Fixed] This plugin uses the Minify engine to combine and compress JS and CSS files … … 12 12 This plugin is a fork of [WP Minify](http://wordpress.org/plugins/wp-minify/) to fix bugs and add features, because it has not been updated since 2012-6-4. 13 13 14 This plugin integrates the [Minify engine](http ://code.google.com/p/minify/)14 This plugin integrates the [Minify engine](https://github.com/mrclay/minify) 15 15 into your WordPress blog. Once enabled, this plugin will combine and compress 16 16 JS and CSS files to improve page load time. … … 48 48 * Plugin hooks! 49 49 50 You can also commit changes on our [Github repository](https://github.com/nodecode/wp-minify-fix). 51 50 52 == Changelog == 53 = 1.4.1 = 54 * Duplicate footer scripts bug fixed 55 * PHP warning message in some scenarios fixed 56 * Newlines before the first attribute in open tags removed 57 * Compatibility changes 58 51 59 = 1.4.0 = 52 60 * Added option for the HTML5 async attribute -
wp-minify-fix/tags/1.4.1/wp-minify.php
r1081305 r1271293 4 4 Plugin URI: http://wordpress.org/plugins/wp-minify-fixed/ 5 5 Description: [Fixed] This plugin uses the Minify engine to combine and compress JS and CSS files to improve page load time. 6 Version: 1.4. 06 Version: 1.4.1 7 7 Author: NodeCode 8 8 Author URI: http://nodecode.de … … 10 10 11 11 /* 12 Copyright 2013 NodeCode (email: [email protected])12 Copyright 2013-2015 NodeCode (email: [email protected]) 13 13 Copyright 2009-2011 Thaya Kareeson (email: [email protected]) 14 14 … … 35 35 var $name_proper = 'WP Minify Fix'; 36 36 var $required_wp_version = '2.7'; 37 var $version = '1.4. 0';37 var $version = '1.4.1'; 38 38 39 39 var $c = null; … … 474 474 // append &debug if we need to 475 475 if ($wpm_options['debug_nominify']) { 476 $debug_string = '& amp;debug=true';476 $debug_string = '&debug=true'; 477 477 } else { 478 478 $debug_string = ''; … … 482 482 $base = $this->get_base(); 483 483 if ($base != '') { 484 $base_string = '& amp;b='.$base;484 $base_string = '&b='.$base; 485 485 } else { 486 486 $base_string = ''; … … 490 490 $extra_minify_options = preg_replace('/(&|&|\b)b=[^&]*/', '', trim($wpm_options['extra_minify_options'])); 491 491 if (trim($extra_minify_options) != '') { 492 $extra_string = '& amp;'.$extra_minify_options;492 $extra_string = '&'.$extra_minify_options; 493 493 } else { 494 494 $extra_string = ''; … … 496 496 497 497 // append last modified time 498 $latest_modified_string = '& amp;m='.$latest_modified;498 $latest_modified_string = '&m='.$latest_modified; 499 499 500 500 return array($base_url . '?f=' . implode(',', $files) . $debug_string . $base_string . $extra_string . $latest_modified_string); … … 882 882 } 883 883 884 $js_locations_footer = array_unique($js_locations_footer); 884 if ($js_locations_footer != NULL) 885 $js_locations_footer = array_unique($js_locations_footer); 885 886 } 886 887 … … 890 891 function inject_js($content, $js_locations, $js_locations_footer) { 891 892 if (count($js_locations) > 0) { 893 $wpm_options = get_option($this->name); 892 894 // build minify URLS 893 895 $js_tags = ''; 894 896 $minify_urls = $this->build_minify_urls($js_locations, '.js'); 895 897 if ($js_locations_footer) { 898 $js_tags_footer = ''; 896 899 $minify_urls_footer = $this->build_minify_urls($js_locations_footer, '.js'); 897 900 } … … 925 928 foreach ($minify_urls_footer as $minify_url) { 926 929 $minify_url = apply_filters('wp_minify_js_url', $minify_url); // Allow plugins to modify final minify URL 927 $js_tags .= "<script type='text/javascript' src='$minify_url'></script>";930 $js_tags_footer .= "<script type='text/javascript' src='$minify_url'></script>"; 928 931 } 929 932 … … 931 934 932 935 if ($matches) { 933 $content = preg_replace('/<!-- WP-Minify JS Footer -->/', "$js_tags ", $content, 1); // limit 1 replacement936 $content = preg_replace('/<!-- WP-Minify JS Footer -->/', "$js_tags_footer", $content, 1); // limit 1 replacement 934 937 } else { 935 $content = preg_replace('/<!-- WP-Minify Footer Placeholder -->/', "$js_tags ", $content, 1); // limit 1 replacement938 $content = preg_replace('/<!-- WP-Minify Footer Placeholder -->/', "$js_tags_footer", $content, 1); // limit 1 replacement 936 939 $placeholderRemoved = true; 937 940 } 938 941 } 939 942 940 // If necessary , remove placeholder comment943 // If necessary (custom footer position comment), remove placeholder comment 941 944 if ($placeholderRemoved === false) { 942 $content = preg_replace('/<!-- WP-Minify Footer Placeholder -->/', " $js_tags", $content, 1); // limit 1 replacement945 $content = preg_replace('/<!-- WP-Minify Footer Placeholder -->/', "", $content, 1); // limit 1 replacement 943 946 } 944 947 } -
wp-minify-fix/trunk/min/lib/Minify/HTML.php
r891097 r1271293 146 146 147 147 // use newlines before 1st attribute in open tags (to limit line lengths) 148 $this->_html = preg_replace('/(<[a-z\\-]+)\\s+([^>]+>)/i', "$1\n$2", $this->_html); 148 //$this->_html = preg_replace('/(<[a-z\\-]+)\\s+([^>]+>)/i', "$1\n$2", $this->_html); 149 150 // remove newlines 151 $this->_html = str_replace("\n", ' ', $this->_html); 149 152 150 153 // fill placeholders -
wp-minify-fix/trunk/options-generic.php
r1081305 r1271293 115 115 printf(' 116 116 <h2 class="wpm_advanced" '.$advanced_style.'>%s</h2> 117 <p><label>%s<br/><textarea name="wpm_options_update[js_exclude]" style="width:600px" rows="5">'. attribute_escape(implode(chr(10), $wpm_options['js_exclude'])).'</textarea></label></p>118 <p><label>%s<br/><textarea name="wpm_options_update[css_exclude]" style="width:600px" rows="5">'. attribute_escape(implode(chr(10), $wpm_options['css_exclude'])).'</textarea></label></p>119 <p class="wpm_advanced" '.$advanced_style.'><label>%s<br/><textarea name="wpm_options_update[uri_exclude]" style="width:600px" rows="5">'. attribute_escape(implode(chr(10), $wpm_options['uri_exclude'])).'</textarea></label></p>117 <p><label>%s<br/><textarea name="wpm_options_update[js_exclude]" style="width:600px" rows="5">'.esc_attr(implode(chr(10), $wpm_options['js_exclude'])).'</textarea></label></p> 118 <p><label>%s<br/><textarea name="wpm_options_update[css_exclude]" style="width:600px" rows="5">'.esc_attr(implode(chr(10), $wpm_options['css_exclude'])).'</textarea></label></p> 119 <p class="wpm_advanced" '.$advanced_style.'><label>%s<br/><textarea name="wpm_options_update[uri_exclude]" style="width:600px" rows="5">'.esc_attr(implode(chr(10), $wpm_options['uri_exclude'])).'</textarea></label></p> 120 120 ', 121 121 __('Local Files Minification', $this->name), … … 128 128 <h2 class="wpm_advanced" '.$advanced_style.'>%s</h2> 129 129 <p class="wpm_advanced" '.$advanced_style.'><label>%s <input name="wpm_options_update[cache_external]" id="cache_external_checkbox" state="'.$include_toggle_state.'" type="checkbox" '.checked(true, $wpm_options['cache_external'], false).'/> (%s)</label></p> 130 <p class="wpm_advanced wpm_include" '.$advanced_style.' '.$include_style.'><label>%s (%s, <a href="http://omninoggin.com/wordpress-posts/tutorial-wp-minify-options/#include_external_files">%s</a>)<br/><textarea name="wpm_options_update[js_include]" style="width:600px" rows="5">'. attribute_escape(implode(chr(10), $wpm_options['js_include'])).'</textarea></label></p>131 <p class="wpm_advanced wpm_include" '.$advanced_style.' '.$include_style.'><label>%s (%s, <a href="http://omninoggin.com/wordpress-posts/tutorial-wp-minify-options/#include_external_files">%s</a>)<br/><textarea name="wpm_options_update[css_include]" style="width:600px" rows="5">'. attribute_escape(implode(chr(10), $wpm_options['css_include'])).'</textarea></label></p>130 <p class="wpm_advanced wpm_include" '.$advanced_style.' '.$include_style.'><label>%s (%s, <a href="http://omninoggin.com/wordpress-posts/tutorial-wp-minify-options/#include_external_files">%s</a>)<br/><textarea name="wpm_options_update[js_include]" style="width:600px" rows="5">'.esc_attr(implode(chr(10), $wpm_options['js_include'])).'</textarea></label></p> 131 <p class="wpm_advanced wpm_include" '.$advanced_style.' '.$include_style.'><label>%s (%s, <a href="http://omninoggin.com/wordpress-posts/tutorial-wp-minify-options/#include_external_files">%s</a>)<br/><textarea name="wpm_options_update[css_include]" style="width:600px" rows="5">'.esc_attr(implode(chr(10), $wpm_options['css_include'])).'</textarea></label></p> 132 132 ', 133 133 __('Non-Local Files Minification', $this->name), … … 144 144 printf(' 145 145 <h2 class="wpm_advanced" '.$advanced_style.'>%s</h2> 146 <p class="wpm_advanced" '.$advanced_style.'><label>%s<input name="wpm_options_update[cache_interval]" type="text" size="4" value="'. attribute_escape($wpm_options['cache_interval']).'"/>%s <span class="submit"><input type="submit" name="wpm_options_clear_cache_submit" value="%s"/></span></p></label>146 <p class="wpm_advanced" '.$advanced_style.'><label>%s<input name="wpm_options_update[cache_interval]" type="text" size="4" value="'.esc_attr($wpm_options['cache_interval']).'"/>%s <span class="submit"><input type="submit" name="wpm_options_clear_cache_submit" value="%s"/></span></p></label> 147 147 ', 148 148 __('Caching', $this->name), … … 188 188 printf(' 189 189 <p class="wpm_advanced" '.$advanced_style.'><label>%s <input name="wpm_options_update[auto_base]" type="checkbox" '.checked(true, $wpm_options['auto_base'], false).'/></label></p> 190 <p class="wpm_advanced" '.$advanced_style.'><label>%s<br/><input name="wpm_options_update[extra_minify_options]" type="text" size="100" value="'. attribute_escape($wpm_options['extra_minify_options']).'"/><br/><em>%s</em></label></p>190 <p class="wpm_advanced" '.$advanced_style.'><label>%s<br/><input name="wpm_options_update[extra_minify_options]" type="text" size="100" value="'.esc_attr($wpm_options['extra_minify_options']).'"/><br/><em>%s</em></label></p> 191 191 ', 192 192 __('Automatically set your Minify base per siteurl setting (recommended)', $this->name), -
wp-minify-fix/trunk/readme.txt
r1081305 r1271293 1 1 === WP Minify Fix === 2 Tags: minify, js, css, html, javascript, cascading style sheets, optimize, performance, speed, http request, phpspeedy, fix, compress, performance, import2 Tags: minify, js, css, html, javascript, cascading style sheets, optimize, performance, performance optimization, optimize, optimizer, speed, http request, phpspeedy, fix, compress, performance, import, cache, combine, bundle, plugin, google page speed, nginx 3 3 Contributors: NodeCode, madeinthayaland 4 Requires at least: 2. 75 Tested up to: 4. 16 Stable Tag: 1.4. 04 Requires at least: 2.8 5 Tested up to: 4.3.1 6 Stable Tag: 1.4.1 7 7 8 8 [Fixed] This plugin uses the Minify engine to combine and compress JS and CSS files … … 12 12 This plugin is a fork of [WP Minify](http://wordpress.org/plugins/wp-minify/) to fix bugs and add features, because it has not been updated since 2012-6-4. 13 13 14 This plugin integrates the [Minify engine](http ://code.google.com/p/minify/)14 This plugin integrates the [Minify engine](https://github.com/mrclay/minify) 15 15 into your WordPress blog. Once enabled, this plugin will combine and compress 16 16 JS and CSS files to improve page load time. … … 48 48 * Plugin hooks! 49 49 50 You can also commit changes on our [Github repository](https://github.com/nodecode/wp-minify-fix). 51 50 52 == Changelog == 53 = 1.4.1 = 54 * Duplicate footer scripts bug fixed 55 * PHP warning message in some scenarios fixed 56 * Newlines before the first attribute in open tags removed 57 * Compatibility changes 58 51 59 = 1.4.0 = 52 60 * Added option for the HTML5 async attribute -
wp-minify-fix/trunk/wp-minify.php
r1081305 r1271293 4 4 Plugin URI: http://wordpress.org/plugins/wp-minify-fixed/ 5 5 Description: [Fixed] This plugin uses the Minify engine to combine and compress JS and CSS files to improve page load time. 6 Version: 1.4. 06 Version: 1.4.1 7 7 Author: NodeCode 8 8 Author URI: http://nodecode.de … … 10 10 11 11 /* 12 Copyright 2013 NodeCode (email: [email protected])12 Copyright 2013-2015 NodeCode (email: [email protected]) 13 13 Copyright 2009-2011 Thaya Kareeson (email: [email protected]) 14 14 … … 35 35 var $name_proper = 'WP Minify Fix'; 36 36 var $required_wp_version = '2.7'; 37 var $version = '1.4. 0';37 var $version = '1.4.1'; 38 38 39 39 var $c = null; … … 474 474 // append &debug if we need to 475 475 if ($wpm_options['debug_nominify']) { 476 $debug_string = '& amp;debug=true';476 $debug_string = '&debug=true'; 477 477 } else { 478 478 $debug_string = ''; … … 482 482 $base = $this->get_base(); 483 483 if ($base != '') { 484 $base_string = '& amp;b='.$base;484 $base_string = '&b='.$base; 485 485 } else { 486 486 $base_string = ''; … … 490 490 $extra_minify_options = preg_replace('/(&|&|\b)b=[^&]*/', '', trim($wpm_options['extra_minify_options'])); 491 491 if (trim($extra_minify_options) != '') { 492 $extra_string = '& amp;'.$extra_minify_options;492 $extra_string = '&'.$extra_minify_options; 493 493 } else { 494 494 $extra_string = ''; … … 496 496 497 497 // append last modified time 498 $latest_modified_string = '& amp;m='.$latest_modified;498 $latest_modified_string = '&m='.$latest_modified; 499 499 500 500 return array($base_url . '?f=' . implode(',', $files) . $debug_string . $base_string . $extra_string . $latest_modified_string); … … 882 882 } 883 883 884 $js_locations_footer = array_unique($js_locations_footer); 884 if ($js_locations_footer != NULL) 885 $js_locations_footer = array_unique($js_locations_footer); 885 886 } 886 887 … … 890 891 function inject_js($content, $js_locations, $js_locations_footer) { 891 892 if (count($js_locations) > 0) { 893 $wpm_options = get_option($this->name); 892 894 // build minify URLS 893 895 $js_tags = ''; 894 896 $minify_urls = $this->build_minify_urls($js_locations, '.js'); 895 897 if ($js_locations_footer) { 898 $js_tags_footer = ''; 896 899 $minify_urls_footer = $this->build_minify_urls($js_locations_footer, '.js'); 897 900 } … … 925 928 foreach ($minify_urls_footer as $minify_url) { 926 929 $minify_url = apply_filters('wp_minify_js_url', $minify_url); // Allow plugins to modify final minify URL 927 $js_tags .= "<script type='text/javascript' src='$minify_url'></script>";930 $js_tags_footer .= "<script type='text/javascript' src='$minify_url'></script>"; 928 931 } 929 932 … … 931 934 932 935 if ($matches) { 933 $content = preg_replace('/<!-- WP-Minify JS Footer -->/', "$js_tags ", $content, 1); // limit 1 replacement936 $content = preg_replace('/<!-- WP-Minify JS Footer -->/', "$js_tags_footer", $content, 1); // limit 1 replacement 934 937 } else { 935 $content = preg_replace('/<!-- WP-Minify Footer Placeholder -->/', "$js_tags ", $content, 1); // limit 1 replacement938 $content = preg_replace('/<!-- WP-Minify Footer Placeholder -->/', "$js_tags_footer", $content, 1); // limit 1 replacement 936 939 $placeholderRemoved = true; 937 940 } 938 941 } 939 942 940 // If necessary , remove placeholder comment943 // If necessary (custom footer position comment), remove placeholder comment 941 944 if ($placeholderRemoved === false) { 942 $content = preg_replace('/<!-- WP-Minify Footer Placeholder -->/', " $js_tags", $content, 1); // limit 1 replacement945 $content = preg_replace('/<!-- WP-Minify Footer Placeholder -->/', "", $content, 1); // limit 1 replacement 943 946 } 944 947 }
Note: See TracChangeset
for help on using the changeset viewer.