[wp-trac] [WordPress Trac] #15145: Add a wp_list_users() template tag

WordPress Trac noreply at wordpress.org
Wed May 12 21:30:51 UTC 2021


#15145: Add a wp_list_users() template tag
-------------------------------------+------------------------
 Reporter:  greenshady               |       Owner:  audrasjb
     Type:  enhancement              |      Status:  reviewing
 Priority:  normal                   |   Milestone:  5.8
Component:  Users                    |     Version:  3.1
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:  template
-------------------------------------+------------------------
Changes (by audrasjb):

 * keywords:  has-patch dev-feedback => has-patch needs-refresh
 * owner:  (none) => audrasjb
 * status:  new => reviewing


Comment:

 Hey,
 I'm not super convinced by the `style` parameter. First it doesn't exist
 on related functions like `wp_list_pages`, second I don't think the
 function should output anything else than a list. But it would be nice to
 add a hook to help to filter the output, just like `wp_list_pages` does:

 {{{
     /**
      * Filters the HTML output of the pages to list.
      *
      * @since 5.8.0
      *
      * @see wp_list_users()
      *
      * @param string    $output      HTML output of the users list.
      * @param array     $parsed_args An array of user-listing arguments.
 See wp_list_users()
      *                               for information on accepted
 arguments.
      * @param WP_User[] $users       Array of the user objects.
      */
     $html = apply_filters( 'wp_list_users', $output, $parsed_args, $users
 );
 }}}

 Also, the PR needs an `@since` mention :)

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


More information about the wp-trac mailing list