get_default_language(); } if(!isset($icl_translation_filter['to_lang'])){ $icl_translation_filter['to_lang'] = isset($_GET['to_lang'])?$_GET['to_lang']:''; } if($icl_translation_filter['to_lang'] == $icl_translation_filter['from_lang']){ $icl_translation_filter['to_lang'] = false; } if(!isset($icl_translation_filter['tstatus'])){ $icl_translation_filter['tstatus'] = isset($_GET['tstatus'])?$_GET['tstatus']:'not'; } if(!isset($icl_translation_filter['status_on']) || !$icl_translation_filter['status_on']){ $icl_translation_filter['status_on'] = isset($_GET['status_on']) ? $_GET['status_on'] : false; if(!$icl_translation_filter['status_on']){ unset($icl_translation_filter['status']); } } if(!isset($icl_translation_filter['type_on']) || !$icl_translation_filter['type_on']){ $icl_translation_filter['type_on'] = isset($_GET['type_on']) ? $_GET['type_on'] : false; if(!$icl_translation_filter['type_on']){ unset($icl_translation_filter['type']); } } if(!isset($icl_translation_filter['title_on']) || !$icl_translation_filter['title_on']){ $icl_translation_filter['title_on'] = isset($_GET['title_on']) ? $_GET['title_on'] : false; if(!$icl_translation_filter['title_on']){ unset($icl_translation_filter['title']); } } if(!isset($icl_translation_filter['sort_by']) || !$icl_translation_filter['sort_by']){ $icl_translation_filter['sort_by'] = 'p.post_date';} if(!isset($icl_translation_filter['sort_order']) || !$icl_translation_filter['sort_order']){ $icl_translation_filter['sort_order'] = 'DESC';} $sort_order_next = $icl_translation_filter['sort_order'] == 'ASC' ? 'DESC' : 'ASC'; $title_sort_link = 'admin.php?page='.ICL_PLUGIN_FOLDER.'/menu/translation-management.php&sm=dashboard&icl_tm_action=sort&sort_by=p.post_title&sort_order='.$sort_order_next; $date_sort_link = 'admin.php?page='.ICL_PLUGIN_FOLDER.'/menu/translation-management.php&sm=dashboard&icl_tm_action=sort&sort_by=p.post_date&sort_order='.$sort_order_next; $icl_post_statuses = array( 'publish' =>__('Published', 'sitepress'), 'draft' =>__('Draft', 'sitepress'), 'pending' =>__('Pending Review', 'sitepress'), 'future' =>__('Scheduled', 'sitepress') ); $icl_post_types = $sitepress->get_translatable_documents(); $icl_dashboard_settings = $sitepress_settings['dashboard']; $icl_translation_filter['limit_no'] = isset($_GET['show_all']) && $_GET['show_all'] ? 10000 : ICL_TM_DOCS_PER_PAGE; $icl_documents = $iclTranslationManagement->get_documents($icl_translation_filter); $icl_translators = $iclTranslationManagement->get_blog_translators(); if(!empty($iclTranslationManagement->dashboard_select)){ $icl_selected_posts = (array)$iclTranslationManagement->dashboard_select['post']; $icl_selected_languages = (array)$iclTranslationManagement->dashboard_select['translate_to']; $icl_selected_translators = (array)$iclTranslationManagement->dashboard_select['translator']; } if(!empty($sitepress_settings['default_translators'][$icl_translation_filter['from_lang']])){ foreach($sitepress_settings['default_translators'][$icl_translation_filter['from_lang']] as $_tolang => $tr){ if($iclTranslationManagement->translator_exists($tr['id'], $icl_translation_filter['from_lang'], $_tolang, $tr['type'])){ $icl_selected_translators[$_tolang] = $tr['type'] == 'local' ? $tr['id'] : $tr['id'] . '-' . $tr['type']; } } } foreach($sitepress->get_active_languages()as $lang){ if(empty($icl_selected_translators[$lang['code']]) && is_array($sitepress_settings['icl_lang_status'])){ foreach($sitepress_settings['icl_lang_status'] as $lpair){ if($lpair['from']==$icl_translation_filter['from_lang'] && $lpair['to']==$lang['code'] && !empty($lpair['translators'])){ $icl_selected_translators[$lang['code']] = $lpair['translators']['0']['id'] . '-icanlocalize'; } } } } $icl_translation_services = apply_filters('icl_translation_services', array()); if (!empty($icl_translation_services)) { $icls_output = ''; $icls_output .= '
' . $service['description'] . '
'; $icls_output .= '' . __('Get quote','sitepress') . ' '; $icls_output .= isset($service['setup_url_dashboard']) ? '' . $service['setup_url_dashboard'][0] . '' : ''; $icls_output .= '