Ticket #50759: 50759.patch
| File 50759.patch, 931 bytes (added by , 6 years ago) |
|---|
-
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
2424 2424 // Emit a _doing_it_wrong warning if user tries to add new properties using this filter. 2425 2425 $new_fields = array_diff( array_keys( $schema['properties'] ), $schema_fields ); 2426 2426 if ( count( $new_fields ) > 0 ) { 2427 _doing_it_wrong( __METHOD__, __( 'Please use register_rest_field to add new schema properties.' ), '5.4.0' ); 2427 _doing_it_wrong( 2428 __METHOD__, 2429 sprintf( 2430 /* translators: %s: register_rest_field */ 2431 __( 'Please use %s to add new schema properties.' ), 2432 '<code>register_rest_field<code>' 2433 ), 2434 '5.4.0' 2435 ); 2428 2436 } 2429 2437 2430 2438 $this->schema = $schema;