-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix tinymce not defined #4731
Fix tinymce not defined #4731
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @joemcgill, LGTM!
return ''; | ||
} | ||
|
||
// If the intended strategy is 'defer', limit the initial list of eligibles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// If the intended strategy is 'defer', limit the initial list of eligibles. | |
// If the intended strategy is 'defer', limit the initial list of eligibles since 'async' can fallback to 'defer' but not vice-versa. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improved in edd9347.
|
||
$actual = get_echo( 'wp_print_scripts', array( array( 'wp-tinymce' ) ) ); | ||
|
||
$this->assertStringNotContainsString( 'async', $actual ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For good measure perhaps:
$this->assertStringNotContainsString( 'async', $actual ); | |
$this->assertStringNotContainsString( 'async', $actual ); | |
$this->assertStringNotContainsString( 'defer', $actual ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add the the suggested, reminder to add messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handled in 3d1a245.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, a couple of non-blocking nits in there.
* | ||
* @ticket 58648 | ||
*/ | ||
public function test_printing_tinymce_scripts() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's covered elsewhere but a similar test for scripts registered with a loading strategy but never have wp_enqueue_script()
called might be helpful.
might being the keyword. This isn't a passive agressive change request -- could be added later so this can be committed pre beta.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion. I've added one in d3835ba.
Thanks for the ping! From what I can see this isn't related to my experimentation on the Gutenberg side; it's rather related to the recent introduction of the The proposed fix appears to be spot on 👍 |
Right, the bug was that Not closing this PR as there are few suggestions that can be added later. |
Moved followup tasks to a different PR to clarify what would be committed separately. |
Trac ticket: https://core.trac.wordpress.org/ticket/58648
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.