equal
deleted
inserted
replaced
220 * @return WP_REST_Response Post status data. |
220 * @return WP_REST_Response Post status data. |
221 */ |
221 */ |
222 public function prepare_item_for_response( $item, $request ) { |
222 public function prepare_item_for_response( $item, $request ) { |
223 // Restores the more descriptive, specific name for use within this method. |
223 // Restores the more descriptive, specific name for use within this method. |
224 $status = $item; |
224 $status = $item; |
|
225 |
225 $fields = $this->get_fields_for_response( $request ); |
226 $fields = $this->get_fields_for_response( $request ); |
226 $data = array(); |
227 $data = array(); |
227 |
228 |
228 if ( in_array( 'name', $fields, true ) ) { |
229 if ( in_array( 'name', $fields, true ) ) { |
229 $data['name'] = $status->label; |
230 $data['name'] = $status->label; |
367 public function get_collection_params() { |
368 public function get_collection_params() { |
368 return array( |
369 return array( |
369 'context' => $this->get_context_param( array( 'default' => 'view' ) ), |
370 'context' => $this->get_context_param( array( 'default' => 'view' ) ), |
370 ); |
371 ); |
371 } |
372 } |
372 |
|
373 } |
373 } |