Hi guys, I’m working on a theme specific plugin. So far everything is good, but I would like to implement an extra function..
I would like the function inside the plugin to detect weather the theme is enabled. So basically, if the specific theme is not enabled the function would output a message in the header of the admin panel saying something like “you must first enable THIS THEME before this plugin could work” and if the theme is enabled, to output the rest of my plugins functions..
I’ve been looking all over Google for a solution on this, but cant seem to find any info on this. Can anyone help me on this?..
Right now the main .php file only has this in it.. this is where I would like to add this function. Any help on this would be greatly appreciated.
//must keep for plugin detection to work include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // options page in settings include( plugin_dir_path( __FILE__ ) . 'options.php'); // additional options for specific theme and plugin include( plugin_dir_path( __FILE__ ) . 'include/jobroller.php'); include( plugin_dir_path( __FILE__ ) . 'include/fxtender.php');
- The topic ‘Check if theme is installed function, please help.’ is closed to new replies.