v1.2.6
This commit is contained in:
parent
0c4fda16c0
commit
6385b02633
1 changed files with 79 additions and 22 deletions
|
|
@ -4,9 +4,9 @@
|
|||
* Plugin URI: https://www.robotstxt.software/plugins/robotstxt-hello/
|
||||
* Update URI: https://www.robotstxt.software/plugins/robotstxt-hello/
|
||||
* Description: Adds a Hello admin page for demonstration purposes.
|
||||
* Version: 1.2.5
|
||||
* Version: 1.2.6
|
||||
* Requires at least: 4.0
|
||||
* Requires PHP: 5.6
|
||||
* Requires PHP: 7.0
|
||||
* Network: true
|
||||
* Security: robotstxt@robotstxt.es
|
||||
* Author: ROBOTSTXT
|
||||
|
|
@ -23,7 +23,30 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
exit;
|
||||
}
|
||||
|
||||
define( 'ROBOTSTXT_HELLO_VERSION', '1.2.5' );
|
||||
if ( version_compare( PHP_VERSION, '7.0', '<' ) ) {
|
||||
add_action( 'admin_notices', 'robotstxt_hello_render_php_version_notice' );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the admin notice shown when the PHP version is too old.
|
||||
*
|
||||
* Defined in the main file because the plugin class itself uses PHP 7.0+
|
||||
* syntax and must not be loaded on older versions.
|
||||
*
|
||||
* @since 1.2.6
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function robotstxt_hello_render_php_version_notice() {
|
||||
printf(
|
||||
'<div class="notice notice-error"><p>%s</p></div>',
|
||||
esc_html__( 'Hello (by ROBOTSTXT) requires PHP 7.0 or newer. The plugin stays inactive until PHP is updated.', 'robotstxt-hello' )
|
||||
);
|
||||
}
|
||||
|
||||
define( 'ROBOTSTXT_HELLO_VERSION', '1.2.6' );
|
||||
define( 'ROBOTSTXT_HELLO_FILE', __FILE__ );
|
||||
|
||||
require_once __DIR__ . '/includes/class-robotstxt-hello-plugin.php';
|
||||
|
|
|
|||
Loading…
Reference in a new issue