| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -/** | |
| 3 | - * @package Polylang | |
| 4 | - */ | |
| 5 | 2 | |
| 6 | 3 | /** |
| 7 | 4 | * A class to manage URL modifications settings |
| 8 | 5 | * |
| @@ -8,23 +5,10 @@ | ||
| 8 | 5 | * |
| 9 | 6 | * @since 1.8 |
| 10 | 7 | */ |
| 11 | 8 | class PLL_Settings_Url extends PLL_Settings_Module { |
| 12 | - /** | |
| 13 | - * Stores the display order priority. | |
| 14 | - * | |
| 15 | - * @var int | |
| 16 | - */ | |
| 17 | - public $priority = 10; | |
| 18 | 9 | |
| 19 | 10 | /** |
| 20 | - * The page id of the static front page. | |
| 21 | - * | |
| 22 | - * @var int | |
| 23 | - */ | |
| 24 | - protected $page_on_front; | |
| 25 | - | |
| 26 | - /** | |
| 27 | 11 | * Constructor |
| 28 | 12 | * |
| 29 | 13 | * @since 1.8 |
| 30 | 14 | * |
| @@ -40,8 +24,9 @@ | ||
| 40 | 24 | 'configure' => true, |
| 41 | 25 | ) |
| 42 | 26 | ); |
| 43 | 27 | |
| 28 | + $this->links_model = &$polylang->links_model; | |
| 44 | 29 | $this->page_on_front = &$polylang->static_pages->page_on_front; |
| 45 | 30 | } |
| 46 | 31 | |
| 47 | 32 | /** |
| @@ -47,10 +32,8 @@ | ||
| 47 | 32 | /** |
| 48 | 33 | * Displays the fieldset to choose how the language is set |
| 49 | 34 | * |
| 50 | 35 | * @since 1.8 |
| 51 | - * | |
| 52 | - * @return void | |
| 53 | 36 | */ |
| 54 | 37 | protected function force_lang() { |
| 55 | 38 | ?> |
| 56 | 39 | <label> |
| @@ -114,10 +97,8 @@ | ||
| 114 | 97 | /** |
| 115 | 98 | * Displays the fieldset to choose to hide the default language information in url |
| 116 | 99 | * |
| 117 | 100 | * @since 1.8 |
| 118 | - * | |
| 119 | - * @return void | |
| 120 | 101 | */ |
| 121 | 102 | protected function hide_default() { |
| 122 | 103 | ?> |
| 123 | 104 | <label> |
| @@ -135,10 +116,8 @@ | ||
| 135 | 116 | /** |
| 136 | 117 | * Displays the fieldset to choose to hide /language/ in url |
| 137 | 118 | * |
| 138 | 119 | * @since 1.8 |
| 139 | - * | |
| 140 | - * @return void | |
| 141 | 120 | */ |
| 142 | 121 | protected function rewrite() { |
| 143 | 122 | ?> |
| 144 | 123 | <label> |
| @@ -169,10 +148,8 @@ | ||
| 169 | 148 | /** |
| 170 | 149 | * Displays the fieldset to choose to redirect the home page to language page |
| 171 | 150 | * |
| 172 | 151 | * @since 1.8 |
| 173 | - * | |
| 174 | - * @return void | |
| 175 | 152 | */ |
| 176 | 153 | protected function redirect_lang() { |
| 177 | 154 | ?> |
| 178 | 155 | <label> |
| @@ -203,10 +180,8 @@ | ||
| 203 | 180 | /** |
| 204 | 181 | * Displays the settings |
| 205 | 182 | * |
| 206 | 183 | * @since 1.8 |
| 207 | - * | |
| 208 | - * @return void | |
| 209 | 184 | */ |
| 210 | 185 | public function form() { |
| 211 | 186 | ?> |
| 212 | 187 | <div class="pll-settings-url-col"> |
| @@ -245,13 +220,10 @@ | ||
| 245 | 220 | * |
| 246 | 221 | * @since 1.8 |
| 247 | 222 | * |
| 248 | 223 | * @param array $options |
| 249 | - * @return array | |
| 250 | 224 | */ |
| 251 | 225 | protected function update( $options ) { |
| 252 | - $newoptions = array(); | |
| 253 | - | |
| 254 | 226 | foreach ( array( 'force_lang', 'rewrite' ) as $key ) { |
| 255 | 227 | $newoptions[ $key ] = isset( $options[ $key ] ) ? (int) $options[ $key ] : 0; |
| 256 | 228 | } |
| 257 | 229 | |
| @@ -301,9 +273,8 @@ | ||
| 301 | 273 | * |
| 302 | 274 | * @since 1.8 |
| 303 | 275 | * |
| 304 | 276 | * @param array $options new set of options to test |
| 305 | - * @return void | |
| 306 | 277 | */ |
| 307 | 278 | protected function check_domains( $options ) { |
| 308 | 279 | $options = array_merge( $this->options, $options ); |
| 309 | 280 | $model = new PLL_Model( $options ); |