Internal: Delete invalidated style definitions' corresponding CSS files [ED-21536]#33455
Merged
ronros-elementor merged 17 commits intoelementor:mainfrom Nov 17, 2025
Merged
Conversation
Omerisra6
previously approved these changes
Nov 17, 2025
| $this->post_ids[] = $post_id; | ||
| } ); | ||
|
|
||
| add_action( 'elementor/atomic-widgets/styles/clear', fn( array $cache_keys ) => $this->clear_styles( $cache_keys ) ); |
Contributor
There was a problem hiding this comment.
I liked the name $path better, but maybe it won't make sense for the end user? (in other places as well)
Comment on lines
+531
to
+539
| $upload_dir = wp_upload_dir(); | ||
| $base_path = trailingslashit( $upload_dir['basedir'] ) . 'elementor/css/'; | ||
|
|
||
| $existing_files = [ | ||
| $base_path . implode( '-', $nested_cache_key_1 ) . '-desktop.css', | ||
| $base_path . implode( '-', $nested_cache_key_1 ) . '-mobile.css', | ||
| $base_path . implode( '-', $nested_cache_key_2 ) . '-desktop.css', | ||
| $base_path . implode( '-', $nested_cache_key_2 ) . '-tablet.css', | ||
| ]; |
Contributor
There was a problem hiding this comment.
maybe put it at the top so it would be clearer
Omerisra6
approved these changes
Nov 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Atomic_Styles_Manager, instead of directly invalidating each caching flag from its corresponding "styles provider" class.$style_keyargument, which is essentially just animplodeof the$cache_keysarray - instead will only use the$cache_keys.✨ PR Description
Purpose: Refactor style registration and cache invalidation system to improve CSS file management and deletion of invalidated styles.
Main changes:
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how