PHP Class WP_MS_Networks_List_Table

Since: 1.3
Inheritance: extends WP_List_Table
Show file Open project: stuttter/wp-multi-network Class Usage Examples

Public Methods

Method Description
__construct ( ) Main constructor
ajax_user_can ( ) : boolean Return capability used to determine if user can manage networks during an ajax request
column_admins ( WP_Network $network ) Output network admins
column_blogs ( WP_Network $network ) Output network sites
column_cb ( WP_Network $network ) Handles the checkbox column output.
column_default ( WP_Network $network, string $column_name ) Default column
column_domain ( WP_Network $network ) Output network domain
column_id ( array $network ) Handles the ID column output.
column_path ( WP_Network $network ) Output network path
column_title ( array $network ) Handles the network name column output.
display_rows ( ) Display table rows
get_bulk_actions ( ) : array Return array of bulk actions
get_columns ( ) : array Return array of columns
get_sortable_columns ( ) : array Return array of columns that are sortable
no_items ( ) Output message when no networks are found
pagination ( type $which ) Output pagination
prepare_items ( ) Prepare items for querying

Protected Methods

Method Description
get_default_primary_column_name ( ) : string Gets the name of the default primary column.
get_table_classes ( ) : type Return all classes for list-table
handle_row_actions ( WP_Network $network, string $column_name, string $primary ) : string Generates and displays row action links.

Private Methods

Method Description
can_delete ( WP_Network $network ) : boolean Can the current user delete this network?

Method Details

__construct() public method

Main constructor
public __construct ( )

ajax_user_can() public method

Return capability used to determine if user can manage networks during an ajax request
public ajax_user_can ( ) : boolean
return boolean

column_admins() public method

Output network admins
Since: 2.0.0
public column_admins ( WP_Network $network )
$network WP_Network

column_blogs() public method

Output network sites
Since: 2.0.0
public column_blogs ( WP_Network $network )
$network WP_Network

column_cb() public method

Handles the checkbox column output.
Since: 2.0.0
public column_cb ( WP_Network $network )
$network WP_Network

column_default() public method

Default column
Since: 2.0.0
public column_default ( WP_Network $network, string $column_name )
$network WP_Network
$column_name string

column_domain() public method

Output network domain
Since: 2.0.0
public column_domain ( WP_Network $network )
$network WP_Network

column_id() public method

Handles the ID column output.
public column_id ( array $network )
$network array Current network.

column_path() public method

Output network path
Since: 2.0.0
public column_path ( WP_Network $network )
$network WP_Network

column_title() public method

Handles the network name column output.
Since: 2.0.0
public column_title ( array $network )
$network array Current network.

display_rows() public method

Display table rows
Since: 2.0.0
public display_rows ( )

get_bulk_actions() public method

Return array of bulk actions
public get_bulk_actions ( ) : array
return array

get_columns() public method

Return array of columns
public get_columns ( ) : array
return array

get_default_primary_column_name() protected method

Gets the name of the default primary column.
protected get_default_primary_column_name ( ) : string
return string Name of the default primary column, in this case, 'title'.

get_sortable_columns() public method

Return array of columns that are sortable
public get_sortable_columns ( ) : array
return array

get_table_classes() protected method

Return all classes for list-table
protected get_table_classes ( ) : type
return type

handle_row_actions() protected method

Generates and displays row action links.
Since: 2.0.0
protected handle_row_actions ( WP_Network $network, string $column_name, string $primary ) : string
$network WP_Network Site being acted upon.
$column_name string Current column name.
$primary string Primary column name.
return string Row actions output.

no_items() public method

Output message when no networks are found
public no_items ( )

pagination() public method

Output pagination
public pagination ( type $which )
$which type

prepare_items() public method

Prepare items for querying
public prepare_items ( )