[wp-trac] [WordPress Trac] #59349: Remove the Unused global variables in the wp-includes folder.

WordPress Trac noreply at wordpress.org
Thu Sep 14 13:36:41 UTC 2023


#59349: Remove the Unused global variables in the wp-includes folder.
--------------------------+-------------------------------
 Reporter:  upadalavipul  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:  coding-standards
--------------------------+-------------------------------
Changes (by TobiasBg):

 * keywords:   => close


Comment:

 Thanks for opening this ticket! However, I believe that these globals are
 included on purpose, as the function docblock says:

 {{{
 The globals are set up for the template file to ensure that the WordPress
 environment is available from within the function. The query variables are
 also available.
 }}}

 So, the globals are then available to the `require(_once)`d files.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59349#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list