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

Props danielbachhuber, wonderboymusic.
Fixes #18661.

git-svn-id: https://develop.svn.wordpress.org/trunk@34289 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2015-09-18 15:57:47 +00:00
parent a176e78b64
commit 7851406626
2 changed files with 26 additions and 0 deletions

View File

@ -200,6 +200,7 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
public function get_columns() {
$sites_columns = array(
'cb' => '<input type="checkbox" />',
'id' => __( 'ID' ),
'blogname' => __( 'URL' ),
'lastupdated' => __( 'Last Updated' ),
'registered' => _x( 'Registered', 'site' ),
@ -251,6 +252,18 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
<?php endif;
}
/**
* Handles the ID column output.
*
* @since 4.4.0
* @access public
*
* @param array $blog Current site.
*/
public function column_id( $blog ) {
echo $blog['blog_id'];
}
/**
* Handles the blogname column output.
*

View File

@ -148,6 +148,7 @@ class WP_MS_Users_List_Table extends WP_List_Table {
public function get_columns() {
$users_columns = array(
'cb' => '<input type="checkbox" />',
'id' => __( 'ID' ),
'username' => __( 'Username' ),
'name' => __( 'Name' ),
'email' => __( 'Email' ),
@ -196,6 +197,18 @@ class WP_MS_Users_List_Table extends WP_List_Table {
<?php
}
/**
* Handles the ID column output.
*
* @since 4.4.0
* @access public
*
* @param WP_User $user The current WP_User object.
*/
public function column_id( $user ) {
echo $user->ID;
}
/**
* Handles the username column output.
*