| @@ -13,8 +13,10 @@ | ||
| 13 | 13 | /** |
| 14 | 14 | * Checks min PHP and WP version, displays a notice if a requirement is not met. |
| 15 | 15 | * |
| 16 | 16 | * @since 2.6.7 |
| 17 | + * | |
| 18 | + * @return bool | |
| 17 | 19 | */ |
| 18 | 20 | public function can_activate() { |
| 19 | 21 | global $wp_version; |
| 20 | 22 | |
| @@ -34,8 +36,10 @@ | ||
| 34 | 36 | /** |
| 35 | 37 | * Displays a notice if PHP min version is not met. |
| 36 | 38 | * |
| 37 | 39 | * @since 2.6.7 |
| 40 | + * | |
| 41 | + * @return void | |
| 38 | 42 | */ |
| 39 | 43 | public function php_version_notice() { |
| 40 | 44 | load_plugin_textdomain( 'polylang' ); // Plugin i18n. |
| 41 | 45 | |
| @@ -54,8 +58,10 @@ | ||
| 54 | 58 | /** |
| 55 | 59 | * Displays a notice if WP min version is not met. |
| 56 | 60 | * |
| 57 | 61 | * @since 2.6.7 |
| 62 | + * | |
| 63 | + * @return void | |
| 58 | 64 | */ |
| 59 | 65 | public function wp_version_notice() { |
| 60 | 66 | global $wp_version; |
| 61 | 67 | |
| @@ -73,24 +79,24 @@ | ||
| 73 | 79 | ); |
| 74 | 80 | } |
| 75 | 81 | |
| 76 | 82 | /** |
| 77 | - * Get default Polylang options | |
| 83 | + * Get default Polylang options. | |
| 78 | 84 | * |
| 79 | 85 | * @since 1.8 |
| 80 | 86 | * |
| 81 | - * return array | |
| 87 | + * @return array | |
| 82 | 88 | */ |
| 83 | 89 | public static function get_default_options() { |
| 84 | 90 | return array( |
| 85 | - 'browser' => 1, // Default language for the front page is set by browser preference | |
| 86 | - 'rewrite' => 1, // Remove /language/ in permalinks ( was the opposite before 0.7.2 ) | |
| 87 | - 'hide_default' => 1, // Remove URL language information for default language ( was the opposite before 2.1.5 ) | |
| 88 | - 'force_lang' => 1, // Add URL language information ( was 0 before 1.7 ) | |
| 89 | - 'redirect_lang' => 0, // Do not redirect the language page to the homepage | |
| 90 | - 'media_support' => 1, // Support languages and translation for media by default | |
| 91 | - 'uninstall' => 0, // Do not remove data when uninstalling Polylang | |
| 92 | - 'sync' => array(), // Synchronisation is disabled by default ( was the opposite before 1.2 ) | |
| 91 | + 'browser' => 0, // Default language for the front page is not set by browser preference (was the opposite before 3.1). | |
| 92 | + 'rewrite' => 1, // Remove /language/ in permalinks (was the opposite before 0.7.2). | |
| 93 | + 'hide_default' => 1, // Remove URL language information for default language (was the opposite before 2.1.5). | |
| 94 | + 'force_lang' => 1, // Add URL language information (was 0 before 1.7). | |
| 95 | + 'redirect_lang' => 0, // Do not redirect the language page to the homepage. | |
| 96 | + 'media_support' => 0, // Do not support languages and translation for media by default (was the opposite before 3.1). | |
| 97 | + 'uninstall' => 0, // Do not remove data when uninstalling Polylang. | |
| 98 | + 'sync' => array(), // Synchronisation is disabled by default (was the opposite before 1.2). | |
| 93 | 99 | 'post_types' => array(), |
| 94 | 100 | 'taxonomies' => array(), |
| 95 | 101 | 'domains' => array(), |
| 96 | 102 | 'version' => POLYLANG_VERSION, |
| @@ -101,8 +107,10 @@ | ||
| 101 | 107 | /** |
| 102 | 108 | * Plugin activation |
| 103 | 109 | * |
| 104 | 110 | * @since 0.5 |
| 111 | + * | |
| 112 | + * @return void | |
| 105 | 113 | */ |
| 106 | 114 | protected function _activate() { |
| 107 | 115 | if ( $options = get_option( 'polylang' ) ) { |
| 108 | 116 | // Check if we will be able to upgrade |
| @@ -130,8 +138,10 @@ | ||
| 130 | 138 | /** |
| 131 | 139 | * Plugin deactivation |
| 132 | 140 | * |
| 133 | 141 | * @since 0.5 |
| 142 | + * | |
| 143 | + * @return void | |
| 134 | 144 | */ |
| 135 | 145 | protected function _deactivate() { |
| 136 | 146 | delete_option( 'rewrite_rules' ); // Don't use flush_rewrite_rules at network activation. See #32471 |
| 137 | 147 | } |