| @@ -47,9 +47,9 @@ | ||
| 47 | 47 | foreach ( self::list_metas_to_sync() as $key => $str ) { |
| 48 | 48 | printf( |
| 49 | 49 | '<li><label><input name="sync[%s]" type="checkbox" value="1" %s /> %s</label></li>', |
| 50 | 50 | esc_attr( $key ), |
| 51 | - checked( in_array( $key, $this->options['sync'] ), true, false ), | |
| 51 | + in_array( $key, $this->options['sync'] ) ? 'checked="checked"' : '', | |
| 52 | 52 | esc_html( $str ) |
| 53 | 53 | ); |
| 54 | 54 | } |
| 55 | 55 | ?> |
| @@ -64,9 +64,9 @@ | ||
| 64 | 64 | * |
| 65 | 65 | * @param array $options |
| 66 | 66 | */ |
| 67 | 67 | protected function update( $options ) { |
| 68 | - $newoptions = array( 'sync' => empty( $options['sync'] ) ? array() : array_keys( $options['sync'], 1 ) ); | |
| 68 | + $newoptions['sync'] = empty( $options['sync'] ) ? array() : array_keys( $options['sync'], 1 ); | |
| 69 | 69 | return $newoptions; // take care to return only validated options |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |