[wp-trac] [WordPress Trac] #62562: Ensure get_current_screen() returns WP_Screen|null

WordPress Trac noreply at wordpress.org
Mon Nov 25 06:20:43 UTC 2024


#62562: Ensure get_current_screen() returns WP_Screen|null
----------------------------+-----------------------------
 Reporter:  marian1         |      Owner:  (none)
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:
 Severity:  trivial         |   Keywords:  needs-patch
  Focuses:                  |
----------------------------+-----------------------------
 Currently, `get_current_screen()` simply checks whether the global
 variable `$current_screen` is set before returning it. Since global
 variables may be overridden, it should confirm that `$current_screen` is
 actually a `WP_Screen` object to ensure that `get_current_screen()`
 reliably returns a valid `WP_Screen` object.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62562>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list