|
@@ 4310-4314 (lines=5) @@
|
| 4307 |
|
if ( ! in_array( $value, array( 'repeat-x', 'repeat-y', 'repeat', 'no-repeat' ) ) ) { |
| 4308 |
|
return new WP_Error( 'invalid_value', __( 'Invalid value for background repeat.' ) ); |
| 4309 |
|
} |
| 4310 |
|
} elseif ( 'background_attachment' === $setting->id ) { |
| 4311 |
|
if ( ! in_array( $value, array( 'fixed', 'scroll' ) ) ) { |
| 4312 |
|
return new WP_Error( 'invalid_value', __( 'Invalid value for background attachment.' ) ); |
| 4313 |
|
} |
| 4314 |
|
} elseif ( 'background_position_x' === $setting->id ) { |
| 4315 |
|
if ( ! in_array( $value, array( 'left', 'center', 'right' ), true ) ) { |
| 4316 |
|
return new WP_Error( 'invalid_value', __( 'Invalid value for background position X.' ) ); |
| 4317 |
|
} |
|
@@ 4318-4322 (lines=5) @@
|
| 4315 |
|
if ( ! in_array( $value, array( 'left', 'center', 'right' ), true ) ) { |
| 4316 |
|
return new WP_Error( 'invalid_value', __( 'Invalid value for background position X.' ) ); |
| 4317 |
|
} |
| 4318 |
|
} elseif ( 'background_position_y' === $setting->id ) { |
| 4319 |
|
if ( ! in_array( $value, array( 'top', 'center', 'bottom' ), true ) ) { |
| 4320 |
|
return new WP_Error( 'invalid_value', __( 'Invalid value for background position Y.' ) ); |
| 4321 |
|
} |
| 4322 |
|
} elseif ( 'background_size' === $setting->id ) { |
| 4323 |
|
if ( ! in_array( $value, array( 'auto', 'contain', 'cover' ), true ) ) { |
| 4324 |
|
return new WP_Error( 'invalid_value', __( 'Invalid value for background size.' ) ); |
| 4325 |
|
} |
|
@@ 4327-4329 (lines=3) @@
|
| 4324 |
|
return new WP_Error( 'invalid_value', __( 'Invalid value for background size.' ) ); |
| 4325 |
|
} |
| 4326 |
|
} elseif ( 'background_preset' === $setting->id ) { |
| 4327 |
|
if ( ! in_array( $value, array( 'default', 'fill', 'fit', 'repeat', 'custom' ), true ) ) { |
| 4328 |
|
return new WP_Error( 'invalid_value', __( 'Invalid value for background size.' ) ); |
| 4329 |
|
} |
| 4330 |
|
} elseif ( 'background_image' === $setting->id || 'background_image_thumb' === $setting->id ) { |
| 4331 |
|
$value = empty( $value ) ? '' : esc_url_raw( $value ); |
| 4332 |
|
} else { |