About Plugin Territory Functionality

Hello there!

I’m developing a social media WordPress theme for the Envato Market for like 3 years. Theme contains a really big plugin that is much more powerful and modern than the buddypress/peepso plugin. Using websocket technology.

I’m at the end to publish it. I already have a product in the codecanyon. So I know the proc. for the plugins. But I have no exprience with the Themes.

I know that main reason seperating theme and plugin for “If client disables his/her theme, he/she still must able to see his/her data atleast in the wp-admin via the plugin.” So custom post types and etc. must be included via the plugin. I understand that.

Our own story system, live PM system and etc. is in the plugin already.

But, as you can imagine; our theme is totally useless without the plugin. Custom Rest API endpoints and everything in the plugin. PM system and Community system(which is using custom categories) etc. all of them in the plugin.

I’m already using class_exists and function_exists functions for checking if plugin is activated. And there are 0 errors without the plugin on front end. For an example: I’m not calling story system part if plugin disabled, I’m calling live PM system if plugin disabled.

My question is: Can I show a warning in the front-end if user disabled this core plugin? Like “You must activete the plugin to use this theme.”

A specific question:

For an example, this button opens the current user’s connections list in a modal (who follows them and who he/she is following) and sends this post to his/her connections via the PM system like instagram. But PM system is in the plugin. What should I do with this function if plugin is disabled? Even user’s connection list rest api endpoint is in the plugin. So this button will be thrown an error when clicked.
How can I handle it if plugin disabled?

Thank you!

No - just add that plugin as required when the theme is installed. So, the admin/owner of the website will see that he must install that plugin from admin/WordPress dashboard area.

When the plugin is not active - don’t show that icon.

1 Like