I’d like to remove some of the included styles and put them in my main stylesheet.
I don’t want the extra HTTP call from your plugin so I don’t want it loading the stylesheet.
I can see in your model file where the assets are queued but neither of these work though:
wp_dequeue_style( ‘user-meta’ );
wp_deregister_style( ‘user-meta’ ); // user-meta
Thanks for the ‘hack’. But of course as soon when I update your plugin this change will be lost.
I can see you’ve got a queueing function for each of the resources and it’s using the standard WP wp_enqueue_style. Now I know all of the handles. I don’t understand is why dequeue’ing your styles/scripts doesn’t work? This would be preferable so I’m not altering the plugin code. Neither of these work with a priority of 99.
In the latest version the user_meta_scripts filter works perfectly, thanks.
The next problem is: I’m removing all styles and scripts with:
add_filter( 'user_meta_scripts', 'removeUmpScripts' );
function removeUmpScripts( $scripts ) {
// remove all CSS and JS from front-end
if( ! is_admin() )
{
return array();
}
return $scripts;
}
But there are a number of template files that render-out in-line JS referencing functions in the (missing) JS files. Eg.
generateProField.php, line 17 – I don’t want this multipleSelect() running
generateForm.php, line 223 – I’m not uploading multiple files umFileUploader
Again, I’ve had to hack the plugin. The preferred behaviour would be to fully remove any in-line JS if the corresponding external scripts are not available.
I’m changing this to resolved, as it’s become a feature request.
It would be really good if, all JS, including inline could be removed by a settings or hook. Some WP devs are ‘professional’ and care about performance and the number of HTTP calls, minification etc.
Author
Posts
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.