| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -/** | |
| 3 | - * @package Polylang | |
| 4 | - */ | |
| 5 | 2 | |
| 6 | 3 | /** |
| 7 | 4 | * Polylang activation / de-activation class |
| 8 | 5 | * |
| @@ -13,10 +10,8 @@ | ||
| 13 | 10 | /** |
| 14 | 11 | * Checks min PHP and WP version, displays a notice if a requirement is not met. |
| 15 | 12 | * |
| 16 | 13 | * @since 2.6.7 |
| 17 | - * | |
| 18 | - * @return bool | |
| 19 | 14 | */ |
| 20 | 15 | public function can_activate() { |
| 21 | 16 | global $wp_version; |
| 22 | 17 | |
| @@ -36,13 +31,11 @@ | ||
| 36 | 31 | /** |
| 37 | 32 | * Displays a notice if PHP min version is not met. |
| 38 | 33 | * |
| 39 | 34 | * @since 2.6.7 |
| 40 | - * | |
| 41 | - * @return void | |
| 42 | 35 | */ |
| 43 | 36 | public function php_version_notice() { |
| 44 | - load_plugin_textdomain( 'polylang' ); // Plugin i18n. | |
| 37 | + load_plugin_textdomain( 'polylang', false, basename( POLYLANG_DIR ) . '/languages' ); // Plugin i18n. | |
| 45 | 38 | |
| 46 | 39 | printf( |
| 47 | 40 | '<div class="error"><p>%s</p></div>', |
| 48 | 41 | sprintf( |
| @@ -58,15 +51,13 @@ | ||
| 58 | 51 | /** |
| 59 | 52 | * Displays a notice if WP min version is not met. |
| 60 | 53 | * |
| 61 | 54 | * @since 2.6.7 |
| 62 | - * | |
| 63 | - * @return void | |
| 64 | 55 | */ |
| 65 | 56 | public function wp_version_notice() { |
| 66 | 57 | global $wp_version; |
| 67 | 58 | |
| 68 | - load_plugin_textdomain( 'polylang' ); // Plugin i18n. | |
| 59 | + load_plugin_textdomain( 'polylang', false, basename( POLYLANG_DIR ) . '/languages' ); // Plugin i18n. | |
| 69 | 60 | |
| 70 | 61 | printf( |
| 71 | 62 | '<div class="error"><p>%s</p></div>', |
| 72 | 63 | sprintf( |
| @@ -83,9 +74,9 @@ | ||
| 83 | 74 | * Get default Polylang options |
| 84 | 75 | * |
| 85 | 76 | * @since 1.8 |
| 86 | 77 | * |
| 87 | - * @return array | |
| 78 | + * return array | |
| 88 | 79 | */ |
| 89 | 80 | public static function get_default_options() { |
| 90 | 81 | return array( |
| 91 | 82 | 'browser' => 1, // Default language for the front page is set by browser preference |
| @@ -107,10 +98,8 @@ | ||
| 107 | 98 | /** |
| 108 | 99 | * Plugin activation |
| 109 | 100 | * |
| 110 | 101 | * @since 0.5 |
| 111 | - * | |
| 112 | - * @return void | |
| 113 | 102 | */ |
| 114 | 103 | protected function _activate() { |
| 115 | 104 | if ( $options = get_option( 'polylang' ) ) { |
| 116 | 105 | // Check if we will be able to upgrade |
| @@ -138,10 +127,8 @@ | ||
| 138 | 127 | /** |
| 139 | 128 | * Plugin deactivation |
| 140 | 129 | * |
| 141 | 130 | * @since 0.5 |
| 142 | - * | |
| 143 | - * @return void | |
| 144 | 131 | */ |
| 145 | 132 | protected function _deactivate() { |
| 146 | 133 | delete_option( 'rewrite_rules' ); // Don't use flush_rewrite_rules at network activation. See #32471 |
| 147 | 134 | } |