Plugin assets loading on frontend instead of admin-only
-
Hi there,
Thanks for your work on this plugin!!
I’ve noticed that Copy Delete Posts is loading all its CSS and JavaScript files on every page of my website, including the frontend where visitors browse.
Specifically, these files are loading site-wide:
- cdp.min.css
- cdp-global.min.css
- cdp-select.min.css
- cdp-user.min.css
- cdp.tooltip.min.css
- cdp.min.js
- cdp-global.min.js
- cdp-select.min.js
- cdp-user.min.js
- cdp-modal.min.js
- cdp.tooltip.min.js
Since this plugin is only used in the WordPress admin area to copy and delete posts, is there a reason these assets need to load on the frontend? This adds unnecessary HTTP requests and file size to every page load for visitors.
Would it be possible to add a check like
if (is_admin())to only enqueue these assets in the admin area where they’re actually needed? This would significantly improve frontend performance.For now, I’ve used Asset CleanUp to prevent these files from loading on the frontend, but it would be great if this was handled by the plugin itself.
Thanks again.
You must be logged in to reply to this topic.