Changeset 2186619
- Timestamp:
- 11/06/2019 02:25:55 AM (6 years ago)
- Location:
- rocket-async-css/trunk
- Files:
-
- 6 edited
-
README.txt (modified) (1 diff)
-
lib/Rocket/Async/CSS.php (modified) (3 diffs)
-
lib/Rocket/Async/CSS/DOMDocument.php (modified) (1 diff)
-
lib/Rocket/Async/CSS/Integration/ResponsiveImages.php (modified) (4 diffs)
-
lib/Rocket/Async/CSS/Integration/ThePreloader.php (modified) (1 diff)
-
rocket-async-css.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
rocket-async-css/trunk/README.txt
r2175464 r2186619 56 56 57 57 == Changelog == 58 59 60 ### 0.7.1.2 ### 61 62 * Bug: Do additional cleanup on font processing to prevent bad syntax 63 * Bug: Don't process AJAX JSON requests 64 * Bug: Exclude ResponsiveImage processing from AMP 65 * Enhancement: Centralize multibyte encoding for entities into the DOMDocument class so that style tags do not get processed 58 66 59 67 ### 0.7.1.1 ### -
rocket-async-css/trunk/lib/Rocket/Async/CSS.php
r2175464 r2186619 20 20 * Plugin version 21 21 */ 22 const VERSION = '0.7.1. 1';22 const VERSION = '0.7.1.2'; 23 23 24 24 /** … … 293 293 if ( $this->do_process_page( $buffer ) ) { 294 294 // Import HTML 295 if ( ! @$this->document->loadHTML( mb_convert_encoding( $buffer, 'HTML-ENTITIES', 'UTF-8' )) ) {295 if ( ! @$this->document->loadHTML( $buffer ) ) { 296 296 return $buffer; 297 297 } … … 923 923 $new_font_face = trim( trim( $font_face_match[1] ), '{}' ) . ";font-display: {$font_display};"; 924 924 } 925 $css = str_replace( $font_face_match[1], "{{$new_font_face}}", $css ); 925 926 $new_font_face = trim( trim( $new_font_face ), '{}' ); 927 $css = str_replace( $font_face_match[1], "{{$new_font_face}}", $css ); 926 928 } 927 929 } -
rocket-async-css/trunk/lib/Rocket/Async/CSS/DOMDocument.php
r2175464 r2186619 17 17 $source = $this->pre_process_scripts( $source ); 18 18 $source = $this->pre_process_styles( $source ); 19 $source = mb_convert_encoding( $source, 'HTML-ENTITIES', 'UTF-8' ); 20 19 21 return @parent::loadHTML( $source, $options ); 20 22 } -
rocket-async-css/trunk/lib/Rocket/Async/CSS/Integration/ResponsiveImages.php
r2175464 r2186619 27 27 28 28 public function wp_loaded() { 29 if ( is_admin() || wp_is_xml_request() || wp_is_json_request() || is_feed() ) {29 if ( is_admin() || wp_is_xml_request() || wp_is_json_request() || is_feed() || ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() ) ) { 30 30 return; 31 31 } … … 47 47 48 48 public function process( $content ) { 49 50 if ( wp_doing_ajax() ) { 51 if ( json_decode( $content ) ) { 52 return $content; 53 } 54 } 55 49 56 $new_content = $content; 50 57 … … 56 63 } 57 64 58 if ( ! @$this->document->loadHTML( mb_convert_encoding( $new_content, 'HTML-ENTITIES', 'UTF-8' )) ) {65 if ( ! @$this->document->loadHTML( $new_content ) ) { 59 66 return $content; 60 67 } … … 201 208 202 209 $image_document = new DOMDocument(); 203 $new_image = mb_convert_encoding( $new_image, 'HTML-ENTITIES', 'UTF-8' );204 210 @$image_document->loadHTML( "<html><head></head><body>{$new_image}</body></html>" ); 205 211 $image->parentNode->replaceChild( $this->document->importNode( $image_document->getElementsByTagName( 'img' )->item( 0 ), true ), $image ); -
rocket-async-css/trunk/lib/Rocket/Async/CSS/Integration/ThePreloader.php
r2129572 r2186619 46 46 */ 47 47 public function inject_div( $buffer ) { 48 if ( ! @$this->document->loadHTML( mb_convert_encoding( $buffer, 'HTML-ENTITIES', 'UTF-8' )) ) {48 if ( ! @$this->document->loadHTML( $buffer ) ) { 49 49 return $buffer; 50 50 } -
rocket-async-css/trunk/rocket-async-css.php
r2175464 r2186619 17 17 * Plugin URI: https://github.com/pcfreak30/rocket-async-css 18 18 * Description: WordPress plugin to combine all CSS load async including inline scripts. Extends WP-Rocket 19 * Version: 0.7.1. 119 * Version: 0.7.1.2 20 20 * Author: Derrick Hammer 21 21 * Author URI: http://www.derrickhammer.com
Note: See TracChangeset
for help on using the changeset viewer.