Changeset 48308
- Timestamp:
- 07/05/2020 01:04:30 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php
r48189 r48308 237 237 } 238 238 239 if ( is_array( $support ) ) { 240 if ( ! $args['variadic'] ) { 241 $support = $support[0]; 242 } 243 244 // Multi-type theme-support schema definitions always list boolean first. 245 if ( is_array( $schema['type'] ) && 'boolean' === $schema['type'][0] ) { 246 // Pass the non-boolean type through to the sanitizer, which cannot itself 247 // determine the intended type if the value is invalid (for example if an 248 // object includes non-safelisted properties). See #50300. 249 $schema['type'] = $schema['type'][1]; 250 } 239 if ( is_array( $support ) && ! $args['variadic'] ) { 240 $support = $support[0]; 251 241 } 252 242
Note: See TracChangeset
for help on using the changeset viewer.