[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-admin/includes/ -> class-wp-users-list-table.php (summary)

List Table API: WP_Users_List_Table class

File Size: 683 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Users_List_Table:: (14 methods):
  __construct()
  ajax_user_can()
  prepare_items()
  no_items()
  get_views()
  get_bulk_actions()
  extra_tablenav()
  current_action()
  get_columns()
  get_sortable_columns()
  display_rows()
  single_row()
  get_default_primary_column_name()
  get_role_list()


Class: WP_Users_List_Table  - X-Ref

Core class used to implement displaying users in a list table.

__construct( $args = array()   X-Ref
Constructor.

param: array $args An associative array of arguments.

ajax_user_can()   X-Ref
Checks the current user's permissions.

return: bool

prepare_items()   X-Ref
Prepares the users list for display.


no_items()   X-Ref
Outputs 'no users' message.


get_views()   X-Ref
Returns an associative array listing all the views that can be used
with this table.

Provides a list of roles and user count for that role for easy
filtering of the user table.

return: string[] An array of HTML links keyed by their view.

get_bulk_actions()   X-Ref
Retrieves an associative array of bulk actions available on this table.

return: array Array of bulk action labels keyed by their action.

extra_tablenav( $which )   X-Ref
Outputs the controls to allow user roles to be changed in bulk.

param: string $which Whether this is being invoked above ("top")

current_action()   X-Ref
Captures the bulk action required, and return it.

Overridden from the base class implementation to capture
the role change drop-down.

return: string The bulk action required.

get_columns()   X-Ref
Gets a list of columns for the list table.

return: string[] Array of column titles keyed by their column name.

get_sortable_columns()   X-Ref
Gets a list of sortable columns for the list table.

return: array Array of sortable columns.

display_rows()   X-Ref
Generates the list table rows.


single_row( $user_object, $style = '', $role = '', $numposts = 0 )   X-Ref
Generates HTML for a single row on the users.php admin panel.

param: WP_User $user_object The current user object.
param: string  $style       Deprecated. Not used.
param: string  $role        Deprecated. Not used.
param: int     $numposts    Optional. Post count to display for this user. Defaults
return: string Output for a single row.

get_default_primary_column_name()   X-Ref
Gets the name of the default primary column.

return: string Name of the default primary column, in this case, 'username'.

get_role_list( $user_object )   X-Ref
Returns an array of translated user role names for a given user object.

param: WP_User $user_object The WP_User object.
return: string[] An array of user role names keyed by role.



Generated : Tue Dec 24 08:20:01 2024 Cross-referenced by PHPXref