Automattic\WooCommerce\Blocks

BlockTypesController::get_widget_area_block_typesprotectedWC 1.0

Get list of block types allowed in Widget Areas. New blocks won't be exposed in the Widget Area unless specifically added here.

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

Хуков нет.

Возвращает

Массив. Array of block types.

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

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

Код BlockTypesController::get_widget_area_block_types() WC 10.5.0

protected function get_widget_area_block_types() {
	return array(
		'AllReviews',
		'Breadcrumbs',
		'CartLink',
		'CatalogSorting',
		'ClassicShortcode',
		'CustomerAccount',
		'FeaturedCategory',
		'FeaturedProduct',
		'MiniCart',
		'ProductCategories',
		'ProductResultsCount',
		'ProductSearch',
		'ReviewsByCategory',
		'ReviewsByProduct',
		'ProductFilters',
		'ProductFilterStatus',
		'ProductFilterPrice',
		'ProductFilterPriceSlider',
		'ProductFilterAttribute',
		'ProductFilterRating',
		'ProductFilterActive',
		'ProductFilterRemovableChips',
		'ProductFilterClearButton',
		'ProductFilterCheckboxList',
		'ProductFilterChips',
		'ProductFilterTaxonomy',

		// Keep hidden legacy filter blocks for backward compatibility.
		'ActiveFilters',
		'AttributeFilter',
		'FilterWrapper',
		'PriceFilter',
		'RatingFilter',
		'StockFilter',
		// End: legacy filter blocks.

		// Below product grids are hidden from inserter however they could have been used in widgets.
		// Keep them for backward compatibility.
		'HandpickedProducts',
		'ProductBestSellers',
		'ProductNew',
		'ProductOnSale',
		'ProductTopRated',
		'ProductsByAttribute',
		'ProductCategory',
		'ProductTag',
		// End: legacy product grids blocks.
	);
}