Automattic\WooCommerce\EmailEditor\Engine\Renderer\ContentRenderer
Rendering_Context::is_rtl
Whether this render should use right-to-left direction.
Method of the class: Rendering_Context{}
No Hooks.
Returns
true|false.
Usage
$Rendering_Context = new Rendering_Context(); $Rendering_Context->is_rtl(): bool;
Rendering_Context::is_rtl() Rendering Context::is rtl code WC 11.0.0
public function is_rtl(): bool {
if ( isset( $this->email_context['is_rtl'] ) && is_bool( $this->email_context['is_rtl'] ) ) {
return $this->email_context['is_rtl'];
}
$primary_language = $this->get_primary_language_subtag( $this->language );
if ( null === $primary_language ) {
return false;
}
return in_array(
$primary_language,
array(
'ar',
'arc',
'azb',
'ckb',
'dv',
'fa',
'he',
'ku',
'nqo',
'ps',
'sd',
'ug',
'ur',
'yi',
),
true
);
}