| @@ -1,27 +1,18 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | Plugin Name: Responsive Menu |
| 5 | -Plugin URI: https://expresstech.io | |
| 5 | +Plugin URI: https://responsive.menu | |
| 6 | 6 | Description: Highly Customisable Responsive Menu Plugin for WordPress |
| 7 | -Version: 4.1.5 | |
| 8 | -Author: ExpressTech | |
| 7 | +Version: 3.1.21 | |
| 8 | +Author: Peter Featherstone | |
| 9 | 9 | Text Domain: responsive-menu |
| 10 | -Author URI: https://responsive.menu | |
| 10 | +Author URI: https://peterfeatherstone.com | |
| 11 | 11 | License: GPL2 |
| 12 | -Tags: responsive, menu, responsive menu, mega menu, max mega menu, max menu | |
| 12 | +Tags: responsive, menu, responsive menu | |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -/** | |
| 16 | - * Constant as plugin version. | |
| 17 | - */ | |
| 18 | -if ( ! defined( 'RMP_PLUGIN_VERSION' ) ) { | |
| 19 | - define( 'RMP_PLUGIN_VERSION', '4.1.5' ); | |
| 20 | -} | |
| 21 | - | |
| 22 | -define('RESPONSIVE_MENU_URL', plugin_dir_url( __FILE__ ) ); | |
| 23 | - | |
| 24 | 15 | add_action('admin_init', 'check_responsive_menu_php_version'); |
| 25 | 16 | function check_responsive_menu_php_version() { |
| 26 | 17 | if(version_compare(PHP_VERSION, '5.4', '<')): |
| 27 | 18 | add_action('admin_notices', 'responsive_menu_deactivation_text'); |
| @@ -29,9 +20,9 @@ | ||
| 29 | 20 | endif; |
| 30 | 21 | } |
| 31 | 22 | |
| 32 | 23 | function responsive_menu_deactivation_text() { |
| 33 | - echo '<div class="'.esc_attr( "error" ).'"><p>' . sprintf( | |
| 24 | + echo '<div class="error"><p>' . sprintf( | |
| 34 | 25 | 'Responsive Menu requires PHP 5.4 or higher to function and has therefore been automatically disabled. |
| 35 | 26 | You are still on %s.%sPlease speak to your web host about upgrading your PHP version.', |
| 36 | 27 | PHP_VERSION, |
| 37 | 28 | '<br /><br />' |
| @@ -40,152 +31,11 @@ | ||
| 40 | 31 | |
| 41 | 32 | if(version_compare(PHP_VERSION, '5.4', '<')) |
| 42 | 33 | return; |
| 43 | 34 | |
| 44 | -// If this file called directly then abort. | |
| 45 | -if ( ! defined( 'WPINC' ) ) { | |
| 46 | - die; | |
| 47 | -} | |
| 48 | - | |
| 49 | -/** | |
| 50 | - * Constant as plugin file. | |
| 51 | - */ | |
| 52 | -if ( ! defined( 'RMP_PLUGIN_FILE' ) ) { | |
| 53 | - define('RMP_PLUGIN_FILE', plugin_dir_path( __FILE__ ) . 'responsive-menu.php'); | |
| 54 | -} | |
| 55 | - | |
| 56 | -/** | |
| 57 | - * Constant as dir of plugin. | |
| 58 | - */ | |
| 59 | -if ( ! defined( 'RMP_PLUGIN_DIR_NAME' ) ) { | |
| 60 | - define( 'RMP_PLUGIN_DIR_NAME', untrailingslashit ( dirname( plugin_basename( __FILE__ ) ) ) ); | |
| 61 | -} | |
| 62 | - | |
| 63 | -/** | |
| 64 | - * Constant as plugin path. | |
| 65 | - */ | |
| 66 | -if ( ! defined( 'RMP_PLUGIN_PATH' ) ) { | |
| 67 | - define( 'RMP_PLUGIN_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); | |
| 68 | -} | |
| 69 | - | |
| 70 | -/** | |
| 71 | - * Constant as plugin URL. | |
| 72 | - */ | |
| 73 | -if ( ! defined( 'RMP_PLUGIN_URL' ) ) { | |
| 74 | - define( 'RMP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) ); | |
| 75 | -} | |
| 76 | - | |
| 77 | -/** | |
| 78 | - * Constant as URI of assets build. | |
| 79 | - */ | |
| 80 | -if ( ! defined( 'RMP_PLUGIN_BUILD_URI' ) ) { | |
| 81 | - define( 'RMP_PLUGIN_BUILD_URI', untrailingslashit( plugin_dir_url( __FILE__ ) ) . '/assets/build' ); | |
| 82 | -} | |
| 83 | - | |
| 84 | -/** | |
| 85 | - * Constant as dir of assets build. | |
| 86 | - */ | |
| 87 | -if ( ! defined( 'RMP_PLUGIN_BUILD_DIR' ) ) { | |
| 88 | - define( 'RMP_PLUGIN_BUILD_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/assets/build' ); | |
| 89 | -} | |
| 90 | - | |
| 91 | -/** | |
| 92 | - * Constant as path of template file. | |
| 93 | - */ | |
| 94 | -if ( ! defined( 'RMP_PLUGIN_TEMPLATE_PATH' ) ) { | |
| 95 | - define( 'RMP_PLUGIN_TEMPLATE_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/templates/' ); | |
| 96 | -} | |
| 97 | - | |
| 98 | -if ( ! defined( 'RMP_PLUGIN_PATH_V4' ) ) { | |
| 99 | - define ( 'RMP_PLUGIN_PATH_V4', RMP_PLUGIN_PATH . '/v4.0.0' ); | |
| 100 | -} | |
| 101 | - | |
| 102 | -if ( ! defined( 'RMP_PLUGIN_URL_V4' ) ) { | |
| 103 | - define ( 'RMP_PLUGIN_URL_V4', RMP_PLUGIN_URL . '/v4.0.0' ); | |
| 104 | -} | |
| 105 | - | |
| 106 | -/** Include the required files only*/ | |
| 107 | -require_once RMP_PLUGIN_PATH_V4 . '/inc/helpers/autoloader.php'; | |
| 108 | -require_once RMP_PLUGIN_PATH_V4 . '/inc/helpers/custom-functions.php'; | |
| 109 | -require_once RMP_PLUGIN_PATH_V4 . '/inc/helpers/default-options.php'; | |
| 110 | -require_once RMP_PLUGIN_PATH_V4 . '/libs/scssphp/vendor/autoload.php'; | |
| 111 | -require_once RMP_PLUGIN_PATH_V4 . '/templates/rmp-roadmap.php'; | |
| 112 | - | |
| 113 | -/** | |
| 114 | - * To load plugin manifest class. | |
| 115 | - * | |
| 116 | - * @return void | |
| 117 | - */ | |
| 118 | -function responsive_menu_features_plugin_loader() { | |
| 119 | - \RMP\Features\Inc\Plugin::get_instance(); | |
| 120 | -} | |
| 121 | - | |
| 122 | -responsive_menu_features_plugin_loader(); | |
| 123 | - | |
| 124 | -// Active and de-active plugin hook. | |
| 125 | -register_activation_hook( __FILE__, 'responsive_menu_plugin_activation' ); | |
| 126 | -register_deactivation_hook( __FILE__, 'responsive_menu_plugin_deactivation' ); | |
| 127 | - | |
| 128 | -/** | |
| 129 | - * Activation of plugin. | |
| 130 | - * | |
| 131 | - * @return void | |
| 132 | - */ | |
| 133 | -function responsive_menu_plugin_activation() { | |
| 134 | - | |
| 135 | - $plugin = 'responsive-menu-pro/responsive-menu-pro.php'; | |
| 136 | - | |
| 137 | - // Check if responsive menu (paid version) is activate then deactivate it. | |
| 138 | - if( is_plugin_active( $plugin ) ) { | |
| 139 | - deactivate_plugins( $plugin ); | |
| 140 | - set_transient( 'og-admin-notice-activation-pro', true, 5 ); | |
| 141 | - } | |
| 142 | - | |
| 143 | - flush_rewrite_rules(); | |
| 144 | -} | |
| 145 | - | |
| 146 | -/** | |
| 147 | - * Deactivation of plugin. | |
| 148 | - * | |
| 149 | - * @return void | |
| 150 | - */ | |
| 151 | -function responsive_menu_plugin_deactivation() { | |
| 152 | - flush_rewrite_rules(); | |
| 153 | -} | |
| 154 | - | |
| 155 | -/** | |
| 156 | - * Function to include the menu themes templates. | |
| 157 | - * | |
| 158 | - * @since 4.0.5 | |
| 159 | - * | |
| 160 | - * @return void | |
| 161 | - */ | |
| 162 | -function rm_includes_menu_theme_template() { | |
| 163 | - | |
| 164 | - $theme_manager = \RMP\Features\Inc\Theme_Manager::get_instance(); | |
| 165 | - | |
| 166 | - //Check class theme manager has this method or not. | |
| 167 | - if ( ! method_exists( $theme_manager, 'get_menu_active_themes' ) ) { | |
| 168 | - return; | |
| 169 | - } | |
| 170 | - | |
| 171 | - $active_themes = $theme_manager->get_menu_active_themes(); | |
| 172 | - if ( empty( $active_themes ) ) { | |
| 173 | - return; | |
| 174 | - } | |
| 175 | - | |
| 176 | - //Include the file from each theme which has php template. | |
| 177 | - foreach( $active_themes as $key => $theme_name ) { | |
| 178 | - | |
| 179 | - $theme_index = $theme_manager->get_theme_index_file( $theme_name ); | |
| 180 | - | |
| 181 | - if ( file_exists( $theme_index ) ) { | |
| 182 | - require_once $theme_index; | |
| 183 | - } | |
| 184 | - } | |
| 185 | - | |
| 186 | -} | |
| 187 | - | |
| 188 | -rm_includes_menu_theme_template(); | |
| 189 | - | |
| 190 | - | |
| 191 | -include( 'review-banner-class.php' ); | |
| 35 | +include dirname(__FILE__) . '/vendor/autoload.php'; | |
| 36 | +include dirname(__FILE__) . '/config/default_options.php'; | |
| 37 | +include dirname(__FILE__) . '/config/services.php'; | |
| 38 | +include dirname(__FILE__) . '/config/wp/scripts.php'; | |
| 39 | +include dirname(__FILE__) . '/config/routing.php'; | |
| 40 | +include dirname(__FILE__) . '/migration.php'; | |
| 41 | +include dirname(__FILE__) . '/config/polylang.php'; | |