Automattic\WooCommerce\Blocks\Patterns

PatternRegistry::get_category_labels()privateWC 1.0

Returns pattern slugs with their localized labels for categorization.

Each key represents a unique pattern slug, while the value is the localized label.

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

Хуков нет.

Возвращает

Массив<Строку,. string>

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

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

Код PatternRegistry::get_category_labels() WC 9.7.1

private function get_category_labels() {
	return [
		'woo-commerce'     => __( 'WooCommerce', 'woocommerce' ),
		'intro'            => __( 'Intro', 'woocommerce' ),
		'featured-selling' => __( 'Featured Selling', 'woocommerce' ),
		'about'            => __( 'About', 'woocommerce' ),
		'social-media'     => __( 'Social Media', 'woocommerce' ),
		'services'         => __( 'Services', 'woocommerce' ),
		'reviews'          => __( 'Reviews', 'woocommerce' ),
	];
}