lized fired just before making LazyLoad global // so next execution cycle have it $on_initialized_javascript_wrapped = 'window.addEventListener("LazyLoad::Initialized", function(){' . 'setTimeout(function() {' . $on_initialized_javascript . '}, 1);' . '});'; } $embed_script = '' . ''; $buffer = preg_replace( '~]*)*>~Ui', '\\0' . $embed_script, $buffer, 1 ); // load lazyload in footer to make sure DOM is ready at the moment of initialization $footer_script = '' . ''; $buffer = preg_replace( '~]*)*>~Ui', $footer_script . '\\0', $buffer, 1 ); } elseif ( $method == 'inline_footer' ) { $footer_script = '' . ''; $buffer = preg_replace( '~]*)*>~Ui', $footer_script . '\\0', $buffer, 1 ); } else { // 'sync_head' $head_script = '' . ''; $buffer = preg_replace( '~]*)*>~Ui', '\\0' . $head_script, $buffer, 1 ); $footer_script = ''; $buffer = preg_replace( '~]*)*>~Ui', $footer_script . '\\0', $buffer, 1 ); } return $buffer; } public function wp_get_attachment_url( $url, $post_id ) { $this->posts_by_url[$url] = $post_id; return $url; } private function metaslider_hooks() { add_filter( 'metaslider_nivo_slider_get_html', array( $this, 'metaslider_nivo_slider_get_html' ) ); } public function metaslider_nivo_slider_get_html( $content ) { // nivo slider use "src" attr of tags to populate // own image via JS, i.e. cant be replaced by lazyloading $content = preg_replace( '~(\s+)(class=)([\"\'])(.*?)([\"\'])~', '$1$2$3$4 no-lazy$5', $content ); return $content; } }
Fatal error: Uncaught Error: Class "W3TC\UserExperience_LazyLoad_Plugin" not found in /htdocs/wp-content/plugins/w3-total-cache/Root_Loader.php:60 Stack trace: #0 /htdocs/wp-content/plugins/w3-total-cache/Root_Loader.php(267): W3TC\Root_Loader->__construct() #1 /htdocs/wp-content/plugins/w3-total-cache/w3-total-cache.php(73): require_once('/htdocs/wp-cont...') #2 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #3 /htdocs/wp-config.php(94): require_once('/htdocs/wp-sett...') #4 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #5 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #6 /htdocs/index.php(17): require('/htdocs/wp-blog...') #7 {main} thrown in /htdocs/wp-content/plugins/w3-total-cache/Root_Loader.php on line 60