Does not set global is_rtl variable

This commit is contained in:
Vlad
2017-09-06 20:56:52 -04:00
parent 6584250d1a
commit 77f3a875dd
3 changed files with 7 additions and 27 deletions

View File

@@ -1,32 +1,21 @@
<?php
namespace MailPoet\Config;
if(!defined('ABSPATH')) exit;
class Localizer {
function __construct($renderer) {
$this->renderer = $renderer;
}
function init() {
add_action(
'init',
array($this, 'setup')
);
}
function setup() {
$this->loadGlobalText();
$this->loadPluginText();
$this->setGlobalRtl();
}
function loadGlobalText() {
$language_path =
Env::$languages_path
. '/'
. $this->locale()
. '.mo';
$language_path = sprintf(
'%s/%s.mo',
Env::$languages_path,
$this->locale()
);
load_textdomain(Env::$plugin_name, $language_path);
}
@@ -38,10 +27,6 @@ class Localizer {
);
}
function setGlobalRtl() {
$this->renderer->addGlobal('is_rtl', is_rtl());
}
function locale() {
$locale = apply_filters(
'plugin_locale',