PluginProbe
Servebolt Optimizer / trunk
Servebolt Optimizer vtrunk
trunk 1.2 1.2.1 1.2.2 1.2.3 1.3.1 1.3.2 1.3.3 1.3.4 1.4 1.4.1 1.4.2 1.4.3 1.5 1.5.0 1.5.1 1.6 1.6.1 1.6.2 1.6.3 1.6.4 2.0 2.0.1 2.0.2 2.0.3 All 106 releases
servebolt-optimizer / php-outdated.php

php-outdated.php in Servebolt Optimizer trunk, at php-outdated.php

29 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) exit; // Exit if accessed directly
4
5 require_once SERVEBOLT_PLUGIN_PSR4_PATH . 'Helpers/Helpers.php';
6 use function Servebolt\Optimizer\Helpers\isHostedAtServebolt;
7
8 /**
9 * Display notice about PHP being too outdated.
10 */
11 add_action('admin_notices', function() {
12 if (isHostedAtServebolt()) {
13 // Warning for Servebolt users, and help to upgrade the PHP version
14 ?>
15 <div class="notice notice-error is-dismissable">
16 <p><?php printf(__('This site is running on a lower PHP version than required by the Servebolt Optimizer plugin. Please upgrade your site to run PHP %s or higher. We highly recommend upgrading to the highest available PHP version.', 'servebolt-wp'), SERVEBOLT_PLUGIN_MINIMUM_PHP_VERSION); ?></p>
17 <p><?php printf(__('%sGet in touch with our support%s if you need assistance upgrading your site to a newer PHP version.', 'servebolt-wp'), '<a href="https://admin.servebolt.com/" target="_blank">', '</a>'); ?></p>
18 </div>
19 <?php
20 } else {
21 // Warning for non-Servebolt users
22 ?>
23 <div class="notice notice-error is-dismissable">
24 <p><?php printf(__('Servebolt Optimizer cannot run on PHP-versions older than PHP %s. You currently run PHP version %s. Please upgrade your PHP version to be able to run Servebolt Optimizer.', 'servebolt-wp'), SERVEBOLT_PLUGIN_MINIMUM_PHP_VERSION, phpversion()); ?></p>
25 </div>
26 <?php
27 }
28 });
29