/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/essential-grid/includes
NameSizeModeActions
assets/-0755rm
Detection/-0755rm
EspressoDev/-0755rm
external/-0755rm
aq_resizer.class.php65180644editdlrm
base.class.php1014150644editdlrm
coloreasing.class.php68070644editdlrm
colorpicker.class.php152080644editdlrm
defaults.php110230644editdlrm
external-sources.class.php11710644editdlrm
fonts.class.php60770644editdlrm
global-css.class.php124190644editdlrm
grids-widget.class.php232910644editdlrm
image-optimization.class.php159530644editdlrm
index.php260644editdlrm
item-element.class.php412250644editdlrm
item-skin.class.php2077770644editdlrm
loadbalancer.class.php22290644editdlrm
meta.class.php232630644editdlrm
navigation.class.php345980644editdlrm
ngg-source.class.php43430644editdlrm
rightclick.class.php55520644editdlrm
search.class.php138990644editdlrm
watermarks.class.php221930644editdlrm
watermarks.gd.class.php82700644editdlrm
watermarks.imagick.class.php88490644editdlrm
woocommerce.class.php117620644editdlrm
wordpress-update-fix.class.php33340644editdlrm
wpml.class.php29980644editdlrm
Edit: /var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/essential-grid/includes/wpml.class.php (2998B)
* @link http://www.themepunch.com/essential/ * @copyright 2021 ThemePunch */ if( !defined( 'ABSPATH') ) exit(); class Essential_Grid_Wpml{ /** * * true / false if the wpml plugin exists */ public static function is_wpml_exists(){ if(class_exists("SitePress")) return(true); else return(false); } /** * valdiate that wpml exists */ private static function validate_wpml_exists(){ if(!self::is_wpml_exists()) Essential_Grid_Base::throw_error(esc_attr__("The wpml plugin don't exists", ESG_TEXTDOMAIN)); } /** * get current language */ public static function get_current_lang(){ self::validate_wpml_exists(); $wpml = new SitePress(); if(is_admin()) $lang = $wpml->get_default_language(); else $lang = self::get_current_lang_code(); return(apply_filters('essgrid_wpml_get_current_lang', $lang)); } /** * get current language code */ public static function get_current_lang_code(){ $langTag = ICL_LANGUAGE_CODE; return(apply_filters('essgrid_wpml_get_current_lang_code', $langTag)); } /** * disable the language filtering */ public static function disable_language_filtering(){ global $sitepress; self::validate_wpml_exists(); remove_filter('terms_clauses', array($sitepress, 'terms_clauses')); } /** * enable the language filtering */ public static function enable_language_filtering(){ global $sitepress; self::validate_wpml_exists(); add_filter('terms_clauses', array($sitepress, 'terms_clauses')); } /** * get default language id of tag / category */ public static function get_id_from_lang_id($id, $type = 'category'){ $mid = $id; if(self::is_wpml_exists()){ $lang = self::get_current_lang_code(); $real_id = icl_object_id($id, $type, true, $lang); $mid = $real_id; } return apply_filters('essgrid_wpml_get_id_from_lang_id', $mid, $id, $type); } /** * get current language id of tag / category */ public static function get_lang_id_from_id($id, $type = 'category'){ $mid = $id; if(self::is_wpml_exists()){ $real_id = icl_object_id($id, $type, true); $mid = $real_id; } return apply_filters('essgrid_wpml_get_lang_id_from_id', $mid, $id, $type); } /** * change cat / tag ids in String to current language */ public static function change_cat_id_by_lang($catID, $type = 'category'){ $mid = $catID; if(self::is_wpml_exists()){ $real_id = icl_object_id($catID, $type, true); $mid = $real_id; } return apply_filters('essgrid_wpml_change_cat_id_by_lang', $mid, $catID, $type); } /** * remove for example @en from categories * @since: 2.1 */ public static function strip_category_additions($text){ $mtext = $text; $mid = $text; if(self::is_wpml_exists()){ $mtext = str_replace('@'.ICL_LANGUAGE_CODE, '', $text); } return apply_filters('essgrid_wpml_strip_category_additions', $mid, $text); } }