WordPress.org

Make WordPress Core

Changeset 42257


Ignore:
Timestamp:
11/29/2017 03:27:55 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Users: After [42256], remove unnecessary double quotes around first_name and last_name properties.

See #42713.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php

    r42256 r42257  
    267267        if ( $user->first_name && $user->last_name ) {
    268268            echo "$user->first_name $user->last_name";
    269         } else if ( ! empty( $user->first_name ) ) {
    270             echo "$user->first_name";
    271         } else if ( ! empty( $user->last_name ) ) {
    272             echo "$user->last_name";
     269        } elseif ( $user->first_name ) {
     270            echo $user->first_name;
     271        } elseif ( $user->last_name ) {
     272            echo $user->last_name;
    273273        } else {
    274274            echo '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . _x( 'Unknown', 'name' ) . '</span>';
  • trunk/src/wp-admin/includes/class-wp-users-list-table.php

    r42256 r42257  
    489489                        if ( $user_object->first_name && $user_object->last_name ) {
    490490                            $r .= "$user_object->first_name $user_object->last_name";
    491                         } else if ( ! empty( $user_object->first_name ) ) {
    492                             $r .= "$user_object->first_name";
    493                         } else if ( ! empty( $user_object->last_name) ) {
    494                             $r .= "$user_object->last_name";
     491                        } elseif ( $user_object->first_name ) {
     492                            $r .= $user_object->first_name;
     493                        } elseif ( $user_object->last_name ) {
     494                            $r .= $user_object->last_name;
    495495                        } else {
    496496                            $r .= '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">' . _x( 'Unknown', 'name' ) . '</span>';
Note: See TracChangeset for help on using the changeset viewer.