Make WordPress Core

Ticket #34730: 34730.1.diff

File 34730.1.diff, 683 bytes (added by danielbachhuber, 9 years ago)

Rename register_api_field() to register_rest_field()

  • src/wp-includes/rest-api/rest-functions.php

    diff --git src/wp-includes/rest-api/rest-functions.php src/wp-includes/rest-api/rest-functions.php
    index 817368c..df6b879 100644
    function register_rest_route( $namespace, $route, $args = array(), $override = f 
    8787 *                                              this field. Default is 'null', no schema entry will be returned.
    8888 * }
    8989 */
    90 function register_api_field( $object_type, $attribute, $args = array() ) {
     90function register_rest_field( $object_type, $attribute, $args = array() ) {
    9191        $defaults = array(
    9292                'get_callback'    => null,
    9393                'update_callback' => null,