PluginProbe
Polylang / 2.3
Polylang v2.3
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | polylang.php +17 -18 2.72.3 View file →
@@ -2,10 +2,10 @@
2 2
3 3 /**
4 4 Plugin Name: Polylang
5 5 Plugin URI: https://polylang.pro
6 -Version: 2.7
7 -Author: WP SYNTEX
6 +Version: 2.3
7 +Author: Frédéric Demarle
8 8 Author uri: https://polylang.pro
9 9 Description: Adds multilingual capability to WordPress
10 10 Text Domain: polylang
11 11 Domain Path: /languages
@@ -11,15 +11,14 @@
11 11 Domain Path: /languages
12 12 */
13 13
14 14 /*
15 - * Copyright 2011-2019 Frédéric Demarle
16 - * Copyright 2019-2020 WP SYNTEX
15 + * Copyright 2011-2018 Frédéric Demarle
17 16 *
18 - * This program is free software: you can redistribute it and/or modify
17 + * This program is free software; you can redistribute it and/or modify
19 18 * it under the terms of the GNU General Public License as published by
20 - * the Free Software Foundation, either version 3 of the License, or
21 - * (at your option) any later version.
19 + * the Free Software Foundation; either version 2 of the License, or
20 + * ( at your option ) any later version.
22 21 *
23 22 * This program is distributed in the hope that it will be useful,
24 23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -25,9 +24,12 @@
25 24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 25 * GNU General Public License for more details.
27 26 *
28 27 * You should have received a copy of the GNU General Public License
29 - * along with this program. If not, see <https://www.gnu.org/licenses/>.
28 + * along with this program; if not, write to the Free Software
29 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
30 + * MA 02110-1301, USA.
31 + *
30 32 */
31 33
32 34 if ( ! defined( 'ABSPATH' ) ) {
33 35 exit; // don't access directly
@@ -41,9 +43,9 @@
41 43 if ( is_plugin_active( plugin_basename( __FILE__ ) ) ) {
42 44 require_once ABSPATH . 'wp-includes/pluggable.php';
43 45 deactivate_plugins( plugin_basename( __FILE__ ) ); // Deactivate this plugin
44 46 // WP does not allow us to send a custom meaningful message, so just tell the plugin has been deactivated
45 - wp_safe_redirect( add_query_arg( 'deactivate', 'true', remove_query_arg( 'activate' ) ) );
47 + wp_redirect( add_query_arg( 'deactivate', 'true', remove_query_arg( 'activate' ) ) );
46 48 exit;
47 49 }
48 50 } else {
49 51 // Polylang was activated, deactivate it to keep only what we expect to be Polylang Pro
@@ -50,16 +52,14 @@
50 52 deactivate_plugins( POLYLANG_BASENAME );
51 53 }
52 54 } else {
53 55 // Go on loading the plugin
54 - define( 'POLYLANG_VERSION', '2.7' );
55 - define( 'PLL_MIN_WP_VERSION', '4.9' );
56 - define( 'PLL_MIN_PHP_VERSION', '5.6' );
56 + define( 'POLYLANG_VERSION', '2.3' );
57 + define( 'PLL_MIN_WP_VERSION', '4.4' );
57 58
58 59 define( 'POLYLANG_FILE', __FILE__ ); // this file
59 60 define( 'POLYLANG_BASENAME', plugin_basename( POLYLANG_FILE ) ); // plugin name as known by WP
60 61 define( 'POLYLANG_DIR', dirname( POLYLANG_FILE ) ); // our directory
61 - define( 'POLYLANG', ucwords( str_replace( '-', ' ', dirname( POLYLANG_BASENAME ) ) ) );
62 62
63 63 define( 'PLL_ADMIN_INC', POLYLANG_DIR . '/admin' );
64 64 define( 'PLL_FRONT_INC', POLYLANG_DIR . '/frontend' );
65 65 define( 'PLL_INC', POLYLANG_DIR . '/include' );
@@ -65,13 +65,12 @@
65 65 define( 'PLL_INC', POLYLANG_DIR . '/include' );
66 66 define( 'PLL_INSTALL_INC', POLYLANG_DIR . '/install' );
67 67 define( 'PLL_MODULES_INC', POLYLANG_DIR . '/modules' );
68 68 define( 'PLL_SETTINGS_INC', POLYLANG_DIR . '/settings' );
69 - define( 'PLL_PREFIX', 'pll_' );
70 69
71 - if ( file_exists( PLL_MODULES_INC . '/pro.php' ) ) {
70 + require_once PLL_INC . '/class-polylang.php';
71 +
72 + if ( file_exists( PLL_INC . '/class-polylang-pro.php' ) ) {
72 73 define( 'POLYLANG_PRO', true );
74 + require_once PLL_INC . '/class-polylang-pro.php';
73 75 }
74 -
75 - require_once PLL_INC . '/class-polylang.php';
76 - new Polylang();
77 76 }