MailPoet\EmailEditor\Engine\Renderer\ContentRenderer\Preprocessors

Blocks_Width_Preprocessor::parse_number_from_string_with_pixels()privateWC 1.0

Parse number from string with pixels

Method of the class: Blocks_Width_Preprocessor{}

No Hooks.

Return

float.

Usage

// private - for code of main (parent) class only
$result = $this->parse_number_from_string_with_pixels( $value ): float;
$value(string) (required)
Value with pixels.

Blocks_Width_Preprocessor::parse_number_from_string_with_pixels() code WC 9.8.1

private function parse_number_from_string_with_pixels( string $value ): float {
	return (float) str_replace( 'px', '', $value );
}