*/ // phpcs:disable SlevomatCodingStandard.Namespaces /** * 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, '7.0.0') < 0) { $meow_errors['version'] = __('PHP 7.0.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'); } // --------------------------------------------------------------------- end compatibility // --------------------------------------------------------------------- // Functions // --------------------------------------------------------------------- /** * Admin Notice * * @return bool True/false. */ function meow_admin_notice() { global $meow_errors; // We only want to display this on the dashboard and plugins pages, // and only if there are errors. $screen = get_current_screen(); if ( ! is_array($meow_errors) || ! count($meow_errors) || (('dashboard' !== $screen->id) && ('plugins' !== $screen->id)) ) { return false; } ?>
Apocalypse Meow' ); ?>
— ' . esc_html($error) . ''; } // Can we recommend the old version? if (isset($meow_errors['disabled'])) { unset($meow_errors['disabled']); } ?>