Since this package manages both the messaging and checks, it makes since (at least to me) to add a method that can be called to hook in the admin_notices using the existing messaging.
Would pair perfectly with #1 .
Based on the example in the main readme:
$handler = new CoenJacobs\Conductor\Handler();
$handler->setup([
[
'type' => 'php',
'version' => '5.6.0',
'i18n' => __( 'This plugin requires <b>PHP %s</b> or higher in order to run.' ),
],
[
'type' => 'plugin',
'name' => 'WooCommerce',
'slug' => 'woocommerce/woocommerce.php',
'version' => '3.1.0',
'i18n' => [
'outdated' => __( 'This plugin requires <b>%s %s</b> or higher to be installed and activated, in order to run.' ),
'not_activated' => __( 'This plugin b>%s %s</b> must activated, in order to run. Click here to <a href="%s">sactivate now</a>.' ),
],
]);
if ( $handler->check() === false ) {
// if you end up here, something failed...
$handler->render_notices(); // calls add_action( 'admin_notices', [ $handler->messages, 'print' ] ); or similar.
}
Since this package manages both the messaging and checks, it makes since (at least to me) to add a method that can be called to hook in the admin_notices using the existing messaging.
Would pair perfectly with #1 .
Based on the example in the main readme: