Personally, I don’t think classes should be cleared on deactivation. Upon removal, yes, or at least as an option, but if I deactivate any plugin I still want posts that have used it in the past to display as they used to.
Douglas.
@landwire Thanks a lot for the suggestion. Unfortunately, the classes were retain after deactivation to avoid block error. Thanks again!
Ok, thanks! People could end up with a lot of classes in their content if they try a lot of plugins out though. But I understand that block validation is more important.
You’re right in the number of classes, and even worse, the number of different CSS and JS files to be loaded. Often for every web page regardless of whether they are made use of.
If you don’t have a test WordPress site, I recommend trying out different plugins/blocks on private test pages only. Then only start using them on ‘real’ posts once you are convinced that they are
- Good for the purpose you want;
- Don’t clog up and slow down your site too much;
- Are better than any competition;
- Are really necessary (between Editors Kit and WP Design Hub most of them are redundant);
- Are likely to be supported into the foreseeable future, as WordPress keeps updating.
I’ve learnt the hard way that to delve excitedly into all the goodies available is a route to disaster. Now I am much more careful about what I add in to the site!
Douglas.