/** * @param array $lang * @param object|WP_User $author_data * @param bool $icl_lso_link_empty * @param bool $skip_lang * * @return array */ public function add_author_url_to_ls_lang($lang, $author_data, $icl_lso_link_empty, $skip_lang) { $post_type = get_query_var('post_type') ? get_query_var('post_type') : 'post'; if ($this->query_utils->author_query_has_posts($post_type, $author_data, $lang['code'])) { $lang['translated_url'] = $this->sitepress->convert_url($this->wp_api->get_author_posts_url($author_data->ID), $lang['code']); $lang['missing'] = 0; } else { list($lang, $skip_lang) = $this->maybe_mark_lang_missing($lang, $skip_lang, $icl_lso_link_empty); } return array($lang, $skip_lang); }