コード例 #1
0
 function administration_menu()
 {
     if (!SitePress::check_settings_integrity()) {
         return;
     }
     ICL_AdminNotifier::removeMessage('setup-incomplete');
     $main_page = apply_filters('icl_menu_main_page', basename(ICL_PLUGIN_PATH) . '/menu/languages.php');
     if (SitePress_Setup::setup_complete()) {
         add_menu_page(__('WPML', 'sitepress'), __('WPML', 'sitepress'), 'wpml_manage_languages', $main_page, null, ICL_PLUGIN_URL . '/res/img/icon16.png');
         add_submenu_page($main_page, __('Languages', 'sitepress'), __('Languages', 'sitepress'), 'wpml_manage_languages', basename(ICL_PLUGIN_PATH) . '/menu/languages.php');
         //By Gen, moved Translation management after language, because problems with permissions
         do_action('icl_wpml_top_menu_added');
         add_submenu_page($main_page, __('Theme and plugins localization', 'sitepress'), __('Theme and plugins localization', 'sitepress'), 'wpml_manage_theme_and_plugin_localization', basename(ICL_PLUGIN_PATH) . '/menu/theme-localization.php');
         if (!defined('WPML_TM_VERSION')) {
             add_submenu_page($main_page, __('Translation options', 'sitepress'), __('Translation options', 'sitepress'), 'wpml_manage_translation_options', basename(ICL_PLUGIN_PATH) . '/menu/translation-options.php');
         }
     } else {
         $main_page = basename(ICL_PLUGIN_PATH) . '/menu/languages.php';
         add_menu_page(__('WPML', 'sitepress'), __('WPML', 'sitepress'), 'manage_options', $main_page, null, ICL_PLUGIN_URL . '/res/img/icon16.png');
         add_submenu_page($main_page, __('Languages', 'sitepress'), __('Languages', 'sitepress'), 'wpml_manage_languages', $main_page);
         if ((!isset($_REQUEST['page']) || $_REQUEST['page'] != ICL_PLUGIN_FOLDER . '/menu/troubleshooting.php') && !SitePress_Setup::languages_table_is_complete()) {
             $troubleshooting_url = admin_url('admin.php?page=' . ICL_PLUGIN_FOLDER . '/menu/troubleshooting.php');
             $troubleshooting_link = '<a href="' . $troubleshooting_url . '" title="' . esc_attr(__('Troubleshooting', 'sitepress')) . '">' . __('Troubleshooting', 'sitepress') . '</a>';
             $message = '';
             $message .= __('WPML is missing some records in the languages tables and it cannot fully work until this issue is fixed.', 'sitepress');
             $message .= '<br />';
             $message .= sprintf(__('Please go to the %s page and click on %s to fix this problem.', 'sitepress'), $troubleshooting_link, __('Fix languages tables', 'sitepress'));
             $message .= '<br />';
             $message .= '<br />';
             $message .= __('This warning will disappear once this issue is fixed.', 'sitepress');
             ICL_AdminNotifier::removeMessage('setup-incomplete');
             ICL_AdminNotifier::addMessage('setup-incomplete', $message, 'error', false, false, false, 'setup', true);
             ICL_AdminNotifier::displayMessages('setup');
         }
     }
     add_submenu_page($main_page, __('Support', 'sitepress'), __('Support', 'sitepress'), 'wpml_manage_support', ICL_PLUGIN_FOLDER . '/menu/support.php');
     $this->troubleshooting_menu(ICL_PLUGIN_FOLDER . '/menu/support.php');
     $this->debug_information_menu(ICL_PLUGIN_FOLDER . '/menu/support.php');
 }
コード例 #2
0
ファイル: languages.php プロジェクト: Junaid-Farid/gocnex
            break;
        }
    }
    $default_language_details = $sitepress->get_language_details($default_language);
    $inactive_content = $sitepress->get_inactive_content();
}
global $language_switcher_defaults, $language_switcher_defaults_alt;
if (!class_exists('WPML_Config')) {
    require ICL_PLUGIN_PATH . '/inc/wpml-config/wpml-config.class.php';
}
$theme_wpml_config_file = WPML_Config::get_theme_wpml_config_file();
$sitepress->noscript_notice();
?>

<?php 
if ($setup_complete || SitePress_Setup::languages_table_is_complete()) {
    ?>
<div class="wrap <?php 
    if (empty($setup_complete)) {
        ?>
wpml-wizard<?php 
    }
    ?>
">
    <div id="icon-wpml" class="icon32" ><br /></div>
    <h2><?php 
    _e('Setup WPML', 'sitepress');
    ?>
</h2>

    <?php