What is core plugin's purpose?

Hello. Can anyone explain to me the purpose of core plugins?

There is certain code stuff which has to be included in the plugins instead of the theme itself. So called “core” plugins are usually used for that.

More info:

1 Like

Yes i understand. But it says “like, follow features must be in core plugin”. So where i put css and script files? In core plugin? Or in theme?

There is nothing mentioned about CSS or JS having to be in a plugin. I mean in some situation it of course can make sense, but general theme’s CSS and JS definitely should NOT be in a plugin.

For example, i want to make Like button shortcode. I write php codes in code plugin, but i pust css and js codes in theme. I think it is weird. Because button won’t work without javascript codes, if user change theme.

That’s right. But it is up to you if you want to make your plugins fully functional even without your theme. That is not the main point of those requirements. The main point is to allow your users to still have access to your CPTs, shortcodes, widgets etc. when they switch themes, so they won’t just disappear and they can copy the data they put into those elements for other use.
Making sure they are fully functional from CSS and JS point of view even without your theme is going an extra mile. You can do that, but you don’t have to.

My philosophy is that I am selling a theme, not plugins. I am also reusing most of my custom plugins across my themes so adding styling doesn’t make sense since it is different in every theme. I could make some basic general styling just to make those elements usable even without my themes, and I may do it in the future, but I do not think it is that important. When someone switches the theme they most likely want to use the styling of the new theme too, so it doesn’t really make much sense to go this extra mile IMHO.

2 Likes

Thank you so much :slight_smile: I enlightened