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

Use prefix theme_json_ in hooks related to theme.json #44189

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

oandregal
Copy link
Member

What?

Renames the filter get_style_nodes to theme_json_get_style_nodes.

Why?

We've introduced a number of filters for theme.json in this cycle:

  • a few to hook into the data: theme_json_default, theme_json_blocks, theme_json_theme, theme_json_user. 44015 and 44159
  • another to hook into the low-level algorithm: get_style_nodes 41160

With so many hooks in core, it helps discoverability and devexp that we use a coherent names for things that are related.

How?

Renames the calls to the filter.

Testing Instructions

See #41160

@oandregal oandregal self-assigned this Sep 15, 2022
@oandregal oandregal added [Type] Code Quality Issues or PRs that relate to code quality Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Sep 15, 2022
Copy link
Contributor

@scruffian scruffian left a comment

Choose a reason for hiding this comment

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

LGTM

@oandregal
Copy link
Member Author

@c4rl0sbr4v0 @ockham @michalczaplinski I'm waiting for this one to pass before merging. I'm not sure about the timing for 14.1 but I can backport it when merged.

@oandregal oandregal merged commit 48e841b into trunk Sep 15, 2022
@oandregal oandregal deleted the add/prefix-theme-json-to-hook-name branch September 15, 2022 13:33
@oandregal
Copy link
Member Author

Cherry-picked to release/14.1 at 0bb1cec

@cbravobernal cbravobernal added the Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) label Sep 15, 2022
pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Sep 15, 2022
This consolidates the name of a filter introduced earlier in the 6.1 cycle, renaming it from `get_style_nodes` to `theme_json_get_style_nodes` as to be more coherent with the other hooks introduced in 6.1 as well.

This commit backports the original PR from Gutenberg repository:
* [WordPress/gutenberg#44189 #44189 Use prefix 'theme_json_' in hooks related to theme.json]

Reference: [#3247 #3247 Add hooks to filter theme.json data].

Follow-up to [54118].

Props oandregal, scruffian, bernhard-reiter.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54183 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Sep 15, 2022
This consolidates the name of a filter introduced earlier in the 6.1 cycle, renaming it from `get_style_nodes` to `theme_json_get_style_nodes` as to be more coherent with the other hooks introduced in 6.1 as well.

This commit backports the original PR from Gutenberg repository:
* [WordPress/gutenberg#44189 #44189 Use prefix 'theme_json_' in hooks related to theme.json]

Reference: [WordPress/wordpress-develop#3247 #3247 Add hooks to filter theme.json data].

Follow-up to [54118].

Props oandregal, scruffian, bernhard-reiter.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54183


git-svn-id: http://core.svn.wordpress.org/trunk@53742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to gilzow/wordpress-performance that referenced this pull request Sep 15, 2022
This consolidates the name of a filter introduced earlier in the 6.1 cycle, renaming it from `get_style_nodes` to `theme_json_get_style_nodes` as to be more coherent with the other hooks introduced in 6.1 as well.

This commit backports the original PR from Gutenberg repository:
* [WordPress/gutenberg#44189 #44189 Use prefix 'theme_json_' in hooks related to theme.json]

Reference: [WordPress/wordpress-develop#3247 #3247 Add hooks to filter theme.json data].

Follow-up to [54118].

Props oandregal, scruffian, bernhard-reiter.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54183


git-svn-id: https://core.svn.wordpress.org/trunk@53742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
whereiscodedude pushed a commit to whereiscodedude/wpss that referenced this pull request Sep 18, 2022
This consolidates the name of a filter introduced earlier in the 6.1 cycle, renaming it from `get_style_nodes` to `theme_json_get_style_nodes` as to be more coherent with the other hooks introduced in 6.1 as well.

This commit backports the original PR from Gutenberg repository:
* [WordPress/gutenberg#44189 #44189 Use prefix 'theme_json_' in hooks related to theme.json]

Reference: [WordPress/wordpress-develop#3247 #3247 Add hooks to filter theme.json data].

Follow-up to [54118].

Props oandregal, scruffian, bernhard-reiter.
See #56467.
Built from https://develop.svn.wordpress.org/trunk@54183
@ockham ockham added the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Sep 19, 2022
@ockham
Copy link
Contributor

ockham commented Sep 19, 2022

I just cherry-picked this PR to the wp/6.1 branch to get it included in the next release: ac50ea8

@ockham ockham removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Sep 19, 2022
@aaronrobertshaw aaronrobertshaw removed the Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) label Oct 12, 2022
ootwch pushed a commit to ootwch/wordpress-develop that referenced this pull request Nov 4, 2022
This consolidates the name of a filter introduced earlier in the 6.1 cycle, renaming it from `get_style_nodes` to `theme_json_get_style_nodes` as to be more coherent with the other hooks introduced in 6.1 as well.

This commit backports the original PR from Gutenberg repository:
* [WordPress/gutenberg#44189 #44189 Use prefix 'theme_json_' in hooks related to theme.json]

Reference: [WordPress#3247 WordPress#3247 Add hooks to filter theme.json data].

Follow-up to [54118].

Props oandregal, scruffian, bernhard-reiter.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54183 602fd350-edb4-49c9-b593-d223f7449a82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Code Quality Issues or PRs that relate to code quality
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

5 participants