In toolbar, move search item to the right of the account menu and make it icon-only. fixes #19370, #19406.
git-svn-id: https://develop.svn.wordpress.org/trunk@19518 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0961b15abe
commit
c6003cf37b
|
@ -595,13 +595,16 @@ function wp_admin_bar_updates_menu( $wp_admin_bar ) {
|
|||
* @since 3.3.0
|
||||
*/
|
||||
function wp_admin_bar_search_menu( $wp_admin_bar ) {
|
||||
if ( is_admin() )
|
||||
return;
|
||||
|
||||
$form = '<form action="' . esc_url( home_url( '/' ) ) . '" method="get" id="adminbarsearch">';
|
||||
$form .= '<input class="adminbar-input" name="s" id="adminbar-search" tabindex="10" ';
|
||||
$form .= 'type="text" value="" maxlength="150" placeholder="' . esc_attr__( 'Search' ) . '" />';
|
||||
$form .= '<input class="adminbar-input" name="s" id="adminbar-search" tabindex="10" type="text" value="" maxlength="150" />';
|
||||
$form .= '<input type="submit" class="adminbar-button" value="' . __('Search') . '"/>';
|
||||
$form .= '</form>';
|
||||
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'top-secondary',
|
||||
'id' => 'search',
|
||||
'title' => $form,
|
||||
'meta' => array(
|
||||
|
|
|
@ -352,7 +352,8 @@ class WP_Admin_Bar {
|
|||
|
||||
public function add_menus() {
|
||||
// User related, aligned right.
|
||||
add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 10 );
|
||||
add_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 10 );
|
||||
add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 20 );
|
||||
|
||||
// Site related.
|
||||
add_action( 'admin_bar_menu', 'wp_admin_bar_wp_menu', 10 );
|
||||
|
@ -368,9 +369,6 @@ class WP_Admin_Bar {
|
|||
add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 80 );
|
||||
add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 90 );
|
||||
|
||||
if ( ! is_admin() )
|
||||
add_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 100 );
|
||||
|
||||
add_action( 'admin_bar_menu', 'wp_admin_bar_add_secondary_groups', 200 );
|
||||
|
||||
do_action( 'add_admin_bar_menus' );
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -414,7 +414,7 @@
|
|||
#wpadminbar #adminbarsearch .adminbar-input {
|
||||
font: 13px/24px sans-serif;
|
||||
height: 24px;
|
||||
width: 140px;
|
||||
width: 24px;
|
||||
border: none;
|
||||
padding: 0 3px 0 23px;
|
||||
margin: 0;
|
||||
|
|
|
@ -454,7 +454,7 @@ function wp_default_styles( &$styles ) {
|
|||
$styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.3u1' );
|
||||
$styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
|
||||
$styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
|
||||
$styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20111130a' );
|
||||
$styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20111130b' );
|
||||
$styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array(), '20111107' );
|
||||
$styles->add( 'editor-buttons', "/wp-includes/css/editor-buttons$suffix.css", array(), '20111114' );
|
||||
$styles->add( 'wp-pointer', "/wp-includes/css/wp-pointer$suffix.css", array(), '20111123a' );
|
||||
|
|
Loading…
Reference in New Issue