*/ /** * Do not execute this file directly. */ if (!defined('ABSPATH')) { exit; } // --------------------------------------------------------------------- // Compatibility Checking // --------------------------------------------------------------------- // There will be errors. What are they? $meow_errors = array(); if (version_compare(PHP_VERSION, '5.6.0') < 0) { $meow_errors['version'] = __('PHP 5.6.0 or newer is required.', 'apocalypse-meow'); } if (function_exists('is_multisite') && is_multisite()) { $meow_errors['multisite'] = __('This plugin cannot be used on Multi-Site.', 'apocalypse-meow'); } if (!extension_loaded('bcmath') && !extension_loaded('gmp')) { $meow_errors['bcmath'] = __('This plugin needs either the bcmath or gmp PHP extension.', 'apocalypse-meow'); } // Miscellaneous extensions. foreach (array('date', 'filter', 'json', 'pcre') as $v) { if (!extension_loaded($v)) { $meow_errors[$v] = sprintf( __('This plugin requires the PHP extension %s.', 'apocalypse-meow'), $v ); } } if (!function_exists('hash_algos') || !in_array('sha512', hash_algos(), true)) { $meow_errors['hash'] = __('PHP must support basic hashing algorithms like SHA512.', 'apocalypse-meow'); } // Will downgrading to the legacy version help? $meow_downgrade = ( !MEOW_MUST_USE && (1 === count($meow_errors)) && isset($meow_errors['version']) && version_compare(PHP_VERSION, '5.4.0') >= 0 ); // --------------------------------------------------------------------- end compatibility // --------------------------------------------------------------------- // Functions // --------------------------------------------------------------------- /** * Admin Notice * * @return bool True/false. */ function meow_admin_notice() { global $meow_errors; global $meow_downgrade; if (!is_array($meow_errors) || !count($meow_errors)) { return false; } ?>
Apocalypse Meow' ); ?>
— ' . esc_html($error) . ''; } // Can we recommend the old version? if (isset($meow_errors['disabled'])) { unset($meow_errors['disabled']); } if ($meow_downgrade) { echo '' . sprintf( esc_html__('As a *stopgap*, you can %s the Apocalypse Meow plugin to the legacy *20.x* series. The legacy series *will not* receive updates or development support, so please ultimately plan to remove the plugin or upgrade your server environment.', 'apocalypse-meow'), '' . esc_html__('downgrade', 'apocalypse-meow') . '' ) . '
'; } ?>