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

Add edit context to patterns REST controllers #40259

Merged
merged 2 commits into from
Apr 12, 2022

Conversation

ntsekouras
Copy link
Contributor

We need to add edit context to the patterns REST controllers as it has changed in the backport to core: WordPress/wordpress-develop#2567.

This also adds a check about the theme's patterns directory being readable and changes errors to _doing_it_wrong for pattern registration from this theme's directory(patterns).

@ntsekouras ntsekouras added Core REST API Task Task for Core REST API efforts [Type] Code Quality Issues or PRs that relate to code quality Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core labels Apr 12, 2022
@ntsekouras ntsekouras self-assigned this Apr 12, 2022
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Awesome, thank you for doing it.

In WordPress core I fight with some failing unit tests after similar changes. We should learn if that's the case here as well once CI jobs finish.

@gziolo gziolo 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 Apr 12, 2022
@gziolo
Copy link
Member

gziolo commented Apr 12, 2022

I don't think we need to backport anything back to WP core from this PR - removed the label.

Copy link
Member

@jsnajdr jsnajdr left a comment

Choose a reason for hiding this comment

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

👍

lib/compat/wordpress-6.0/block-patterns.php Outdated Show resolved Hide resolved
@ntsekouras ntsekouras force-pushed the update/pattern-controllers-edit-context branch from 09fb87d to 0a4d988 Compare April 12, 2022 10:44
@ntsekouras ntsekouras merged commit b3cac2c into trunk Apr 12, 2022
@ntsekouras ntsekouras deleted the update/pattern-controllers-edit-context branch April 12, 2022 11:28
@github-actions github-actions bot added this to the Gutenberg 13.1 milestone Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core Core REST API Task Task for Core REST API efforts [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants