درحال بارگذاری ...
بستن
مقایسه
مقایسه محصولات
لیست مقایسه محصولات شما خالی می باشد!
$hash = md5( $opening_tag_html . $this->count ); ++$this->count; // Inject the hash as an attribute in the opening tag. $replace = preg_replace( '/' . $child->tagName . '/is', '$0 data-rocket-location-hash="' . $hash . '"', $opening_tag_html, 1 ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase // Check if $replace is null or empty, and skip processing if true if ( is_null( $replace ) || $replace === '' ) { Logger::warning( 'Replacement failed due to null or empty value.', [ 'LazyRenderContent' ] ); continue; } // Replace the opening tag in the HTML by the manipulated one // If DOMDocument automatically modified the original element, we might not find it in the HTML. // Known issue: if there is an element with the exact same opening tag before in the HTML that did not receive a hash, it will replaced instead of the correct element in the HTML. $element_replacements = 0; $modified_html = preg_replace( '/' . preg_quote( $opening_tag_html, '/' ) . '/', $replace, $html, 1, $element_replacements ); // Check if $modified_html is null or empty, and skip processing if true if ( $element_replacements < 1 ) { Logger::warning( 'Opening tag from DOMDocument not found in original HTML.', [ 'LazyRenderContent' ] ); } if ( is_null( $modified_html ) || $modified_html === '' ) { Logger::warning( 'Modified HTML is null or empty after replacement.', [ 'LazyRenderContent' ] ); continue; } $html = $modified_html; // Recursively process child elements. $html = $this->add_hash_to_element( $child, $depth - 1, $html );
Fatal error: Uncaught Error: Class 'WP_Rocket\Engine\Optimization\LazyRenderContent\Frontend\Processor\Dom' not found in /home/tigerm/domains/tigermarket.ir/public_html/wp-content/plugins/wp-rocket/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Processor.php:24 Stack trace: #0 /home/tigerm/domains/tigermarket.ir/public_html/wp-content/plugins/wp-rocket/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php(152): WP_Rocket\Engine\Optimization\LazyRenderContent\Frontend\Processor\Processor->set_processor('dom') #1 /home/tigerm/domains/tigermarket.ir/public_html/wp-content/plugins/wp-rocket/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php(128): WP_Rocket\Engine\Optimization\LazyRenderContent\Frontend\Controller->add_hashes('<!DOCTYPE html>...') #2 /home/tigerm/domains/tigermarket.ir/public_html/wp-content/plugins/wp-rocket/inc/Engine/Optimization/LazyRenderContent/Frontend/Subscriber.php(45): WP_Rocket\Engine\Optimization\LazyRenderContent\Frontend\Controller->add_hashes_when_allowed in /home/tigerm/domains/tigermarket.ir/public_html/wp-content/plugins/wp-rocket/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Processor.php on line 24