March 2011
Beginner to intermediate
300 pages
7h 23m
English
A slightly more complicated test involves seeing whether or not another plugin is installed. This can be useful if you have one plugin that depends on another, or perhaps you just need to test whether or not a site has all of the plugins you expect it to. We took this a step further. The following function lets you specify the required plugins and the required versions of those plugins:
/** * This relies on the output of WP's get_plugins() and * get_option('active_plugins') functions. * * @param array $required_plugins An associative array with * the names of the plugins and the required versions, e.g. * array( 'My Great Plugin' => '0.9', 'Some Other Plugin' => '1.0.1' ) * @return none An error message is registered ...Read now
Unlock full access