[wp-trac] [WordPress Trac] #19810: Autocomplete for users and sites in Network admin
WordPress Trac
wp-trac at lists.automattic.com
Thu Feb 16 12:15:18 UTC 2012
#19810: Autocomplete for users and sites in Network admin
------------------------------+------------------
Reporter: markjaquith | Owner:
Type: task (blessed) | Status: new
Priority: high | Milestone: 3.4
Component: Multisite | Version:
Severity: normal | Resolution:
Keywords: has-patch commit |
------------------------------+------------------
Comment (by dd32):
> 19810.16.patch
You'll probably want to throw like_escape() around the
`$_REQUEST['term']`, and also stripslash it.
`'label' => sprintf( __( '%1$s' ), $blogname )` - Does the blogname
really need to be translatable?
I'd also suggest that get_blog_option() (or one of the other option
functions that accepts a $blog_id) should be used instead of the raw
Query, however, I believe that has a large overhead as it uses
`switch_to_blog()`, so that might not be feasible.
`wp_ajax_autocomplete_site()` - I'd suggest doing:
{{{
$sites = ...
if ( empty($sites) )
wp_die(..)
foreach ()...
}}}
to minimise the nesting levels.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19810#comment:43>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list