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

WP_REST_Global_Styles_Revisions_Controller is missing the usual REST API filters #68327

Open
anton-vlasenko opened this issue Dec 26, 2024 · 4 comments
Labels
REST API Interaction Related to REST API [Type] Enhancement A suggestion for improvement.

Comments

@anton-vlasenko
Copy link
Contributor

anton-vlasenko commented Dec 26, 2024

What problem does this address?

It’s unclear whether this is intentional or an oversight, but the WP_REST_Global_Styles_Revisions_Controller controller class is missing the usual WordPress REST filters, such as rest_revision_query and rest_prepare_revision.
These filters could use unique names, like rest_global_styles_query and so on.

What is your proposed solution?

Add these filters to the WP_REST_Global_Styles_Revisions_Controller class and backport the changes to WordPress Core.

@anton-vlasenko anton-vlasenko added [Type] Enhancement A suggestion for improvement. REST API Interaction Related to REST API labels Dec 26, 2024
@anton-vlasenko anton-vlasenko changed the title WP_REST_Global_Styles_Revisions_Controller is missing usual REST API filters WP_REST_Global_Styles_Revisions_Controller is missing the usual REST API filters Dec 26, 2024
@ramonjd
Copy link
Member

ramonjd commented Dec 27, 2024

It’s unclear whether this is intentional or an oversight

Thanks for posting the issue.

It was intentional at the start because the endpoint was new and changing, and I didn't want to introduce any public APIs too soon.

Now that WordPress/wordpress-develop#5699 is done it makes sense to add the filters for consistency.

@patil-vipul
Copy link

@ramonjd Thanks for confirming, I'll raise a PR for the same.

@patil-vipul
Copy link

A core ticket has also been created here https://core.trac.wordpress.org/ticket/62742#ticket

@patil-vipul
Copy link

PR for has been raised here.

cc: @anton-vlasenko @ramonjd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REST API Interaction Related to REST API [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants