/** * @param integer $post_id * @param SitePress $sitepress * * @return null|string */ protected function get_save_post_lang($post_id, $sitepress) { $language_code = isset($post_vars['icl_post_language']) ? $post_vars['icl_post_language'] : null; $language_code = $language_code ? $language_code : filter_input(INPUT_GET, 'lang', FILTER_SANITIZE_FULL_SPECIAL_CHARS); $language_code = $language_code ? $language_code : parent::get_save_post_lang($post_id, $sitepress); return $language_code; }
/** * @param integer $post_id * @param SitePress $sitepress * * @return null|string */ public function get_save_post_lang($post_id, $sitepress) { $language_code = filter_var(isset($_POST['icl_post_language']) ? $_POST['icl_post_language'] : '', FILTER_SANITIZE_FULL_SPECIAL_CHARS); $language_code = $language_code ? $language_code : filter_input(INPUT_GET, 'lang', FILTER_SANITIZE_FULL_SPECIAL_CHARS); return $language_code ? $language_code : parent::get_save_post_lang($post_id, $sitepress); }