Changeset 59885
- Timestamp:
- 02/27/2025 11:08:10 PM (13 hours ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r59784 r59885 69 69 ) 70 70 ); 71 72 // Enhance page editor for block themes by rendering template and content blocks. 73 if ( wp_is_block_theme() && current_theme_supports( 'block-templates' ) ) { 74 add_post_type_support( 'page', 'editor', array( 'default-mode' => 'template-locked' ) ); 75 } 71 76 72 77 register_post_type( -
trunk/tests/phpunit/tests/option/networkOption.php
r58811 r59885 382 382 */ 383 383 public function test_get_network_option_does_not_use_single_site_notoptions_cache_for_networks() { 384 $network_notoptions_cache_before = wp_cache_get( '1:notoptions', 'site-options' ); 385 $single_site_notoptions_cache_before = wp_cache_get( 'notoptions', 'options' ); 386 384 387 get_network_option( 1, 'ticket_61730_notoption' ); 385 388 386 $network_notoptions_cache = wp_cache_get( '1:notoptions', 'site-options' ); 387 $single_site_notoptions_cache = wp_cache_get( 'notoptions', 'options' ); 388 389 $this->assertEmpty( $single_site_notoptions_cache, 'Single site notoptions cache should not be set for multisite installs.' ); 390 $this->assertIsArray( $network_notoptions_cache, 'Multisite notoptions cache should be set.' ); 391 $this->assertArrayHasKey( 'ticket_61730_notoption', $network_notoptions_cache, 'The option should be in the notoptions cache.' ); 389 $network_notoptions_cache_after = wp_cache_get( '1:notoptions', 'site-options' ); 390 $single_site_notoptions_cache_after = wp_cache_get( 'notoptions', 'options' ); 391 392 $this->assertSame( $single_site_notoptions_cache_before, $single_site_notoptions_cache_after, 'Single site notoptions cache should not change for multisite installs.' ); 393 $this->assertNotSame( $network_notoptions_cache_before, $network_notoptions_cache_after, 'Multisite notoptions cache should change.' ); 394 $this->assertIsArray( $network_notoptions_cache_after, 'Multisite notoptions cache should be set.' ); 395 $this->assertArrayHasKey( 'ticket_61730_notoption', $network_notoptions_cache_after, 'The option should be in the notoptions cache.' ); 392 396 } 393 397 … … 403 407 */ 404 408 public function test_delete_network_option_does_not_use_single_site_notoptions_cache_for_networks() { 409 $network_notoptions_cache_before = wp_cache_get( '1:notoptions', 'site-options' ); 410 $single_site_notoptions_cache_before = wp_cache_get( 'notoptions', 'options' ); 411 405 412 add_network_option( 1, 'ticket_61730_notoption', 'value' ); 406 413 delete_network_option( 1, 'ticket_61730_notoption' ); 407 414 408 $network_notoptions_cache = wp_cache_get( '1:notoptions', 'site-options' ); 409 $single_site_notoptions_cache = wp_cache_get( 'notoptions', 'options' ); 410 411 $this->assertEmpty( $single_site_notoptions_cache, 'Single site notoptions cache should not be set for multisite installs.' ); 412 $this->assertIsArray( $network_notoptions_cache, 'Multisite notoptions cache should be set.' ); 413 $this->assertArrayHasKey( 'ticket_61730_notoption', $network_notoptions_cache, 'The option should be in the notoptions cache.' ); 415 $network_notoptions_cache_after = wp_cache_get( '1:notoptions', 'site-options' ); 416 $single_site_notoptions_cache_after = wp_cache_get( 'notoptions', 'options' ); 417 418 $this->assertSame( $single_site_notoptions_cache_before, $single_site_notoptions_cache_after, 'Single site notoptions cache should not change for multisite installs.' ); 419 $this->assertNotSame( $network_notoptions_cache_before, $network_notoptions_cache_after, 'Multisite notoptions cache should change.' ); 420 $this->assertIsArray( $network_notoptions_cache_after, 'Multisite notoptions cache should be set.' ); 421 $this->assertArrayHasKey( 'ticket_61730_notoption', $network_notoptions_cache_after, 'The option should be in the notoptions cache.' ); 414 422 } 415 423 }
Note: See TracChangeset
for help on using the changeset viewer.