Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#34730 closed defect (bug) (fixed)

Rename `register_api_field()` to `register_rest_field()`

Reported by: danielbachhuber's profile danielbachhuber Owned by: johnbillion's profile johnbillion
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: REST API Keywords: has-patch commit
Focuses: Cc:

Description

Originally: https://github.com/WP-API/WP-API/issues/1321

We'll include a compatibility shim in the plugin for backwards compat.

Discussion: https://wordpress.slack.com/archives/core/p1447874677000928

Attachments (2)

34730.1.diff (683 bytes) - added by danielbachhuber 9 years ago.
Rename register_api_field() to register_rest_field()
34730.2.diff (2.1 KB) - added by danielbachhuber 9 years ago.
Remove register_api_field()

Download all attachments as: .zip

Change History (6)

@danielbachhuber
9 years ago

Rename register_api_field() to register_rest_field()

This ticket was mentioned in Slack in #core by danielbachhuber. View the logs.


9 years ago

#2 @danielbachhuber
9 years ago

  • Keywords has-patch commit added; needs-patch removed
  • Owner set to johnbillion
  • Status changed from new to assigned

@danielbachhuber
9 years ago

Remove register_api_field()

#3 @danielbachhuber
9 years ago

34730.2.diff removes register_api_field() from core, as it's conceptually bound to WP_REST_Controller, which doesn't yet exist in core.

#4 @johnbillion
9 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 35687:

Remove register_api_field() from core. This is the only core function that utilises the $wp_rest_additional_fields global, and doesn't belong as part of the infrastructure.

See https://github.com/WP-API/WP-API/pull/1748

Fixes #34730

Note: See TracTickets for help on using tickets.