Fix: Email Content Editor for 'Delete Inactive Accounts' is not working#408
Open
reygcalantaol wants to merge 1 commit intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR ensures the TinyMCE editor loads in the email customizer when using block-based themes by explicitly firing footer scripts.
- Adds a block-theme detection in
customize_controls() - Calls
admin_print_footer_scripts()to initialize TinyMCE under block themes
Comments suppressed due to low confidence (3)
includes/emails/class-wpum-emails-customizer-scripts.php:86
- Instead of manually calling
admin_print_footer_scripts, consider usingwp_enqueue_editor()to load TinyMCE and its dependencies. This aligns with WordPress core APIs and reduces risk of duplicate script outputs.
// This is a workaround to ensure that the tinymce editor is initialized in a block theme.
includes/emails/class-wpum-emails-customizer-scripts.php:87
- [nitpick] Add a comment referencing the related WordPress core issue or the version when block themes stopped loading TinyMCE by default, so future maintainers understand the need for this workaround.
if ( function_exists( 'wp_is_block_theme' ) && wp_is_block_theme() ) {
includes/emails/class-wpum-emails-customizer-scripts.php:87
- Introduce a test to verify that editor scripts are correctly initialized when
wp_is_block_theme()returns true to prevent regression in block-theme contexts.
if ( function_exists( 'wp_is_block_theme' ) && wp_is_block_theme() ) {
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.
Resolves https://github.com/WPUserManager/wpum-security/issues/71
Description
The issue affects all email templates and occurs when a theme uses full site editing with the block editor. This happens because block-based themes do not load TinyMCE on admin pages that aren’t part of the site editing experience.
Testing Instructions
Pre-review Checklist