So, is there a way to achieve this?
Indeed, there is – I’m doing it in my own optimization plugin – but it’s going to involve more work than you might first suspect.
- Use
add_action()
to register a hook that triggers on the front-end to output a JSON-encoded array of registered styles - Use the HTTP API (or an AJAX call) to make a request against the front-end to trigger that hook
- Read the results of your HTTP API call from your
/wp-admin/
script
There are a number of additional considerations if you want to cover all your bases here, but that should be everything you need to get started.
Related Posts:
- Using tabs for wordpress plugin
- How to activate/deactivate menu tab and keep the same id?
- Adding a Taxonomy Filter to Admin List for a Custom Post Type?
- I found this in a plugin. What does it do? is it dangerous?
- Disable /wp-admin/plugin-install.php
- Is There a WordPress Hook to Filter the Edit Posts View?
- Reordering themes in admin panel
- Removing an admin page added by a 3rd party plugin. Gravity forms in this example
- Custom admin column disappearing when using Quick Edit [duplicate]
- WordPress admin notice in plugin function
- how to not show plugin in admin area
- wp_enqueue_style in Plugin [duplicate]
- Quote rotator in the sidebar
- Styles and Scripts, Selectively enqueue across entire site
- How to make a WP admin button/menu similar to Jetpack Notifications?
- WordPress Plugin Look & Feel
- Add CSS class to add-to-cart button, Woocommerce [closed]
- Getting “Fatal error: Call to undefined function wp_cache_get() in option.php” after updating a cache plugin [closed]
- How to load all plugins CSS after child theme CSS?
- I need to generate the CSS for my plugin from a function, how do i map a request to a function in the front-end?
- How do I register a stylesheet inside a WordPress widget?
- Edits to plugin not taking effect
- Weird problems after recovery from security breach
- How to Sort the Favorite Plugins Screen Alphabetically?
- Hide extra menus from WordPress Dashboard
- ‘wp_login’ action hook not working with wp-login.php file
- ‘Customize’ button in admin bar for CSS
- 404 Error on Activate / Deactivate Plugin
- Why isn’t admin_notices displaying my text? [Simple Plugin, Beginner]
- All Users > User List > Update User Meta Field Inline
- Globally register styles but enqueue them selectively
- CSS from textarea in options page to frontend what to do
- custom changes removed after plugin update
- How to hide some section in WordPress under Post
- Default WordPress WP Editor removing style tags and html tag
- WPBakery JS composer unused css [closed]
- How to tie dark mode with prefers-color-scheme webkit? [closed]
- Trouble with plugin styles in admin area of WordPress
- Changing “elapsed time” to “time remaining” on MP3-jPlayer audio player with CSS or PHP changes
- Removing included CSS file that doesn’t exist
- How to create an input field, and base the output on spreadsheet data? [closed]
- Polylang : Interverting languages after development [closed]
- Bootstrap and Custom CSS in custom plugin are being overwritten by theme
- Ability to automatically redirect a URL
- Which filter affects the ‘entry-title’ post class
- Adding CSS to custom post type admin page causes error
- How to use my menu PHP code as sidebar?
- Redirect to another page using contact form 7? [closed]
- Edit External CSS
- Network activating; if ( !current_user_can( ‘manage_options’ ) ) locks me out…
- Why Do I get “wp_remote-get: could not handle for fopen()”?
- Overwrite a plugin’s CSS?
- How to make multiple admin pages for one plugin?
- Combining several CSS files into one for optimization
- $wpdb update query in plugin only updating one column
- Locked out of admin panel after installing HC Custom WP-Admin URL [closed]
- How to execute a plugin on a single page only?
- How to limit image size for the entire website ? But without editing the post (css/plugin?!)
- Is there a way to remove a tooltip of a plugin via custom CSS? [closed]
- Redirect Plugins.php to New Plugin Page
- Custom CSS not being added by plugin
- WordPress as heavily personalized content management portal, and somewhat like dropbox [closed]
- Add background image/layout for single page?
- I cannot include a file in my plugin settings page
- Error activating certain plugins
- Unable to locate inline CSS causing parts of page to be blank
- Change Dashboard URL from wp-admin to wp-admin/index.php
- Two plugins using the same CSS id
- Load CSS before Theme CSS
- Elementor pro page editing gives error There has been a critical error on this website. Please check your site admin email inbox for instructions
- force logged in user to stay in the dashboard
- How can we get this dynamically as this folder may not be by the same name always → wp-admin
- Failed GET Request From admin.php To Fetch .min.js File From Unminifed Directory
- Get full URL of WP plugin admin page
- How to change the width of certain paragraph or header blocks?
- Admin login substantially slower on production server
- wordpress plugin translation not working
- How can I share my wordpress site with a friend?
- Set plugin page as homepage
- The Commercial tab is missing from the Plugins page when trying to update Types 1.7
- Admin Logged In Notify Globaly
- Display alt text as tool tip on page
- Which filters or actions involve with index page for plugin?
- Overwrite CSS of Instaemail plugin popup
- contact 7 plugin stops some pages from working properly
- Trouble After Update, Removing Plugin
- Ajax in Plugins: returns the whole page
- Gutenberg: Dynamic Block – Show saved data in the editor
- Plugins to generate CSS Sprites? [closed]
- adding a css file to my plugin
- How do I add custom fields to the “Edit page” admin screen?
- Trying to disable all notifications except for one on woocommerce checkout page with css [closed]
- Mixed content warning on doctype in admin
- Child Plugin Admin Panel
- Ajax in wordpress [duplicate]
- Notifications Bar on home page only
- List all posts in a particular page [closed]
- How to display content depending on the Woocommerce Product Category
- Can I merge all my JS and CSS in one file using WP?
- Allow direct access to files/folders within WordPress to replace wp-admin