Skip to content
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

Remove deprecated 'print_emoji_styles' when generating the block editor's iframe assets #5305

Closed

Conversation

Mamaduka
Copy link
Member

PR removes the recently deprecated print_emoji_styles handler when generating the block editor's iframe assets.

Why

Deprecation notice triggered by the callback breaks editor styles when WP_DEBUG is set to true.

Testing Instructions.

  1. Enable debugging:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', false );
define( 'WP_DEBUG_DISPLAY', true );
  1. Open a post or page.
  2. Insert a group block.
  3. Placeholder styles shouldn't be broken.
  4. Run the following script on the DevTools console - wp.data.select( 'core/block-editor' ).getSettings().__unstableResolvedAssets.styles
  5. Returned value shouldn't include a deprecation message.

Screenshot

CleanShot 2023-09-26 at 15 34 26

Trac ticket: https://core.trac.wordpress.org/ticket/58775.

@Mamaduka
Copy link
Member Author

Note: Fix here uses conditional check before removing and adding the callback. This differs from a fix that landed in the Gutenberg repo this morning. I'll sync changes back if this gets committed.

@spacedmonkey
Copy link
Member

@hellofromtonya Do you want to review as well. I plan to commit once the unit tests pass.

@hellofromtonya
Copy link
Contributor

Testing it now. Give me a few minutes.

Copy link
Contributor

@hellofromtonya hellofromtonya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in a default local testing environment:

  • Get the deprecation notice before applying this patch.
  • After applying the patch, no more deprecation notice ✅

This change resolves the issue. LGTM for commit 👍

@hellofromtonya
Copy link
Contributor

@spacedmonkey LGTM for commit. Thank you everyone for resolving this issue!

@spacedmonkey
Copy link
Member

Committed 6a06786

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants