[wp-trac] [WordPress Trac] #33967: MS Sites: content of the users column should be by choice, number is not too informative

WordPress Trac noreply at wordpress.org
Tue Oct 4 08:18:04 UTC 2016


#33967: MS Sites: content of the users column should be by choice, number is not
too informative
-------------------------------------------------+-------------------------
 Reporter:  katazina                             |       Owner:
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
Component:  Networks and Sites                   |  Release
 Severity:  normal                               |     Version:  4.3
 Keywords:  ui-feedback dev-feedback has-patch   |  Resolution:
  2nd-opinion                                    |     Focuses:  multisite
-------------------------------------------------+-------------------------

Comment (by Mista-Flo):

 @PieWP Thank you for your enhancement :)

 The call of get_users can't be cached or put in a transient ? It's nice to
 have selected only required fields.

 I see in your patch that you don't handle case of list mode, the else
 statement only return the number count, we have at least to display the
 first user of the site.

 By the way, I prefere to remove complexity by stop execution of the
 function if there are no users in the site :

 {{{#!php
 <?php
 if ( empty ( $user_count ) ) {
     printf( __( 'There are no users in this site' ) );
     return;
 }

 // Do the rest
 }}}

 instead of a else if and else statement.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33967#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list