les( array( 'dimensions' => $dimensions_block_styles ) ); if ( ! empty( $styles['css'] ) ) { // Inject dimensions styles to the first element, presuming it's the wrapper, if it exists. $tags = new WP_HTML_Tag_Processor( $block_content ); if ( $tags->next_tag() ) { $existing_style = $tags->get_attribute( 'style' ); $updated_style = ''; if ( ! empty( $existing_style ) ) { $updated_style = $existing_style; if ( ! str_ends_with( $existing_style, ';' ) ) { $updated_style .= ';'; } } $updated_style .= $styles['css']; $tags->set_attribute( 'style', $updated_style ); if ( ! empty( $styles['classnames'] ) ) { foreach ( explode( ' ', $styles['classnames'] ) as $class_name ) { if ( str_contains( $class_name, 'aspect-ratio' ) && ! isset( $block_attributes['style']['dimensions']['aspectRatio'] ) ) { continue; } $tags->add_class( $class_name ); } } } return $tags->get_updated_html(); } return $block_content; } add_filter( 'render_block', 'wp_render_dimensions_support', 10, 2 ); // Register the block support. WP_Block_Supports::get_instance()->register( 'dimensions', array( 'register_attribute' => 'wp_register_dimensions_support', 'apply' => 'wp_apply_dimensions_support', ) );
Fatal error: Uncaught TypeError: WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare::__construct(): Argument #4 ($facade) must be of type WP_Rocket\ThirdParty\Plugins\CDN\CloudflareFacade, string given in /htdocs/wp-content/plugins/wp-rocket/inc/ThirdParty/Plugins/CDN/Cloudflare.php:52 Stack trace: #0 [internal function]: WP_Rocket\ThirdParty\Plugins\CDN\Cloudflare->__construct(Object(WP_Rocket\Admin\Options_Data), Object(WP_Rocket\Admin\Options), Object(WP_Rocket\Engine\Admin\Beacon\Beacon), 'WP_Rocket\\Third...') #1 /htdocs/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Definition/Definition.php(220): ReflectionClass->newInstanceArgs(Array) #2 /htdocs/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Definition/Definition.php(180): WP_Rocket\Dependencies\League\Container\Definition\Definition->resolveClass('WP_Rocket\\Third...') #3 /htdocs/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Definition/Definition.php(158): WP_Rocket\Dependencies\League\Container\Definition\Definition->resolveNew() #4 /htdocs/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Definition/DefinitionAggregate.php(83): WP_Rocket\Dependencies\League\Container\Definition\Definition->resolve() #5 /htdocs/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Container.php(175): WP_Rocket\Dependencies\League\Container\Definition\DefinitionAggregate->resolve('cloudflare_plug...') #6 /htdocs/wp-content/plugins/wp-rocket/inc/Dependencies/League/Container/Container.php(118): WP_Rocket\Dependencies\League\Container\Container->resolve('cloudflare_plug...') #7 /htdocs/wp-content/plugins/wp-rocket/inc/Plugin.php(166): WP_Rocket\Dependencies\League\Container\Container->get('cloudflare_plug...') #8 /htdocs/wp-content/plugins/wp-rocket/inc/main.php(53): WP_Rocket\Plugin->load() #9 /htdocs/wp-includes/class-wp-hook.php(341): rocket_init('') #10 /htdocs/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #11 /htdocs/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #12 /htdocs/wp-settings.php(593): do_action('plugins_loaded') #13 /htdocs/wp-config.php(98): require_once('/htdocs/wp-sett...') #14 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #15 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #16 /htdocs/index.php(17): require('/htdocs/wp-blog...') #17 {main} thrown in /htdocs/wp-content/plugins/wp-rocket/inc/ThirdParty/Plugins/CDN/Cloudflare.php on line 52