Changeset 51962 for trunk/src/wp-includes/class-wp-post-type.php
- Timestamp:
- 10/31/2021 11:15:10 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-post-type.php
r49790 r51962 358 358 */ 359 359 public $rest_base; 360 361 /** 362 * The namespace for this post type's REST API endpoints. 363 * 364 * @since 5.9 365 * @var string|bool $rest_namespace 366 */ 367 public $rest_namespace; 360 368 361 369 /** … … 453 461 'show_in_rest' => false, 454 462 'rest_base' => false, 463 'rest_namespace' => false, 455 464 'rest_controller_class' => false, 456 465 'template' => array(), … … 472 481 if ( null === $args['show_ui'] ) { 473 482 $args['show_ui'] = $args['public']; 483 } 484 485 // If not set, default rest_namespace to wp/v2 if show_in_rest is true. 486 if ( false === $args['rest_namespace'] && ! empty( $args['show_in_rest'] ) ) { 487 $args['rest_namespace'] = 'wp/v2'; 474 488 } 475 489
Note: See TracChangeset
for help on using the changeset viewer.