According the themeforest new requirement about shortcodes, Should I include all the shortcode styles and third party scripts like flexslider and etc also inside the plugin? Or they can be inside my theme?
You should put them in a plugin and then enqueue styles and scripts in your plugin.
Thanks Iman for the reply.
You are welcome
You just need to make sure the $handle is same, on plugin and theme, it’ll prevent to load double.
wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );
I also have the same question about custom post types which they also need to be inside a plugin.
Should I move my single-custom-post-type.php files also inside the plugin along with all of the styling?
You should put them in a plugin and then enqueue styles and scripts in your plugin.Cheers,
I would suggest to have scripts in plugin, but styles in both theme and plugin.
Different themes may have different styling for shortcodes. I would suggest only some overall styling in the plugin style, and then something more specific into theme style.
You do not have to give js and css.
The meaning for this new rule is so that [shorcode] etc does not show frontend.
In most cases people who use only bootstrap etc should not need to style to much when changing themes.
But anyway to answer your original question.