WC_Admin_List_Table::disable_view_mode()publicWC 1.0

Removes this type from list of post types that support "View Mode" switching. View mode is seen on posts where you can switch between list or excerpt. Our post types don't support it, so we want to hide the useless UI from the screen options tab.

Метод класса: WC_Admin_List_Table{}

Хуков нет.


Массив. Array of post types supporting view mode, without this type.


$WC_Admin_List_Table = new WC_Admin_List_Table();
$WC_Admin_List_Table->disable_view_mode( $post_types );
$post_types(массив) (обязательный)
Array of post types supporting view mode.

Код WC_Admin_List_Table::disable_view_mode() WC 7.3.0

public function disable_view_mode( $post_types ) {
	unset( $post_types[ $this->list_table_type ] );
	return $post_types;