Changeset 61484
- Timestamp:
- 01/14/2026 11:57:24 PM (less than one hour ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
src/wp-admin/includes/screen.php (modified) (1 diff)
-
tests/phpunit/tests/admin/includesScreen.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/screen.php
r58419 r61484 225 225 global $current_screen; 226 226 227 if ( ! isset( $current_screen )) {227 if ( ! $current_screen instanceof WP_Screen ) { 228 228 return null; 229 229 } -
trunk/tests/phpunit/tests/admin/includesScreen.php
r54090 r61484 452 452 } 453 453 454 /** 455 * @ticket 62562 456 */ 457 public function test_get_current_screen_type() { 458 global $current_screen; 459 460 set_current_screen( 'edit.php' ); 461 $this->assertInstanceOf( 'WP_Screen', get_current_screen() ); 462 463 $current_screen = new stdClass(); 464 $this->assertNull( get_current_screen() ); 465 } 466 454 467 public function test_in_admin() { 455 468 set_current_screen( 'edit.php' );
Note: See TracChangeset
for help on using the changeset viewer.