WordPress.org

Make WordPress Core

Changeset 34289


Ignore:
Timestamp:
09/18/2015 03:57:47 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Network Admin: Include IDs for users and sites on their respective views.

Props danielbachhuber, wonderboymusic.
Fixes #18661.

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

Legend:

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

    r33848 r34289  
    201201        $sites_columns = array(
    202202            'cb'          => '<input type="checkbox" />',
     203            'id'          => __( 'ID' ),
    203204            'blogname'    => __( 'URL' ),
    204205            'lastupdated' => __( 'Last Updated' ),
     
    250251            <input type="checkbox" id="blog_<?php echo $blog['blog_id'] ?>" name="allblogs[]" value="<?php echo esc_attr( $blog['blog_id'] ) ?>" />
    251252        <?php endif;
     253    }
     254
     255    /**
     256     * Handles the ID column output.
     257     *
     258     * @since 4.4.0
     259     * @access public
     260     *
     261     * @param array $blog Current site.
     262     */
     263    public function column_id( $blog ) {
     264        echo $blog['blog_id'];
    252265    }
    253266
  • trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php

    r34133 r34289  
    149149        $users_columns = array(
    150150            'cb'         => '<input type="checkbox" />',
     151            'id'         => __( 'ID' ),
    151152            'username'   => __( 'Username' ),
    152153            'name'       => __( 'Name' ),
     
    198199
    199200    /**
     201     * Handles the ID column output.
     202     *
     203     * @since 4.4.0
     204     * @access public
     205     *
     206     * @param WP_User $user The current WP_User object.
     207     */
     208    public function column_id( $user ) {
     209        echo $user->ID;
     210    }
     211
     212    /**
    200213     * Handles the username column output.
    201214     *
Note: See TracChangeset for help on using the changeset viewer.