Automattic\WooCommerce\Blocks\BlockTypes

ProductFiltersOverlayNavigation::render_label()privateWC 1.0

Gets the label to render depending on the triggerType.

Method of the class: ProductFiltersOverlayNavigation{}

No Hooks.

Return

String. Label to render on the block

Usage

// private - for code of main (parent) class only
$result = $this->render_label( $attributes );
$attributes(array) (required)
Block attributes.

ProductFiltersOverlayNavigation::render_label() code WC 9.4.2

private function render_label( $attributes ) {
	return sprintf(
		'<span>%s</span>',
		'open-overlay' === $attributes['triggerType'] ? __( 'Filters', 'woocommerce' ) : __( 'Close', 'woocommerce' )
	);
}