[wp-trac] [WordPress Trac] #10471: Phase out the use of the global keyword
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 23 21:51:06 UTC 2009
#10471: Phase out the use of the global keyword
-----------------------------+----------------------------------------------
Reporter: prettyboymp | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version: 2.9
Severity: trivial | Keywords: global back-compat
-----------------------------+----------------------------------------------
Changes (by dd32):
* component: Canonical => General
* owner: markjaquith =>
* version: => 2.9
* milestone: Unassigned => Future Release
* keywords: global => global back-compat
* type: task (blessed) => feature request
Comment:
I dont think this'll be done anytime soon honestly.
You are right about variable conflicts, and its annoying as hell
sometimes, but many themes and plugins also rely upon the global vars
being available at this stage, many of the API functions/filters do not
pass enough information right now for it to be avoided.
In order to this, its going to require a lot of back-compat breaking and a
lot of filter/action re-working (mainly adding args). This can basically
be thrown on the pile of items which would be great in core, we just need
a release where we can break a lot of back-compat with.
IMO some vars should stay, $post and the like for example, but as many
vars which are unexpected should go, along with vars which are actually
objects (rewrite, query, etc)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10471#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list