lib/endpoints/class-wp-rest-posts-controller.php 1 location
|
@@ 1446-1452 (lines=7) @@
|
1443 |
|
); |
1444 |
|
|
1445 |
|
$post_type_obj = get_post_type_object( $this->post_type ); |
1446 |
|
if ( $post_type_obj->hierarchical ) { |
1447 |
|
$schema['properties']['parent'] = array( |
1448 |
|
'description' => __( 'The id for the parent of the object.' ), |
1449 |
|
'type' => 'integer', |
1450 |
|
'context' => array( 'view', 'edit' ), |
1451 |
|
); |
1452 |
|
} |
1453 |
|
|
1454 |
|
$post_type_attributes = array( |
1455 |
|
'title', |
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 |
|
|