Make WordPress Core

Changeset 57765


Ignore:
Timestamp:
03/04/2024 09:48:29 PM (2 years ago)
Author:
joedolson
Message:

Toolbar: Polish design and code combining duplicate profile links.

Fixes some design changes and improves quality of comments and code styles following previous changes. Follow-up to [57708].

Props sabernhardt, huzaifaalmesbah, joedolson.
Fixes #43633. See #34668.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

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

    r57747 r57765  
    140140                        '</span>',
    141141                'href'  => $about_url,
    142                 'meta' => array(
     142                'meta'  => array(
    143143                        'menu_title' => __( 'About WordPress' ),
    144144                ),
     
    287287                        'meta'   => array(
    288288                                'class'      => $class,
     289                                /* translators: %s: Current user's display name. */
    289290                                'menu_title' => sprintf( __( 'Howdy, %s' ), $current_user->display_name ),
     291                                'tabindex'   => ( false !== $profile_url ) ? '' : 0,
    290292                        ),
    291293                )
     
    330332        }
    331333
    332         $user_info .= "<span class='edit-profile'>" . __( 'Edit Profile' ) . '</span>';
     334        if ( false !== $profile_url ) {
     335                $user_info .= "<span class='display-name edit-profile'>" . __( 'Edit Profile' ) . '</span>';
     336        }
    333337
    334338        $wp_admin_bar->add_node(
     
    390394                        'title' => $title,
    391395                        'href'  => ( is_admin() || ! current_user_can( 'read' ) ) ? home_url( '/' ) : admin_url(),
    392                         'meta' => array(
     396                        'meta'  => array(
    393397                                'menu_title' => $title,
    394398                        ),
     
    991995                        'title' => $title,
    992996                        'href'  => admin_url( current( array_keys( $actions ) ) ),
    993                         'meta' => array(
     997                        'meta'  => array(
    994998                                'menu_title' => _x( 'New', 'admin bar menu group label' ),
    995999                        ),
  • trunk/src/wp-includes/class-wp-admin-bar.php

    r57708 r57765  
    507507         *
    508508         * @param object $node
    509          * @param string|bool $menu_title The accessible name of this aria menu or false if not provided.
     509         * @param string|bool $menu_title The accessible name of this ARIA menu or false if not provided.
    510510         */
    511511        final protected function _render_group( $node, $menu_title = false ) {
  • trunk/src/wp-includes/css/admin-bar.css

    r57708 r57765  
    188188#wpadminbar .shortlink-input {
    189189        line-height: 2;
    190         height: 26px;
     190        height: 1.625rem;
    191191        white-space: nowrap;
    192192        min-width: 140px;
     
    448448}
    449449
    450 #wpadminbar #wp-admin-bar-user-info a {
    451         display: grid;
    452         row-gap: 12px;
    453 }
    454 
    455450#wp-admin-bar-user-info .avatar {
    456451        position: absolute;
     
    469464        background: none;
    470465        padding: 0;
    471         height: 18px;
     466        height: 1.125rem;
    472467}
    473468
Note: See TracChangeset for help on using the changeset viewer.