| @@ -1,16 +1,16 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | Plugin Name: Responsive Menu |
| 5 | -Plugin URI: https://responsive.menu | |
| 5 | +Plugin URI: https://expresstech.io | |
| 6 | 6 | Description: Highly Customisable Responsive Menu Plugin for WordPress |
| 7 | -Version: 3.1.8 | |
| 8 | -Author: Peter Featherstone | |
| 7 | +Version: 3.1.26 | |
| 8 | +Author: ExpressTech | |
| 9 | 9 | Text Domain: responsive-menu |
| 10 | -Author URI: https://peterfeatherstone.com | |
| 10 | +Author URI: https://responsive.menu | |
| 11 | 11 | License: GPL2 |
| 12 | -Tags: responsive, menu, responsive menu | |
| 12 | +Tags: responsive, menu, responsive menu, mega menu, max mega menu, max menu | |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | 15 | add_action('admin_init', 'check_responsive_menu_php_version'); |
| 16 | 16 | function check_responsive_menu_php_version() { |
| @@ -20,13 +20,47 @@ | ||
| 20 | 20 | endif; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | function responsive_menu_deactivation_text() { |
| 24 | - 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', PHP_VERSION, '<br /><br />', '<a target="_blank" href="https://responsive.menu/why-php-5-4/">this page</a>.') . '</p></div>'; | |
| 24 | + echo '<div class="error"><p>' . sprintf( | |
| 25 | + 'Responsive Menu requires PHP 5.4 or higher to function and has therefore been automatically disabled. | |
| 26 | + You are still on %s.%sPlease speak to your web host about upgrading your PHP version.', | |
| 27 | + PHP_VERSION, | |
| 28 | + '<br /><br />' | |
| 29 | + ) . '</p></div>'; | |
| 25 | 30 | } |
| 26 | 31 | |
| 27 | 32 | if(version_compare(PHP_VERSION, '5.4', '<')) |
| 28 | 33 | return; |
| 34 | + | |
| 35 | +add_action( 'admin_notices', 'og_pro_deactivate_pro_version_notice'); | |
| 36 | + | |
| 37 | +function og_pro_deactivate_pro_version_notice() { | |
| 38 | + if(get_transient('og-admin-notice-activation-pro')) { | |
| 39 | + ?> | |
| 40 | + <div class="notice notice-error is-dismissible"> | |
| 41 | + <p>Responsive Menu Pro has been deactivated<p/> | |
| 42 | + | |
| 43 | + </div> | |
| 44 | + <?php | |
| 45 | + delete_transient('og-admin-notice-activation-pro'); | |
| 46 | + } | |
| 47 | +} | |
| 48 | + | |
| 49 | +function og_deactivate_responsive_menu_pro() { | |
| 50 | + | |
| 51 | + $plugin = 'responsive-menu-pro/responsive-menu-pro.php'; | |
| 52 | + | |
| 53 | + if( is_plugin_active($plugin) ){ | |
| 54 | + deactivate_plugins( 'responsive-menu-pro/responsive-menu-pro.php'); | |
| 55 | + set_transient( 'og-admin-notice-activation-pro', true, 5 ); | |
| 56 | + | |
| 57 | + return; | |
| 58 | + } | |
| 59 | +} | |
| 60 | +//to check weather another plugin is acivated or not. | |
| 61 | +register_activation_hook( __FILE__, 'og_deactivate_responsive_menu_pro'); | |
| 62 | + | |
| 29 | 63 | |
| 30 | 64 | include dirname(__FILE__) . '/vendor/autoload.php'; |
| 31 | 65 | include dirname(__FILE__) . '/config/default_options.php'; |
| 32 | 66 | include dirname(__FILE__) . '/config/services.php'; |