Make WordPress Core


Ignore:
Timestamp:
12/01/2011 03:03:12 AM (15 years ago)
Author:
koopersmith
Message:

In toolbar, move search item to the right of the account menu and make it icon-only. fixes #19370, #19406.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r19517 r19518  
    596596 */
    597597function wp_admin_bar_search_menu( $wp_admin_bar ) {
     598        if ( is_admin() )
     599                return;
     600
    598601        $form  = '<form action="' . esc_url( home_url( '/' ) ) . '" method="get" id="adminbarsearch">';
    599         $form .= '<input class="adminbar-input" name="s" id="adminbar-search" tabindex="10" ';
    600         $form .= 'type="text" value="" maxlength="150" placeholder="' . esc_attr__( 'Search' ) . '" />';
     602        $form .= '<input class="adminbar-input" name="s" id="adminbar-search" tabindex="10" type="text" value="" maxlength="150" />';
    601603        $form .= '<input type="submit" class="adminbar-button" value="' . __('Search') . '"/>';
    602604        $form .= '</form>';
    603605
    604606        $wp_admin_bar->add_menu( array(
    605                 'id'    => 'search',
    606                 'title' => $form,
    607                 'meta'  => array(
     607                'parent' => 'top-secondary',
     608                'id'     => 'search',
     609                'title'  => $form,
     610                'meta'   => array(
    608611                        'class'    => 'admin-bar-search',
    609612                        'tabindex' => -1,
Note: See TracChangeset for help on using the changeset viewer.