Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

Commit

Permalink
Adjusted spacing in register_api_field docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelbaker committed Jul 28, 2015
1 parent 0bc8cf7 commit 31f3f07
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,30 @@ function register_rest_route( $namespace, $route, $args = array(), $override = f
/**
* Register a new field on an existing WordPress object type
*
* @global array $wp_rest_additional_fields Holds registered fields, organized by object type.
* @param string|array $object_type "post"|"term"|"comment" etc
* @param string $attribute The attribute name
* @global array $wp_rest_additional_fields Holds registered fields, organized
* by object type.
*
* @param string|array $object_type Object(s) the field is being registered
* to, "post"|"term"|"comment" etc.
* @param string $attribute The attribute name.
* @param array $args {
* Optional. An array of arguments used to handle the field being registered
* Optional. An array of arguments used to handle the registered field.
*
* @type string|array|null $get_callback Optional. The callback function used to retrieve value of this field. If null, the default, no value will be returned in response.
* @type string|array|null update_callback Optional. The callback function used to update the value of this field. If null, the default, the value will not be update-able via the route this field is added to.
* @type string|array|null schema Optional. The callback function used to create the schema for this field. If null, the default, no schema will be returned for this field.
* @type string|array|null $get_callback Optional. The callback function
* used to retrieve the field
* value. Default is 'null', the
* field will not be returned in
* the response.
* @type string|array|null $update_callback Optional. The callback function
* used to set and update the
* field value. Default is 'null',
* the value cannot be set or
* updated.
* @type string|array|null schema Optional. The callback function
* used to create the schema for
* this field. Default is 'null',
* no schema entry will be
* returned.
* }
* @return bool|wp_error
*/
Expand Down

0 comments on commit 31f3f07

Please sign in to comment.