[wp-trac] [WordPress Trac] #33837: We should avoid Superglobals when possible
WordPress Trac
noreply at wordpress.org
Fri Sep 11 19:53:45 UTC 2015
#33837: We should avoid Superglobals when possible
----------------------------+-------------------
Reporter: wonderboymusic | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.4
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
----------------------------+-------------------
We can probably add some helper functions that complete common tasks
around Superglobal access
Examples of accessing here:
https://codeclimate.com/github/WordPress/WordPress/wp-admin/edit-
comments.php
Something like `wp_verify_action( $action )` could replace the many
instances of things like:
`isset( $_REQUEST['action'] ) && 'upload-attachment' ==
$_REQUEST['action']`
Without having to architect something like `Symfony/HttpFoundation`, we
can make accessing them more rare.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33837>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list