. */ if ( ! defined( 'ABSPATH' ) ) { exit; // Don't access directly. }; if ( defined( 'POLYLANG_VERSION' ) ) { // The user is attempting to activate a second plugin instance, typically Polylang and Polylang Pro. require_once ABSPATH . 'wp-admin/includes/plugin.php'; require_once ABSPATH . 'wp-includes/pluggable.php'; if ( is_plugin_active( plugin_basename( __FILE__ ) ) ) { deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate this plugin. // WP does not allow us to send a custom meaningful message, so just tell the plugin has been deactivated. wp_safe_redirect( add_query_arg( 'deactivate', 'true', remove_query_arg( 'activate' ) ) ); exit; } } else { // Go on loading the plugin define( 'POLYLANG_VERSION', '2.8.2' ); define( 'PLL_MIN_WP_VERSION', '4.9' ); define( 'PLL_MIN_PHP_VERSION', '5.6' ); define( 'POLYLANG_FILE', __FILE__ ); define( 'POLYLANG_DIR', __DIR__ ); if ( ! defined( 'POLYLANG_BASENAME' ) ) { define( 'POLYLANG_BASENAME', plugin_basename( __FILE__ ) ); // Plugin name as known by WP. require __DIR__ . '/vendor/autoload.php'; } define( 'POLYLANG', ucwords( str_replace( '-', ' ', dirname( POLYLANG_BASENAME ) ) ) ); require __DIR__ . '/include/class-polylang.php'; new Polylang(); }