WP_Users_List_Table::__construct
Constructor.
Method of the class: WP_Users_List_Table{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WP_Users_List_Table = new WP_Users_List_Table(); $WP_Users_List_Table->__construct( $args );
- $args(array)
- An associative array of arguments.
Default:array()
Notes
- See: WP_List_Table::__construct() for more information on default arguments.
Changelog
| Since 3.1.0 | Introduced. |
WP_Users_List_Table::__construct() WP Users List Table:: construct code WP 7.0
public function __construct( $args = array() ) {
parent::__construct(
array(
'singular' => 'user',
'plural' => 'users',
'screen' => $args['screen'] ?? null,
)
);
$this->is_site_users = 'site-users-network' === $this->screen->id;
if ( $this->is_site_users ) {
$this->site_id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0;
}
}