Changeset 51959 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php
- Timestamp:
- 10/31/2021 05:17:53 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php
r51786 r51959 196 196 if ( in_array( 'hierarchical', $fields, true ) ) { 197 197 $data['hierarchical'] = $post_type->hierarchical; 198 } 199 200 if ( in_array( 'visibility', $fields, true ) ) { 201 $data['visibility'] = array( 202 'show_in_nav_menus' => (bool) $post_type->show_in_nav_menus, 203 'show_ui' => (bool) $post_type->show_ui, 204 ); 198 205 } 199 206 … … 338 345 'readonly' => true, 339 346 ), 347 'visibility' => array( 348 'description' => __( 'The visibility settings for the post type.' ), 349 'type' => 'object', 350 'context' => array( 'edit' ), 351 'readonly' => true, 352 'properties' => array( 353 'show_ui' => array( 354 'description' => __( 'Whether to generate a default UI for managing this post type.' ), 355 'type' => 'boolean', 356 ), 357 'show_in_nav_menus' => array( 358 'description' => __( 'Whether to make the post type is available for selection in navigation menus.' ), 359 'type' => 'boolean', 360 ), 361 ), 362 ), 340 363 ), 341 364 );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)