From ed968d3701d0e03b4b295637ca1f1ddef120dbfc Mon Sep 17 00:00:00 2001 From: Sergey Chazov Date: Mon, 3 Aug 2020 16:15:50 +0300 Subject: [PATCH] feature/online-consultant: code styling for psr2 --- resources/pot/retailcrm-es_ES.pot | 4 ++-- resources/pot/retailcrm-ru_RU.pot | 4 ++-- .../class-wc-retailcrm-abstracts-settings.php | 6 +++--- src/include/class-wc-retailcrm-base.php | 20 +++++++++--------- src/languages/retailcrm-es_ES.mo | Bin 6649 -> 6617 bytes src/languages/retailcrm-ru_RU.mo | Bin 8201 -> 8171 bytes 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/resources/pot/retailcrm-es_ES.pot b/resources/pot/retailcrm-es_ES.pot index 69806d0..9c5141c 100644 --- a/resources/pot/retailcrm-es_ES.pot +++ b/resources/pot/retailcrm-es_ES.pot @@ -151,8 +151,8 @@ msgstr "Ajustes del catálogo" msgid "Online assistant" msgstr "Consultor en línea" -msgid "Insert the javascript from the retailCRM admin panel" -msgstr "Inserte javascript desde el panel de administración de retailCRM" +msgid "Insert the Online consultant code here" +msgstr "Inserte el código de consultor en Línea aquí" msgid "Select API version" msgstr "Selecciona la versión de API" diff --git a/resources/pot/retailcrm-ru_RU.pot b/resources/pot/retailcrm-ru_RU.pot index e723852..ad1975e 100644 --- a/resources/pot/retailcrm-ru_RU.pot +++ b/resources/pot/retailcrm-ru_RU.pot @@ -160,8 +160,8 @@ msgstr "Настройки каталога" msgid "Online assistant" msgstr "Онлайн консультант" -msgid "Insert the javascript from the retailCRM admin panel" -msgstr "Вставьте javascript из административной панели retailCRM" +msgid "Insert the Online consultant code here" +msgstr "Вставьте код Онлайн-консультанта здесь" msgid "Select API version" msgstr "Выберите версию API" diff --git a/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php b/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php index 97c75f9..f09b295 100644 --- a/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php +++ b/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php @@ -151,7 +151,7 @@ abstract class WC_Retailcrm_Abstracts_Settings extends WC_Integration 'title' => __( 'Online assistant', 'retailcrm' ), 'type' => 'textarea', 'id' => 'online_assistant', - 'placeholder' => __( 'Insert the javascript from the retailCRM admin panel', 'retailcrm' ) + 'placeholder' => __( 'Insert the Online consultant code here', 'retailcrm' ) ); $this->form_fields[] = array( @@ -573,8 +573,8 @@ abstract class WC_Retailcrm_Abstracts_Settings extends WC_Integration public function validate_online_assistant_field($key, $value) { $onlineAssistant = $_POST['woocommerce_integration-retailcrm_online_assistant']; - if (!empty($onlineAssistant) && is_string($onlineAssistant)) - { + if (!empty($onlineAssistant) && is_string($onlineAssistant)){ + return wp_unslash($onlineAssistant); } return ''; diff --git a/src/include/class-wc-retailcrm-base.php b/src/include/class-wc-retailcrm-base.php index 618f37c..85a58b9 100644 --- a/src/include/class-wc-retailcrm-base.php +++ b/src/include/class-wc-retailcrm-base.php @@ -375,16 +375,16 @@ if (!class_exists('WC_Retailcrm_Base')) { echo ''; } } - - /** - * Initialize online consultant - */ - public function initialize_online_assistant() - { - if (!is_admin()) { - echo $this->get_option('online_assistant'); - } - } + + /** + * Initialize online consultant + */ + public function initialize_online_assistant() + { + if (!is_admin()) { + echo $this->get_option('online_assistant'); + } + } /** * Get retailcrm api client diff --git a/src/languages/retailcrm-es_ES.mo b/src/languages/retailcrm-es_ES.mo index 38955269f198da5684e73806ebac728d53d02b8d..e180f1af60f9eb8a0737f5ac68ba7bdb1b11a4c9 100644 GIT binary patch delta 1027 zcmXZaPe_w-7{Kx84OeSst(>h|(>K|snHsi`GKmTclt8eobsX-kgz*m7MvD$FbSR<@ z#ts!lnFlW=R12vtN;`&B2MoQOE5={oafHIEcIPA^LHqRvc*{ znDr71p5IV6@DumrD#kFr$=%=pw$Lu&d7QxG_zR=h!{8=N;W{iKQ^5R`+`hwIat*OKjm@Ea3o7qE>Dh^BAR57mlMY z`~iE>nJ3VN0`($o*oH@N7>Dp4>dwETo@@p6L|<@M%tqPBO|xvnG=q?2QK^Ux%1gntJ4+MmCNoPB6myA< zZiRWZn_-{A2GOOKk}iGFp+n`dLx+MsphFnZ|H&bOVSdlN-|zFj^Dg-_IU5i8J4NL8 zQjso9Mntya39QE}xB{mF?*-)*)PApU6;{`YL~#vjzYf%XeW>*#IE=@z8E;@M&ee%8 zjRY@)f)9b8Q3v{g+pv0>NF0->3mnDGSi+-t7Y8s*rwurS8!?AfSVD%9%cu*R#4t|R z`>dMa4h3yEhbDf+UaVa%!XpE`bfJe(+vl(oFCfX2n^+8q+(*_T31(pk=|PHQ5F79? zHem)yo}BjyS_v+pPB4S(@iFQS=5Z4)Adj@JT&&-LnvsL3DfTddB^<$7)XXiQiybuT z#wpZ^U*jJ1=LvM8rqv=_uowF=gK4~uy7KR+JFDWLbw>@TJ8TKQJ5e*!k9rho?7?fe z8=s?YFwBdgq#1d9+0I*2nZi-@umxY>I{bvX^Dv{UG1N0|M;lYfCgnCR!AHUOGmP>5 z7WM4EqF%aRsF^URj55FMA{eA#KX&0&Jc1QWVT=RQBRGzFR2NY%)ii1bW>9bS12pgr zGKaiJy;I*%GaFsYAAx&OkN6xmYR5?e?Qjb<6Hibt)t8BfHD^O@6WvBEB;{eFQj<7k zow2-(>x>u8oO^oAES|JY*DhL4eqZ{4X=TTpf;ny#?0h*MX^-^%*F0-`S=+Spi`6Fa X-`0*-bghi@v|P}le?yhMXwLWp!rp=a diff --git a/src/languages/retailcrm-ru_RU.mo b/src/languages/retailcrm-ru_RU.mo index f8117e5a50a1a807bb528fac129dca5061766b00..ad8482ca01e8fcdf51c72d80cc4668a0d7407909 100644 GIT binary patch delta 1064 zcmXZaO-NKx6u|NGLZ@kRrc52bDyJN@)UhH9E77t=h6{-L(_7fNtD^Q4HeEupG@+n1<#<)pTh>s;R+0|5=mHe6RAz^vD$J>qt2f| zE#Mu0n{h5lP)Xn`6zRko+>ZTNjSsL9XRsB2;cjfE@0w@;b>3yvdE=-%e~*VThcWCd z5;=}p9K#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