-
Notifications
You must be signed in to change notification settings - Fork 39
fix custom css prefixing class on style duplicate #2748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
b50b0fe
08a8b7b
6772ab2
11c486f
ea1c677
7ef39db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -250,11 +250,12 @@ class="frm-style-item-heading"> | |
|
|
||
| <div id="frm_single_style_custom_css_editor" class="frm12 frm_form_field frm-style-component <?php echo empty( $style->post_content['enable_style_custom_css'] ) ? 'frm_hidden' : ''; ?>"> | ||
| <?php | ||
| $css_scope_helper = new FrmCssScopeHelper(); | ||
| $custom_css = $style->post_content['single_style_custom_css'] ?? ''; | ||
| $css_scope_helper = new FrmCssScopeHelper(); | ||
| $custom_css = $style->post_content['single_style_custom_css'] ?? ''; | ||
| $scoped_style_name = ! empty( $style->post_content['old_name_before_duplicate'] ) ? $style->post_content['old_name_before_duplicate'] : $style->post_name; | ||
|
|
||
| if ( ! empty( $custom_css ) ) { | ||
| $custom_css = $css_scope_helper->unnest( $custom_css, 'frm_style_' . $style->post_name ); | ||
| $custom_css = $css_scope_helper->unnest( $custom_css, 'frm_style_' . $scoped_style_name ); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Liviu-p It seems that I feel like we should be fixing this during the duplication. We could unnest with the original name, then immediately nest with the new name.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey @Crabcyborg, I agree that It makes sense to have this handled in the duplicate action( it's an initial approach that I took, but changes weren't reflected in the style settings section ). So I noticed that style creation on duplicate is made for preview section only and the style settings is keeping the original one Basically changing some style options on duplicate isn't getting reflected in the settings area. It requires a "Save"/"Update" action for duplicated style to be created an saved into db. |
||
| } | ||
|
|
||
| FrmStylesController::custom_css( | ||
|
|
||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.