Changeset 2167776
- Timestamp:
- 10/03/2019 05:45:50 PM (6 years ago)
- Location:
- sarvarov-lazy-load/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (2 diffs)
-
admin/partials/sidebar.php (modified) (1 diff)
-
public/class-sarvarov-lazy-load-public.php (modified) (7 diffs)
-
sarvarov-lazy-load.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sarvarov-lazy-load/trunk/README.txt
r2145198 r2167776 6 6 Tested up to: 5.2.2 7 7 Requires PHP: 5.6 8 Stable tag: 1.0. 78 Stable tag: 1.0.8 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 116 116 == Changelog == 117 117 118 = 1.0.8 = 119 * Adds loading="lazy" to images & iframes inside <noscript> 120 * General performance improvements 121 118 122 = 1.0.7 = 119 * Use cURL if host has `allow_url_fopen` set to false .123 * Use cURL if host has `allow_url_fopen` set to false 120 124 * Added Russian translation. 121 125 -
sarvarov-lazy-load/trunk/admin/partials/sidebar.php
r2139078 r2167776 40 40 continue; 41 41 42 printf( '<a class="button button-primary" href="https://wordpress.org/plugins/%1$s/" target="_blank">⭐ Rate the plugin or ask a question</a>', $value['url']);42 printf( '<a class="button button-primary" href="https://wordpress.org/plugins/%1$s/" target="_blank">⭐ %2$s</a>', $value['url'], esc_html__( 'Rate the plugin or ask a question:', $this->plugin_name ) ); 43 43 44 44 } -
sarvarov-lazy-load/trunk/public/class-sarvarov-lazy-load-public.php
r2145198 r2167776 170 170 public function lazy_process( $content = '', $params = array() ) { 171 171 // don't lazyload for feeds, previews, mobile, admin page 172 if( is_feed() || is_preview() || is_admin() || ! apply_filters( 'sarvarov_lazy_load_enable', true ) )172 if( is_feed() || is_preview() || is_admin() && ! wp_doing_ajax() || ! apply_filters( 'sarvarov_lazy_load_enable', true ) ) 173 173 return $content; 174 174 … … 210 210 ); 211 211 212 // trying to get cache213 212 $cache_array = array(); 214 213 … … 221 220 222 221 // trying to get cache 222 if( is_preview() ) { 223 $cache_enable = false; 224 } 225 223 226 if( $cache_enable ) { 224 227 if( ! $cache_array ) { … … 384 387 // <noscript> tag 385 388 if( $noscript_enable ) { 386 $noscript_str = sprintf( '<noscript><img %s /></noscript>', $this->build_attributes_string(389 $noscript_str = sprintf( '<noscript><img %s loading="lazy" /></noscript>', $this->build_attributes_string( 387 390 apply_filters( 'sarvarov_lazy_load_image_noscript', $image_atts ) 388 391 ) ); … … 451 454 ); 452 455 453 // trying to get cache454 456 $cache_array = array(); 455 457 … … 462 464 463 465 // trying to get cache 466 if( is_preview() ) { 467 $cache_enable = false; 468 } 469 464 470 if( $cache_enable ) { 465 471 if( ! $cache_array ) { … … 579 585 // <noscript> tag 580 586 if( $noscript_enable ) { 581 $noscript_str = sprintf( '<noscript><iframe %s ></iframe></noscript>', $this->build_attributes_string(587 $noscript_str = sprintf( '<noscript><iframe %s loading="lazy"></iframe></noscript>', $this->build_attributes_string( 582 588 apply_filters( 'sarvarov_lazy_load_iframe_noscript', $iframe_atts ) 583 589 ) ); -
sarvarov-lazy-load/trunk/sarvarov-lazy-load.php
r2145198 r2167776 4 4 * Plugin URI: https://wordpress.org/plugins/sarvarov-lazy-load/ 5 5 * Description: Lazy Load all your images, videos and iframes in just one click. Make your blog faster and look better with blurred LQIP and primary color placeholder. 6 * Version: 1.0. 76 * Version: 1.0.8 7 7 * Author: Roman Sarvarov 8 8 * Author URI: https://about.me/sarvaroff … … 21 21 * Define constants. 22 22 */ 23 define( 'SARVAROV_LAZY_LOAD_VERSION', '1.0. 7' );23 define( 'SARVAROV_LAZY_LOAD_VERSION', '1.0.8' ); 24 24 define( 'SARVAROV_LAZY_LOAD_PLUGIN_NAME', 'sarvarov-lazy-load' ); 25 25 define( 'SARVAROV_LAZY_LOAD_PLUGIN_SLUG', 'sarvarov_lazy_load' );
Note: See TracChangeset
for help on using the changeset viewer.