diff --git a/php-notifier.php b/php-notifier.php index 84b05d0..ca87197 100644 --- a/php-notifier.php +++ b/php-notifier.php @@ -72,6 +72,39 @@ public function init() { register_deactivation_hook( __FILE__, array( $this, 'plugin_deactivation' ) ); + add_action( 'admin_notices', array( $this, 'dashboard_notifications' ) ); + + } + + /** + * Based on the current version, create a dashboard notification + * + * @return mixed + */ + public function dashboard_notifications() { + + // create new dashboard notification based on the warning_type by the current version of PHP + if ( self::$options['warning_type'] == 'deprecated' ) { + ?> +
You are running PHP which has been deprecated. Please upgrade to a newer version of PHP.
You are running PHP which is not supported. Upgrade to a newer version of PHP immediately.
You are running PHP which is supported. You are running a current version of PHP.