[wp-trac] [WordPress Trac] #21871: Reduce reliance on global variables in list tables
WordPress Trac
wp-trac at lists.automattic.com
Fri Sep 21 16:35:58 UTC 2012
#21871: Reduce reliance on global variables in list tables
----------------------------+-----------------------
Reporter: ryan | Owner: ryan
Type: enhancement | Status: reopened
Priority: normal | Milestone: 3.5
Component: Administration | Version: 3.4
Severity: normal | Resolution:
Keywords: needs-patch |
----------------------------+-----------------------
Comment (by nacin):
As hyphens are allowed in taxonomy and post type names, this could be more
trouble than it is worth.
What about allowing a query string to be passed with as the hookname, from
which we can then glean post type or taxonomy?
{{{
#!php
<?php
$hookname = 'edit-post_tag?post_type=foo';
$query_string = null;
if ( false !== strpos( $hookname, '?' ) )
list( $hookname, $query_string ) = explode( '?', $hookname, 2 );
parse_str( $query_string, $query_args );
var_dump( $hookname, $query_args );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21871#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list