WC_Admin_List_Table::maybe_render_blank_state
Show blank slate.
Method of the class: WC_Admin_List_Table{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Admin_List_Table = new WC_Admin_List_Table(); $WC_Admin_List_Table->maybe_render_blank_state( $which );
- $which(string) (required)
- String which tablenav is being shown.
WC_Admin_List_Table::maybe_render_blank_state() WC Admin List Table::maybe render blank state code WC 10.3.3
public function maybe_render_blank_state( $which ) {
global $post_type;
if ( $post_type === $this->list_table_type && 'bottom' === $which ) {
$counts = (array) wp_count_posts( $post_type );
unset( $counts['auto-draft'] );
$count = array_sum( $counts );
if ( 0 < $count ) {
return;
}
$this->render_blank_state();
echo '<style type="text/css">#posts-filter .wp-list-table, #posts-filter .tablenav.top, .tablenav.bottom .actions, .wrap .subsubsub { display: none; } #posts-filter .tablenav.bottom { height: auto; } </style>';
}
}