Automattic\WooCommerce\Blocks

BlockTypesController::register_block_patterns()publicWC 1.0

Register block patterns

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$BlockTypesController = new BlockTypesController();
$BlockTypesController->register_block_patterns();

Код BlockTypesController::register_block_patterns() WC 9.7.1

public function register_block_patterns() {
	register_block_pattern(
		'woocommerce/order-confirmation-totals-heading',
		array(
			'title'    => '',
			'inserter' => false,
			'content'  => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Order details', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
		)
	);
	register_block_pattern(
		'woocommerce/order-confirmation-downloads-heading',
		array(
			'title'    => '',
			'inserter' => false,
			'content'  => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Downloads', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
		)
	);
	register_block_pattern(
		'woocommerce/order-confirmation-shipping-heading',
		array(
			'title'    => '',
			'inserter' => false,
			'content'  => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Shipping address', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
		)
	);
	register_block_pattern(
		'woocommerce/order-confirmation-billing-heading',
		array(
			'title'    => '',
			'inserter' => false,
			'content'  => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Billing address', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
		)
	);
	register_block_pattern(
		'woocommerce/order-confirmation-additional-fields-heading',
		array(
			'title'    => '',
			'inserter' => false,
			'content'  => '<!-- wp:heading {"level":2,"style":{"typography":{"fontSize":"24px"}}} --><h2 class="wp-block-heading" style="font-size:24px">' . esc_html__( 'Additional information', 'woocommerce' ) . '</h2><!-- /wp:heading -->',
		)
	);
}