| @@ -1,5 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | +/** | |
| 3 | + * @package Polylang | |
| 4 | + */ | |
| 2 | 5 | |
| 3 | 6 | /** |
| 4 | 7 | * A class to manage URL modifications settings |
| 5 | 8 | * |
| @@ -5,10 +8,23 @@ | ||
| 5 | 8 | * |
| 6 | 9 | * @since 1.8 |
| 7 | 10 | */ |
| 8 | 11 | class PLL_Settings_Url extends PLL_Settings_Module { |
| 12 | + /** | |
| 13 | + * Stores the display order priority. | |
| 14 | + * | |
| 15 | + * @var int | |
| 16 | + */ | |
| 17 | + public $priority = 10; | |
| 9 | 18 | |
| 10 | 19 | /** |
| 20 | + * The page id of the static front page. | |
| 21 | + * | |
| 22 | + * @var int | |
| 23 | + */ | |
| 24 | + protected $page_on_front; | |
| 25 | + | |
| 26 | + /** | |
| 11 | 27 | * Constructor |
| 12 | 28 | * |
| 13 | 29 | * @since 1.8 |
| 14 | 30 | * |
| @@ -24,9 +40,8 @@ | ||
| 24 | 40 | 'configure' => true, |
| 25 | 41 | ) |
| 26 | 42 | ); |
| 27 | 43 | |
| 28 | - $this->links_model = &$polylang->links_model; | |
| 29 | 44 | $this->page_on_front = &$polylang->static_pages->page_on_front; |
| 30 | 45 | } |
| 31 | 46 | |
| 32 | 47 | /** |
| @@ -32,11 +47,14 @@ | ||
| 32 | 47 | /** |
| 33 | 48 | * Displays the fieldset to choose how the language is set |
| 34 | 49 | * |
| 35 | 50 | * @since 1.8 |
| 51 | + * | |
| 52 | + * @return void | |
| 36 | 53 | */ |
| 37 | 54 | protected function force_lang() { |
| 38 | 55 | ?> |
| 56 | + <p class="description"><?php esc_html_e( 'Some themes or plugins may not be fully compatible with the language defined by the content or by domains.', 'polylang' ); ?></p> | |
| 39 | 57 | <label> |
| 40 | 58 | <?php |
| 41 | 59 | printf( |
| 42 | 60 | '<input name="force_lang" type="radio" value="0" %s /> %s', |
| @@ -97,8 +115,10 @@ | ||
| 97 | 115 | /** |
| 98 | 116 | * Displays the fieldset to choose to hide the default language information in url |
| 99 | 117 | * |
| 100 | 118 | * @since 1.8 |
| 119 | + * | |
| 120 | + * @return void | |
| 101 | 121 | */ |
| 102 | 122 | protected function hide_default() { |
| 103 | 123 | ?> |
| 104 | 124 | <label> |
| @@ -116,8 +136,10 @@ | ||
| 116 | 136 | /** |
| 117 | 137 | * Displays the fieldset to choose to hide /language/ in url |
| 118 | 138 | * |
| 119 | 139 | * @since 1.8 |
| 140 | + * | |
| 141 | + * @return void | |
| 120 | 142 | */ |
| 121 | 143 | protected function rewrite() { |
| 122 | 144 | ?> |
| 123 | 145 | <label> |
| @@ -148,8 +170,10 @@ | ||
| 148 | 170 | /** |
| 149 | 171 | * Displays the fieldset to choose to redirect the home page to language page |
| 150 | 172 | * |
| 151 | 173 | * @since 1.8 |
| 174 | + * | |
| 175 | + * @return void | |
| 152 | 176 | */ |
| 153 | 177 | protected function redirect_lang() { |
| 154 | 178 | ?> |
| 155 | 179 | <label> |
| @@ -156,9 +180,9 @@ | ||
| 156 | 180 | <?php |
| 157 | 181 | printf( |
| 158 | 182 | '<input name="redirect_lang" type="checkbox" value="1" %s/> %s', |
| 159 | 183 | checked( $this->options['redirect_lang'], 1, false ), |
| 160 | - esc_html__( 'The front page url contains the language code instead of the page name or page id', 'polylang' ) | |
| 184 | + esc_html__( 'The front page URL contains the language code instead of the page name or page id', 'polylang' ) | |
| 161 | 185 | ); |
| 162 | 186 | ?> |
| 163 | 187 | </label> |
| 164 | 188 | <p class="description"> |
| @@ -180,8 +204,10 @@ | ||
| 180 | 204 | /** |
| 181 | 205 | * Displays the settings |
| 182 | 206 | * |
| 183 | 207 | * @since 1.8 |
| 208 | + * | |
| 209 | + * @return void | |
| 184 | 210 | */ |
| 185 | 211 | public function form() { |
| 186 | 212 | ?> |
| 187 | 213 | <div class="pll-settings-url-col"> |
| @@ -220,8 +246,9 @@ | ||
| 220 | 246 | * |
| 221 | 247 | * @since 1.8 |
| 222 | 248 | * |
| 223 | 249 | * @param array $options |
| 250 | + * @return array | |
| 224 | 251 | */ |
| 225 | 252 | protected function update( $options ) { |
| 226 | 253 | $newoptions = array(); |
| 227 | 254 | |
| @@ -275,8 +302,9 @@ | ||
| 275 | 302 | * |
| 276 | 303 | * @since 1.8 |
| 277 | 304 | * |
| 278 | 305 | * @param array $options new set of options to test |
| 306 | + * @return void | |
| 279 | 307 | */ |
| 280 | 308 | protected function check_domains( $options ) { |
| 281 | 309 | $options = array_merge( $this->options, $options ); |
| 282 | 310 | $model = new PLL_Model( $options ); |