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

Backporting block supports filter callback and registrations and tests #3273

Closed

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Sep 19, 2022

🎼 So much, So much clean 🎶

This is combination of of @ockham's changes in #3259, which is a fork of @ramonjd's #3218.

The purpose here is to

Original PR desc:

Backporting changes to script-loader that enqueue block support styles stored by the style engine

See tracking issue: WordPress/gutenberg#43440

Backporting the following changes
WordPress/gutenberg#42880
(WordPress/gutenberg#4288 has testing instructions.)

Props to @gziolo and @ockham

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


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.

$style_tag_id = 'core';
foreach ( $core_styles_keys as $style_key ) {
// Adds comment if code is prettified to identify core styles sections in debugging.
$should_prettify = isset( $options['prettify'] ) ? true === $options['prettify'] : defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could consider moving this line before of the loop. (Not a blocker ofc.)

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed @ockham. While not a blocker, it's a quick change that could be made in the PR or prior to commit.

Copy link
Contributor

@ockham ockham left a comment

Choose a reason for hiding this comment

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

Thanks @ramonjd! LGTM :shipit:

Copy link
Contributor

@costdev costdev left a comment

Choose a reason for hiding this comment

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

Just one minor thought but other than that, LGTM! 👍

src/wp-includes/script-loader.php Outdated Show resolved Hide resolved
@audrasjb audrasjb self-assigned this Sep 19, 2022
Copy link
Contributor

@audrasjb audrasjb left a comment

Choose a reason for hiding this comment

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

LGTM. I committed the two proposed changes.

@audrasjb
Copy link
Contributor

Committed in https://core.trac.wordpress.org/changeset/54214

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

Successfully merging this pull request may close these issues.

4 participants