banner
2 years ago
emailkit
1 year ago
feedback
3 weeks ago
metform-promo-banner
1 year ago
notice
1 year ago
onboard
1 day ago
plugins
2 years ago
pro-awareness
1 year ago
stories
2 years ago
controls-helper.php
4 years ago
elementor-data-map.php
4 years ago
global-helper.php
3 years ago
helper.php
1 year ago
notice.php
1 year ago
shipping-calculation.php
3 years ago
util.php
2 years ago
global-helper.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | use ShopEngine\Core\MultiLanguage\Language; |
| 4 | |
| 5 | if ( !function_exists( 'shopengine_translate' ) ) { |
| 6 | /** |
| 7 | * @param $key |
| 8 | * @param $value |
| 9 | */ |
| 10 | function shopengine_translator( $key, $value ) |
| 11 | { |
| 12 | if ( 'polylang' === Language::$translator ) { |
| 13 | return pll_translate_string( $value, Language::$language_code ); |
| 14 | } elseif ( 'wpml' === Language::$translator ) { |
| 15 | return apply_filters( 'wpml_translate_single_string', $value, Language::CONTEXT, $key ); |
| 16 | } |
| 17 | return $value; |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | if ( !function_exists( 'shopengine_content_render' ) ) { |
| 22 | function shopengine_content_render($content) { |
| 23 | //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 24 | echo $content; |
| 25 | } |
| 26 | } |