| @@ -3,8 +3,9 @@ | ||
| 3 | 3 | |
| 4 | 4 | use Elementor\Controls_Stack; |
| 5 | 5 | use Elementor\Core\DynamicTags\Dynamic_CSS; |
| 6 | 6 | use Elementor\Core\Kits\Manager; |
| 7 | +use Elementor\Core\Frontend\Widget_Content_Render_Mode; | |
| 7 | 8 | use Elementor\Element_Base; |
| 8 | 9 | use Elementor\Plugin; |
| 9 | 10 | |
| 10 | 11 | if ( ! defined( 'ABSPATH' ) ) { |
| @@ -125,9 +126,14 @@ | ||
| 125 | 126 | * |
| 126 | 127 | * @param array $meta New meta data. |
| 127 | 128 | */ |
| 128 | 129 | protected function update_meta( $meta ) { |
| 129 | - update_post_meta( $this->post_id, static::META_KEY, $meta ); | |
| 130 | + $is_updated = update_post_meta( $this->post_id, static::META_KEY, $meta ); | |
| 131 | + | |
| 132 | + // When a concurrent request already stored the identical value, WP reports no change and skips its meta cache invalidation. | |
| 133 | + if ( ! $is_updated ) { | |
| 134 | + wp_cache_delete( $this->post_id, 'post_meta' ); | |
| 135 | + } | |
| 130 | 136 | } |
| 131 | 137 | |
| 132 | 138 | /** |
| 133 | 139 | * Delete meta. |
| @@ -280,8 +286,12 @@ | ||
| 280 | 286 | * |
| 281 | 287 | * @param Element_Base $element The element. |
| 282 | 288 | */ |
| 283 | 289 | protected function render_styles( Element_Base $element ) { |
| 290 | + if ( Widget_Content_Render_Mode::is( Widget_Content_Render_Mode::MARKDOWN ) ) { | |
| 291 | + return; | |
| 292 | + } | |
| 293 | + | |
| 284 | 294 | /** |
| 285 | 295 | * Before element parse CSS. |
| 286 | 296 | * |
| 287 | 297 | * Fires before the CSS of the element is parsed. |