' . 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, '

', 'this page.') . '

'; } if(version_compare(PHP_VERSION, '5.4', '<')) return; /* Required includes for plugin to function */ include dirname(__FILE__) . '/autoload.php'; include dirname(__FILE__) . '/src/config/route_dependencies.php'; /* Internationalise the plugin */ add_action('plugins_loaded', function() { load_plugin_textdomain('responsive-menu', false, basename(dirname(__FILE__)) . '/translations/'); }); /* Route the plugin */ $wp_router = new ResponsiveMenu\Routing\WpRouting($container); $wp_router->route(); /* * Initial Migration and Version Check synchronisation */ add_action('init', function() use($container) { $migration = $container['migration']; $migration->setup(); $migration->synchronise(); }); if(is_admin()): /* Polylang Integration Section */ add_action('plugins_loaded', function() use($container) { if(function_exists('pll_register_string')): $service = $container['option_service']; $options = $service->all(); $menu_to_use = isset($options['menu_to_use']) ? $options['menu_to_use']->getValue() : ''; $button_title = isset($options['button_title']) ? $options['button_title']->getValue() : ''; $menu_title = isset($options['menu_title']) ? $options['menu_title']->getValue() : ''; $menu_title_link = isset($options['menu_title_link']) ? $options['menu_title_link']->getValue() : ''; pll_register_string('Menu Slug', $menu_to_use, 'Responsive Menu'); pll_register_string('Button Title', $button_title, 'Responsive Menu'); pll_register_string('Menu Title', $menu_title, 'Responsive Menu'); pll_register_string('Menu Title Link', $menu_title_link, 'Responsive Menu'); endif; }); endif;