Changeset 58211
- Timestamp:
- 05/27/2024 03:22:05 PM (6 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-post-type.php
r58201 r58211 935 935 936 936 if ( ! post_type_supports( $this->name, 'autosave' ) ) { 937 return null;938 }939 940 if ( 'attachment' === $this->name ) {941 937 return null; 942 938 } -
trunk/tests/phpunit/tests/post/types.php
r58201 r58211 599 599 */ 600 600 public function test_post_type_supports_autosave_based_on_editor_support() { 601 $this->assertFalse( post_type_supports( 'attachment', 'autosave' ) ); 602 601 603 register_post_type( 'foo', array( 'supports' => array( 'editor' ) ) ); 602 604 $this->assertTrue( post_type_supports( 'foo', 'autosave' ) ); -
trunk/tests/phpunit/tests/post/wpPostType.php
r58201 r58211 370 370 /** 371 371 * @ticket 56922 372 * @ticket 41172 372 373 * 373 374 * @covers WP_Post_Type::get_autosave_rest_controller … … 412 413 'disable show_in_rest' => array( 413 414 false, 414 'attachment', 415 false, 416 null, 417 ), 418 'invalid post type' => array( 419 true, 420 'attachment', 415 'test_post_type', 421 416 false, 422 417 null,
Note: See TracChangeset
for help on using the changeset viewer.