Automattic\WooCommerce\Internal\Admin\Orders

ListTable::get_table_classes()protectedWC 7.8.0

Gets a list of CSS classes for the WP_List_Table table tag.

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

Возвращает

Строку[]. Array of CSS classes for the table tag.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_table_classes();

Список изменений

С версии 7.8.0 Введена.

Код ListTable::get_table_classes() WC 8.7.0

protected function get_table_classes() {
	/**
	 * Filters the list of CSS class names for the orders list table.
	 *
	 * @since 7.8.0
	 *
	 * @param string[] $classes    An array of CSS class names.
	 * @param string   $order_type The order type.
	 */
	$css_classes = apply_filters(
		'woocommerce_' . $this->order_type . '_list_table_css_classes',
		array_merge(
			parent::get_table_classes(),
			array(
				'wc-orders-list-table',
				'wc-orders-list-table-' . $this->order_type,
			)
		),
		$this->order_type
	);

	return array_unique( array_map( 'trim', $css_classes ) );
}