lib/endpoints/class-wp-rest-terms-controller.php 1 location
|
@@ 735-741 (lines=7) @@
|
732 |
|
), |
733 |
|
); |
734 |
|
$taxonomy = get_taxonomy( $this->taxonomy ); |
735 |
|
if ( $taxonomy->hierarchical ) { |
736 |
|
$schema['properties']['parent'] = array( |
737 |
|
'description' => __( 'The id for the parent of the resource.' ), |
738 |
|
'type' => 'integer', |
739 |
|
'context' => array( 'view', 'edit' ), |
740 |
|
); |
741 |
|
} |
742 |
|
return $this->add_additional_fields_schema( $schema ); |
743 |
|
} |
744 |
|
|
lib/endpoints/class-wp-rest-posts-controller.php 1 location
|
@@ 1470-1476 (lines=7) @@
|
1467 |
|
); |
1468 |
|
|
1469 |
|
$post_type_obj = get_post_type_object( $this->post_type ); |
1470 |
|
if ( $post_type_obj->hierarchical ) { |
1471 |
|
$schema['properties']['parent'] = array( |
1472 |
|
'description' => __( 'The id for the parent of the object.' ), |
1473 |
|
'type' => 'integer', |
1474 |
|
'context' => array( 'view', 'edit' ), |
1475 |
|
); |
1476 |
|
} |
1477 |
|
|
1478 |
|
$post_type_attributes = array( |
1479 |
|
'title', |