Changeset 58201 for trunk/src/wp-includes/class-wp-post-type.php
- Timestamp:
- 05/27/2024 09:04:10 AM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-post-type.php
r57628 r58201 671 671 } 672 672 unset( $this->supports ); 673 674 /* 675 * 'editor' support implies 'autosave' support for backward compatibility. 676 * 'autosave' support needs to be explicitly removed if not desired. 677 */ 678 if ( 679 post_type_supports( $this->name, 'editor' ) && 680 ! post_type_supports( $this->name, 'autosave' ) 681 ) { 682 add_post_type_support( $this->name, 'autosave' ); 683 } 673 684 } elseif ( false !== $this->supports ) { 674 685 // Add default features. 675 add_post_type_support( $this->name, array( 'title', 'editor' ) );686 add_post_type_support( $this->name, array( 'title', 'editor', 'autosave' ) ); 676 687 } 677 688 } … … 920 931 public function get_autosave_rest_controller() { 921 932 if ( ! $this->show_in_rest ) { 933 return null; 934 } 935 936 if ( ! post_type_supports( $this->name, 'autosave' ) ) { 922 937 return null; 923 938 }
Note: See TracChangeset
for help on using the changeset viewer.