I’ve updated the wp-utils package to make checking for a plugin required plugins and supplying the administrator with useful options a more linear process.
To make an example I would write, dealing with Route Pages plugin, code like
$routePages = new tad_Plugin('Route Pages', 'route-pages', 'route-pages/route-pages.php'); $routePages->requires('WP Router', 'wp-router', 'https://wordpress.org/plugins/wp-router/', 'WP-Router/wp-router.php'); $routePages->checkRequirements();
and that would print a
wp_die message like this [caption id=“attachment_1103” align=“aligncenter” width=“1024”] Die with style[/caption] that would allow the plugin administrator to install or activate WP Router plugin if it’s not already.