| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -/** | |
| 3 | - * @package Polylang | |
| 4 | - */ | |
| 5 | 2 | |
| 6 | 3 | /** |
| 7 | 4 | * Settings class for synchronization settings management |
| 8 | 5 | * |
| @@ -8,14 +5,8 @@ | ||
| 8 | 5 | * |
| 9 | 6 | * @since 1.8 |
| 10 | 7 | */ |
| 11 | 8 | class PLL_Settings_Sync extends PLL_Settings_Module { |
| 12 | - /** | |
| 13 | - * Stores the display order priority. | |
| 14 | - * | |
| 15 | - * @var int | |
| 16 | - */ | |
| 17 | - public $priority = 50; | |
| 18 | 9 | |
| 19 | 10 | /** |
| 20 | 11 | * Constructor |
| 21 | 12 | * |
| @@ -56,9 +47,9 @@ | ||
| 56 | 47 | foreach ( self::list_metas_to_sync() as $key => $str ) { |
| 57 | 48 | printf( |
| 58 | 49 | '<li><label><input name="sync[%s]" type="checkbox" value="1" %s /> %s</label></li>', |
| 59 | 50 | esc_attr( $key ), |
| 60 | - checked( in_array( $key, $this->options['sync'] ), true, false ), | |
| 51 | + in_array( $key, $this->options['sync'] ) ? 'checked="checked"' : '', | |
| 61 | 52 | esc_html( $str ) |
| 62 | 53 | ); |
| 63 | 54 | } |
| 64 | 55 | ?> |
| @@ -73,9 +64,9 @@ | ||
| 73 | 64 | * |
| 74 | 65 | * @param array $options |
| 75 | 66 | */ |
| 76 | 67 | protected function update( $options ) { |
| 77 | - $newoptions = array( 'sync' => empty( $options['sync'] ) ? array() : array_keys( $options['sync'], 1 ) ); | |
| 68 | + $newoptions['sync'] = empty( $options['sync'] ) ? array() : array_keys( $options['sync'], 1 ); | |
| 78 | 69 | return $newoptions; // take care to return only validated options |
| 79 | 70 | } |
| 80 | 71 | |
| 81 | 72 | /** |