Correct way to pre-install the plugin in a theme?
-
Hi guys, thanks for a really nice plugin!
I’m about to build a theme of my own and would like to include this plugin pre-installed. I don’t want to install the usual way and show it in the plugins list, just do the magic behind the curtain. The way I’ve approached this is to move the plugin files in a different folder and in my functions.php, include_once the main file happy-scss-compiler.php. This brings the settings page where it belongs, but the css and js seem to be lacking. Also I’m not sure if it compiles, without hitting the save settings button. At least it’s slower than when installed in the usual way.
This works for some other plugins, what am I missing here?
My include code is simply:if(!function_exists('run_hm_wp_scss')){ include_once( get_template_directory() . '/lib/plugins/happy-scss-compiler/happy-scss-compiler.php' ); }
- The topic ‘Correct way to pre-install the plugin in a theme?’ is closed to new replies.