Automattic\WooCommerce\Blocks\BlockTypes\ProductCollection

Renderer::get_list_styles()protectedWC 1.0

Get the styles for the list element (fixed width).

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

Хуков нет.

Возвращает

Строку.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_list_styles( $fixed_width );
$fixed_width(строка) (обязательный)
Fixed width value.

Код Renderer::get_list_styles() WC 9.8.5

protected function get_list_styles( $fixed_width ) {
	$style = '';

	if ( isset( $fixed_width ) ) {
		$style .= sprintf( 'width:%s;', esc_attr( $fixed_width ) );
		$style .= 'margin: 0 auto;';
	}
	return $style;
}