-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Audit of the extensibility available in the widgets admin screen #31126
Comments
Are you still working on this? It's a great start 🙂 |
Yes I am :( |
I think the initial audit is complete. The orange boxes are what I could not find as being supported but can be added but I am 100% some are false positives. |
As part of the audit I have tested the following stack of "popular" widgets, based on top recommended lists all over the web:
I will leave thes notes here:
|
Which events? Can we fake any of them? |
Thanks for looking into this @draganescu. So, to confirm, to close this issue, we should go through each of the 🟧s and add the filter/action to the new screen? If so maybe let's add this to Needs Dev and close #28673? |
Yes, if possible. |
I'll unassigned you so that somebody can pick this up and add filters for all the 🟧 items. |
@draganescu @noisysocks I'm not sure what action is required for these three items: 🟧 supports widgets is required 🟧 sidebar_admin_setup - this is already firing in both the widgets screen and the customizer, so I think nothing further is needed? 🟧 delete_widget - this can be added in the widgets controller, I'll do a PR for that. 🟧 widgets_admin_page is supposed to fire just before the page content loads, and 🟧 sidebar_admin_page fires just before the admin footer. For both of these I can't find anywhere suitable to add them on the PHP side, and if I add them in the JS (with |
Thanks for looking into this! It looks like, now that widgets has been merged into core, all of these changes need to be made in core and not the plugin.
@draganescu is referring to these two checks. They currently only exist in
This requires no action because the check is already in
It looks like we're only calling this in
Makes sense! This endpoint is in core now, though, so we'll need to make the change in Trac/SVN.
This exists in
It looks like we're only calling this in |
Too late to the party @noisysocks answered everything! 🚀 |
PRs done in wp-develop: WordPress/wordpress-develop#1308 |
Closing this in favour of the trac tickets. |
Closes #28673
Audit Widgets Screen third-party extensibility
I looked at three files implementing the current Menus screen in WP Admin:
wp-admin/widgets.php
wp-includes/widgets.php
wp-admin/includes/widgets.php
I found, as expected a list of checks, filters and actions. Then I ran through the menus endpoint to check which of them are already fired by the REST API and so are already supported, and which depend on server side rendering. They're marked with:
Theme supports and permissions
on
As far as I could find these are all the checks for being allowed to do things on that screen.
Filters
wp-includes/widgets.php
wp-admin/includes/widgets.php
wp_widgets_access_body_class
wp-admin/widgets.php
wp_widgets_access_body_class
Actions
wp-includes/widgets.php
wp-admin/includes/widgets.php
wp-admin/widgets.php
JS Events
wp-admin/js/widgets.js
The text was updated successfully, but these errors were encountered: