[wp-trac] [WordPress Trac] #19152: Remove/fix ToDo in wp_admin_bar_search_menu()
WordPress Trac
wp-trac at lists.automattic.com
Fri Nov 4 17:49:11 UTC 2011
#19152: Remove/fix ToDo in wp_admin_bar_search_menu()
----------------------------+-----------------------
Reporter: ocean90 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.3
Component: Administration | Version: 3.3
Severity: normal | Keywords: has-patch
----------------------------+-----------------------
{{{
function wp_admin_bar_search_menu( $wp_admin_bar ) {
$form = '<div id="adminbarsearch-wrap">';
$form .= '<form action="' . home_url() . '" method="get"
id="adminbarsearch">';
$form .= '<input class="adminbar-input" name="s" id="adminbar-
search"';
$form .= 'type="text" value="" maxlength="150" placeholder="' .
esc_attr__( 'Search' ) . '" />';
$form .= '<input type="submit" class="adminbar-button" value="' .
__('Search') . '"/>';
$form .= '</form>';
$form .= '</div>';
$wp_admin_bar->add_menu( array(
'id' => 'search',
'title' => $form,
'href' => '#',
'meta' => array(
'class' => 'admin-bar-search',
// @TODO: Replace me with something far less hacky
'onclick' => 'if ( event.target.value != "Search"
) { return false; }',
),
) );
}
}}}
Seems like the onclick thing isn't needed anymore. Patch will remove it.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19152>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list