Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#34730 closed defect (bug) (fixed)

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

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

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 11 years ago.
Rename register_api_field() to register_rest_field()
34730.2.diff (2.1 KB ) - added by danielbachhuber 11 years ago.
Remove register_api_field()

Download all attachments as: .zip

Change History (6)

@danielbachhuber
11 years ago

Rename register_api_field() to register_rest_field()

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


11 years ago

#2 @danielbachhuber
11 years ago

  • Keywords has-patch commit added; needs-patch removed
  • Owner set to johnbillion
  • Status newassigned

@danielbachhuber
11 years ago

Remove register_api_field()

#3 @danielbachhuber
11 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
11 years ago

  • Resolutionfixed
  • Status assignedclosed

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.