Automattic\WooCommerce\EmailEditor\Integrations\Utils
Styles_Helper::remove_css_unit
Remove the CSS unit from a string.
Метод класса: Styles_Helper{}
Хуков нет.
Возвращает
Строку. The string without the unit.
Использование
$result = Styles_Helper::remove_css_unit( $input ): string;
- $input(строка) (обязательный)
- The string to remove the unit from.
Код Styles_Helper::remove_css_unit() Styles Helper::remove css unit WC 10.8.1
public static function remove_css_unit( string $input ): string {
$units = array( 'px', 'pt', 'pc', 'rem', 'em', 'vmin', 'vmax', '%', 'vh', 'vw', 'ex', 'ch', 'fr' );
return str_ireplace( $units, '', $input );
}