Automattic\WooCommerce\EmailEditor\Engine\Renderer\ContentRenderer\Postprocessors
Border_Style_Postprocessor::extract_style_from_shorthand_value
Extracts the style from a shorthand value.
Метод класса: Border_Style_Postprocessor{}
Хуков нет.
Возвращает
Строку|null
. The extracted style or null if no style is found.
Использование
// private - только в коде основоного (родительского) класса $result = $this->extract_style_from_shorthand_value( $value ): ?string;
- $value(строка) (обязательный)
- The shorthand value.
Код Border_Style_Postprocessor::extract_style_from_shorthand_value() Border Style Postprocessor::extract style from shorthand value WC 10.0.2
private function extract_style_from_shorthand_value( string $value ): ?string { $parts = preg_split( '/\s+/', trim( $value ) ); if ( ! is_array( $parts ) ) { return null; } foreach ( $parts as $part ) { if ( in_array( $part, array( 'none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset' ), true ) ) { return $part; } } return null; }