-
-
Notifications
You must be signed in to change notification settings - Fork 215
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 panel to display registered assets #879
base: develop
Are you sure you want to change the base?
Conversation
Neat, I like it. Thanks. I think I would be happy to have this panel available without the |
Great! Will make that change. |
@johnbillion Are you opposed to adding a sort to the Handle column? I'd prefer that to forcing it to be sorted, as there might be a situation where seeing the order that assets are registered is helpful. |
Hmmm, forgot sorting was limited to numbers. 🤔 |
It should be possible to sort the handle column yeah |
@johnbillion I can't add you as a reviewer unfortunately, but please take a peek here: crstauf#1. |
I would like to get this in, but it's triggering a PHP warning on the front end.
The error is inside The same problem might occur for other styles or scripts that are only intended for the admin area or only for the front end. Thoughts? |
@johnbillion This seems to only occur because global $_wp_admin_css_colors;
if ( ! isset( $_wp_admin_css_colors ) || is_null( $_wp_admin_css_colors ) ) {
$_wp_admin_css_colors = [ 'fresh' => (object) [ 'url' => '' ] ];
} Is that an acceptable solution from your perspective? |
My worry is whether this will result in errors for other third-party scripts and styles that are enqueued in the admin area and don't expect to be processed in the front end, and vice versa. Probably uncommon, but it's hard to tell. |
@johnbillion If the asset is globally registered, but only enqueued on one side, all of the necessary data is still available. If an asset is registered only on one side, then it won't be listed. This error only occurs because there's a dynamic component to Really I think the way WordPress handles this should be changed, but that's a separate conversation. |
No description provided.