[wp-trac] [WordPress Trac] #37699: Death to Globals Episode #1: A Registry, A Pattern
WordPress Trac
noreply at wordpress.org
Fri Oct 7 23:35:27 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 ramiy):
Few more globals that can be replaced with functions:
* `$wp_post_types` global can be replaced with `get_post_types()`.
* `$wp_taxonomies` global can be replaced with `get_taxonomies()`.
* `$wp_post_statuses` global can be replaced with `get_post_statuses()`.
* `$wp_roles` global can be replaced with `wp_roles()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37699#comment:92>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list