// phpcs:disable WordPress.Security.NonceVerification.Missing if ( ! empty( $_POST ) ) { return; } // Disable in customizer previews if ( is_customize_preview() ) { return; } // Disable in feeds, AJAX, Cron, XML. if ( is_feed() || wp_doing_ajax() || wp_doing_cron() || wp_is_xml_request() ) { return; } // Disable in sitemaps. if ( ! empty( get_query_var( 'sitemap' ) ) ) { return; } // Disable in AMP pages. if ( function_exists( 'amp_is_request' ) && amp_is_request() ) { return; } // Print the filtered script tags to the very end of the page. add_filter( 'jetpack_boost_output_filtering_last_buffer', array( $this, 'append_script_tags' ), 10, 1 ); // Handle exclusions. add_filter( 'script_loader_tag', array( $this, 'handle_exclusions' ), 10, 2 ); $this->output_filter->add_callback( array( $this, 'handle_output_stream' ) ); } /** * Remove all inline and external closing tag is encountered. return array( '', $joint_buffer ); } // No script tags detected, return both chunks unaltered. return array( $buffer_start, $buffer_end ); } // Makes sure all whole tags are in $buffer_start. list( $buffer_start, $buffer_end ) = $this->recalculate_buffer_split( $joint_buffer, $script_tags ); foreach ( $script_tags as $script_tag ) { $this->buffered_script_tags[] = $script_tag[0]; $buffer_start = str_replace( $script_tag[0], '', $buffer_start ); } // Detect a lingering opened script. $this->is_opened_script = $this->is_opened_script( $buffer_start . $buffer_end ); return array( $buffer_start, $buffer_end ); } /** * Matches tag to appear in the buffer. * * Open script tags are always kept in the buffer until their closing * tags eventually arrive as well. That means it's only possible to * encounter an unpaired opening --> comment? * @todo What happens when script tags are unclosed? */ return $opening_tags_count > $closing_tags_count; } public static function get_slug() { return 'render_blocking_js'; } }
Fatal error: Uncaught Error: Class "Automattic\Jetpack_Boost\Modules\Optimizations\Render_Blocking_JS\Render_Blocking_JS" not found in /htdocs/wp-content/plugins/jetpack-boost/app/data-sync/Modules_State_Entry.php:15 Stack trace: #0 /htdocs/wp-content/plugins/jetpack-boost/wp-js-data-sync.php(237): Automattic\Jetpack_Boost\Data_Sync\Modules_State_Entry->__construct(Array) #1 /htdocs/wp-content/plugins/jetpack-boost/jetpack-boost.php(265): require_once('/htdocs/wp-cont...') #2 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #3 /htdocs/wp-config.php(92): 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/jetpack-boost/app/data-sync/Modules_State_Entry.php on line 15