- Timestamp:
- 01/19/2023 09:46:58 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-autosaves-controller.php
r54130 r55102 515 515 } 516 516 517 public function additional_field_get_callback( $object ) {518 return get_post_meta( $object['id'], 'my_custom_int', true );519 } 520 521 public function additional_field_update_callback( $value, $post ) {522 update_post_meta( $post->ID, 'my_custom_int', $value );517 public function additional_field_get_callback( $object, $field_name ) { 518 return get_post_meta( $object['id'], $field_name, true ); 519 } 520 521 public function additional_field_update_callback( $value, $post, $field_name ) { 522 update_post_meta( $post->ID, $field_name, $value ); 523 523 } 524 524
Note: See TracChangeset
for help on using the changeset viewer.