[wp-trac] [WordPress Trac] #37699: Death to Globals Episode #1: A Registry, A Pattern

WordPress Trac noreply at wordpress.org
Thu Aug 25 23:38:30 UTC 2016


#37699: Death to Globals Episode #1: A Registry, A Pattern
----------------------------+------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  4.7
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------

Comment (by jorbin):

 Replying to [comment:32 wonderboymusic]:
 > In [changeset:"38355"]:
 > {{{
 > #!CommitTicketReference repository="" revision="38355"
 > Site Icon: There is no good reason for `class-wp-site-icon.php` to drop
 a global instance of itself whenever the file is loaded. The lone use of
 the `global` instance of `WP_Site_Icon` is in an AJAX action that provides
 virtually no way to override - the file is loaded immediately before the
 `global` is used.
 >
 > Let us remove the `$wp_site_icon` global. I will fall on the sword if
 this comes back to bite us (waiting with bated breath).
 >
 > See #37699.
 > }}}

 I asked @ipstenu to search the plugin repo and she couldn't find anything
 using `$wp_site_icon`.  It would still be a good idea to do a `dev-notes`
 post announcing this and any other potentially breaking changes from
 global removal.

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


More information about the wp-trac mailing list