| 1 |
<?php |
| 2 |
|
| 3 |
/* |
| 4 |
Plugin Name: Responsive Menu |
| 5 |
Plugin URI: https://responsive.menu |
| 6 |
Description: Highly Customisable Responsive Menu Plugin for WordPress |
| 7 |
Version: 3.0.10 |
| 8 |
Author: Responsive Menu |
| 9 |
Text Domain: responsive-menu |
| 10 |
Author URI: https://responsive.menu |
| 11 |
License: GPL2 |
| 12 |
Tags: responsive, menu, responsive menu |
| 13 |
*/ |
| 14 |
|
| 15 |
/* Check correct PHP version first */ |
| 16 |
add_action('admin_init', 'check_responsive_menu_php_version'); |
| 17 |
function check_responsive_menu_php_version() { |
| 18 |
if(version_compare(PHP_VERSION, '5.4', '<')): |
| 19 |
add_action('admin_notices', 'responsive_menu_deactivation_text'); |
| 20 |
deactivate_plugins(plugin_basename(__FILE__)); |
| 21 |
endif; |
| 22 |
} |
| 23 |
|
| 24 |
function responsive_menu_deactivation_text() { |
| 25 |
echo '<div class="error"><p>' . sprintf(__('Responsive Menu requires PHP 5.4 or higher to function and has therefore been automatically disabled. You are still on %s.%sPlease speak to your webhost about upgrading your PHP version. For more information please visit %s', 'responsive-menu'), PHP_VERSION, '<br /><br />', '<a target="_blank" href="https://responsive.menu/why-php-5-4/">this page</a>.') . '</p></div>'; |
| 26 |
} |
| 27 |
|
| 28 |
if(version_compare(PHP_VERSION, '5.4', '<')) |
| 29 |
return; |
| 30 |
|
| 31 |
/* Required includes for plugin to function */ |
| 32 |
include dirname(__FILE__) . '/autoload.php'; |
| 33 |
include dirname(__FILE__) . '/src/config/services.php'; |
| 34 |
|
| 35 |
/* |
| 36 |
* Initial Migration and Version Check synchronisation */ |
| 37 |
add_action('init', function() use($container) { |
| 38 |
$migration = $container['migration']; |
| 39 |
$migration->setup(); |
| 40 |
$migration->synchronise(); |
| 41 |
}); |
| 42 |
|
| 43 |
include dirname(__FILE__) . '/src/config/routing.php'; |
| 44 |
include dirname(__FILE__) . '/src/config/internationalise.php'; |
| 45 |
|