MailPoet\EmailEditor\Engine

Settings_Controller::get_layout_width_without_padding()publicWC 1.0

Returns the width of the layout without padding.

Method of the class: Settings_Controller{}

No Hooks.

Return

String.

Usage

$Settings_Controller = new Settings_Controller();
$Settings_Controller->get_layout_width_without_padding(): string;

Settings_Controller::get_layout_width_without_padding() code WC 9.8.1

public function get_layout_width_without_padding(): string {
	$styles = $this->get_email_styles();
	$layout = $this->get_layout();
	$width  = $this->parse_number_from_string_with_pixels( $layout['contentSize'] );
	$width -= $this->parse_number_from_string_with_pixels( $styles['spacing']['padding']['left'] );
	$width -= $this->parse_number_from_string_with_pixels( $styles['spacing']['padding']['right'] );
	return "{$width}px";
}