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

Document new global styles filters #44111

Merged
merged 3 commits into from
Sep 13, 2022
Merged

Conversation

oandregal
Copy link
Member

@oandregal oandregal commented Sep 13, 2022

What?

This PR documents the new global styles filters introduced at #44015

Why?

We want them to be discoverable by authors.

How?

Adds a new page to the hooks reference section of the block editor handbook.

Test

See live document.

@oandregal oandregal self-assigned this Sep 13, 2022
@oandregal oandregal added Needs User Documentation Needs new user documentation [Type] Developer Documentation Documentation for developers and removed Needs User Documentation Needs new user documentation labels Sep 13, 2022
Copy link
Member

@fabiankaegy fabiankaegy left a comment

Choose a reason for hiding this comment

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

The guide you've added is very clear and useful! Thanks for adding it :)

I have one question about the APIs that might be a good addition to the docs. But it's not a blocking thing at all.

Do the filters get applied both on the frontend of the site and in all the various editors?

@gziolo
Copy link
Member

gziolo commented Sep 13, 2022

Excellent work @oandregal.

@oandregal
Copy link
Member Author

Do the filters get applied both on the frontend of the site and in all the various editors?

Yes, they run once for every context that uses global styles & settings data.

Copy link
Member

@aristath aristath left a comment

Choose a reason for hiding this comment

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

Thank you!

@oandregal oandregal merged commit 0d60dbc into trunk Sep 13, 2022
@oandregal oandregal deleted the add/docs-for-global-styles-filters branch September 13, 2022 09:52
@github-actions github-actions bot added this to the Gutenberg 14.1 milestone Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants