Commit 2ee8856b authored by Kenny Hall's avatar Kenny Hall

First pass on Whip Notice

parent b90cf8dd
......@@ -9,7 +9,26 @@ class NF_Whip
public function whip_message()
{
$message = array();
$message = '';
$message[] = '<strong>' . __( 'Hey, we\'ve noticed that you\'re running an outdated version of PHP.', 'ninja-forms' ) . "</strong><br /><br />";
$message[] = __( 'PHP is the programming language that WordPress, Ninja Forms, and themes are built on. The version that is currently used for your site is no longer supported. Newer versions of PHP are both faster and more secure. In fact, your version of PHP no longer receives security updates, which is why we\'re sending you to this notice.', 'ninja-forms' ) . "<br /><br />";
$message[] = '<strong>' . __( 'Your site could be faster and more secure with a newer PHP version.', 'ninja-forms' ) . '</strong><br /><br />';
$message[] = __( 'Hosts have the ability to update your PHP version, but sometimes they don\'t dare to do that because they\'re afraid they\'ll break your site.', 'ninja-forms' ) . '<br /><br />';
$message[] = '<strong>' .__( 'Which version should I update?', 'ninja-forms' ) . '</strong><br /><br />';
$message[] = sprintf( __( 'You should update your PHP version to either 5.6 or to 7.0 or 7.1. On a normal WordPress site, switching to PHP 5.6 should never cause issues. We would however actually recommend you switch to PHP7. There are some plugins that are not ready for PHP7 though, so do some testing first. Yoast have an article on how to test whether that\'s an option for you %1$shere%2$s. PHP7 is much faster than PHP 5.6. It\'s also the only PHP version still in active development and therefore the better option for your site in the long run.', 'ninja-forms' ) . '<br /><br />',
'<a href="https://yoa.st/wg" target="_blank">',
'</a>'
);
$message[] = '<strong>' . __( 'Can\'t update? Ask your host!', 'ninja-forms' ) . '</strong><br /><br />';
$message[] = sprintf( __( 'If you cannot upgrade your PHP version yourself, you can send an email to your host. Yoast has %1$sexamples here%2$s. If they don\'t want to upgrade your PHP version, we would suggest you switch hosts. Have a look at one of the recommended %3$sWordPress hosting partners%2$s.','ninja-forms' ) . '<br />',
'<a href="https://yoa.st/wh" target="_blank">',
'</a>',
sprintf( '<a href="%1$s" target="_blank">', esc_url( 'https://wordpress.org/hosting/' ) )
);
$message = implode( $message, "\n" );
echo '<div class="notice notice-error">' . $message . '</div>';
}
}
\ No newline at end of file
......@@ -367,7 +367,7 @@ if( get_option( 'ninja_forms_load_deprecated', FALSE ) && ! ( isset( $_POST[ 'nf
add_action( 'init', array( self::$instance, 'init' ), 5 );
add_action( 'admin_init', array( self::$instance, 'admin_init' ), 5 );
if( PHP_VERSION < 7.0 ) {
if( PHP_VERSION < 5.6 ) {
add_action( 'admin_init', array( self::$instance, 'nf_whip_notice' ) );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment