WC_Admin_List_Table::maybe_render_blank_state
Show blank slate.
Метод класса: WC_Admin_List_Table{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WC_Admin_List_Table = new WC_Admin_List_Table(); $WC_Admin_List_Table->maybe_render_blank_state( $which );
- $which(строка) (обязательный)
- String which tablenav is being shown.
Код WC_Admin_List_Table::maybe_render_blank_state() WC Admin List Table::maybe render blank state WC 10.4.0
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>';
}
}