當前位置: 首頁>>代碼示例>>PHP>>正文


PHP qtranxf_translate_wp函數代碼示例

本文整理匯總了PHP中qtranxf_translate_wp函數的典型用法代碼示例。如果您正苦於以下問題:PHP qtranxf_translate_wp函數的具體用法?PHP qtranxf_translate_wp怎麽用?PHP qtranxf_translate_wp使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了qtranxf_translate_wp函數的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: qtranxf_translate

/**
 * Looks up a translation in domain 'qtranslate', and if it is not there, uses the default WordPress domain to translate.
 * @since 3.4.5.5
*/
function qtranxf_translate($s)
{
    $t = get_translations_for_domain('qtranslate');
    if (isset($t->entries[$s]) && !empty($t->entries[$s]->translations)) {
        return $t->entries[$s]->translations[0];
    }
    return qtranxf_translate_wp($s);
}
開發者ID:antigenius,項目名稱:qtranslate-x,代碼行數:12,代碼來源:qtranslate_utils.php

示例2: qtranxf_admin_notices_errors

function qtranxf_admin_notices_errors()
{
    //qtranxf_dbg_log('"admin_notices": qtranxf_admin_notices_errors: REQUEST_TIME_FLOAT: ', $_SERVER['REQUEST_TIME_FLOAT']);
    $msgs = get_option('qtranslate_config_errors');
    if (!is_array($msgs)) {
        return;
    }
    foreach ($msgs as $key => $msg) {
        echo '<div class="error notice is-dismissible" id="qtranxs_config_error_' . $key . '"><p><a href="' . admin_url('options-general.php?page=qtranslate-x') . '" style="color:magenta">qTranslate&#8209;X</a>:&nbsp;<strong><span style="color: red;">' . qtranxf_translate_wp('Error') . '</span></strong>:&nbsp;' . $msg . '</p></div>';
    }
}
開發者ID:danmilon,項目名稱:donation-box,代碼行數:11,代碼來源:qtx_activation_hook.php

示例3: qtranxf_conf


//.........這裏部分代碼省略.........
        echo QTX_HIGHLIGHT_MODE_BORDER;
        ?>
" <?php 
        checked($highlight_mode, QTX_HIGHLIGHT_MODE_BORDER);
        ?>
 />
							<?php 
        _e('Draw a border around translatable fields.', 'qtranslate');
        ?>
						</label><br/>
						<label title="<?php 
        _e('Use custom CSS', 'qtranslate');
        ?>
">
							<input type="radio" name="highlight_mode" value="<?php 
        echo QTX_HIGHLIGHT_MODE_CUSTOM_CSS;
        ?>
" <?php 
        checked($highlight_mode, QTX_HIGHLIGHT_MODE_CUSTOM_CSS);
        ?>
/>
							<?php 
        echo __('Use custom CSS', 'qtranslate') . ':';
        ?>
						</label><br/>
					</fieldset><br />
					<textarea id="highlight_mode_custom_css" name="highlight_mode_custom_css" style="width:100%"><?php 
        echo esc_textarea($highlight_mode_custom_css);
        ?>
</textarea>
					<br />
					<small><?php 
        echo __('To reset to default, clear the text.', 'qtranslate') . ' ';
        printf(__('The color in use is taken from your profile option %s, the third color.', 'qtranslate'), '"<a href="' . admin_url('/profile.php') . '">' . qtranxf_translate_wp('Admin Color Scheme') . '</a>"');
        ?>
</small>
				</td>
			</tr>
<?php 
        /*
        			<tr>
        				<th scope="row"><?php _e('Debugging Information', 'qtranslate');?></th>
        				<td>
        					<p><?php printf(__('If you encounter any problems and you are unable to solve them yourself, you can visit the <a href="%s">Support Forum</a>. Posting the following Content will help other detect any misconfigurations.', 'qtranslate'), 'https://wordpress.org/support/plugin/qtranslate-x'); ?></p>
        					<textarea readonly="readonly" id="qtranxs_debug"><?php
        						$q_config_copy = $q_config;
        						// remove information to keep data anonymous and other not needed things
        						unset($q_config_copy['url_info']);
        						unset($q_config_copy['js']);
        						unset($q_config_copy['windows_locale']);
        						//unset($q_config_copy['pre_domain']);
        						unset($q_config_copy['term_name']);
        						echo htmlspecialchars(print_r($q_config_copy, true));
        					?></textarea>
        				</td>
        			</tr>
        */
        ?>
		</table>
	<?php 
        qtranxf_admin_section_end('advanced');
        ?>
	<?php 
        qtranxf_admin_section_start(__('Custom Integration', 'qtranslate'), 'integration');
        ?>
		<table class="form-table">
開發者ID:ycms,項目名稱:framework,代碼行數:67,代碼來源:qtx_configuration.php

示例4: qtranxf_wp_get_nav_menu_items


//.........這裏部分代碼省略.........
            if (isset($pars['colon'])) {
                $colon = stripos($pars['colon'], 'hid') === FALSE;
            }
            if (isset($pars['current'])) {
                $current = stripos($pars['current'], 'hid') === FALSE;
            }
            if (!$lang_names && !$flags) {
                $flags = true;
            }
        }
        if ($type == 'AL') {
            foreach ($q_config['enabled_languages'] as $lang) {
                if ($lang == $language) {
                    continue;
                }
                $toplang = $lang;
                $altlang = $lang;
                break;
            }
            $item->title = empty($title) ? '' : $q_config['language_name'][$toplang];
            $item->url = qtranxf_convertURL($url, $altlang, false, true);
        } else {
            $toplang = $language;
            if (empty($title)) {
                $item->title = '';
            } elseif (stripos($title, 'Current') !== FALSE) {
                $item->title = $q_config['language_name'][$toplang];
            } else {
                $blocks = qtranxf_get_language_blocks($item->title);
                if (count($blocks) <= 1) {
                    //no customization is done
                    $item->title = __('Language', 'qtranslate');
                    if ($item->title == 'Language') {
                        $item->title = qtranxf_translate_wp('Language');
                    }
                } else {
                    $item->title = qtranxf_use_block($toplang, $blocks);
                }
            }
            $item->url = null;
        }
        if ($topflag) {
            if (!empty($item->title)) {
                if ($colon) {
                    $item->title .= ':';
                }
                $item->title .= '&nbsp;';
            }
            $item->title .= '<img src="' . $flag_location . $q_config['flag'][$toplang] . '" alt="' . $q_config['language_name'][$toplang] . '" />';
            //.' '.__('Flag', 'qtranslate')
        }
        if (empty($item->attr_title)) {
            $item->attr_title = $q_config['language_name'][$toplang];
        }
        //$item->classes[] = 'qtranxs_flag_'.$language;
        $item->classes[] = 'qtranxs-lang-menu';
        $item->classes[] = 'qtranxs-lang-menu-' . $toplang;
        //qtranxf_dbg_log('qtranxf_wp_get_nav_menu_items: top $item: ',$item);
        $qtransmenu = $item;
    }
    //if(	$itemsmodified ) qtranxf_remove_detached_children($items);
    if (!$qtransmenu) {
        return $items;
    }
    foreach ($q_config['enabled_languages'] as $lang) {
        if ($type == 'AL') {
開發者ID:ycms,項目名稱:framework,代碼行數:67,代碼來源:qtranslate_frontend.php

示例5: qtranxf_editConfig

function qtranxf_editConfig()
{
    global $q_config;
    if (!qtranxf_verify_nonce('qtranslate-x_configuration_form')) {
        return;
    }
    // init some needed variables
    if (!isset($q_config['url_info']['errors'])) {
        $q_config['url_info']['errors'] = array();
    }
    if (!isset($q_config['url_info']['warnings'])) {
        $q_config['url_info']['warnings'] = array();
    }
    if (!isset($q_config['url_info']['messages'])) {
        $q_config['url_info']['messages'] = array();
    }
    $errors =& $q_config['url_info']['errors'];
    //$warnings = &$q_config['url_info']['warnings'];
    $messages =& $q_config['url_info']['messages'];
    $q_config['posted'] = array();
    $q_config['posted']['lang_props'] = array();
    $q_config['posted']['language_code'] = '';
    $q_config['posted']['original_lang'] = '';
    $language_code =& $q_config['posted']['language_code'];
    $lang_props =& $q_config['posted']['lang_props'];
    $original_lang =& $q_config['posted']['original_lang'];
    // check for action
    if (isset($_POST['qtranslate_reset']) && isset($_POST['qtranslate_reset2'])) {
        $messages[] = __('qTranslate has been reset.', 'qtranslate');
    } elseif (isset($_POST['default_language'])) {
        qtranxf_updateSettings();
        //execute actions
        qtranxf_executeOnUpdate();
    }
    if (isset($_POST['original_lang'])) {
        // validate form input
        $original_lang = sanitize_text_field($_POST['original_lang']);
        $lang = sanitize_text_field($_POST['language_code']);
        $lang_props['language_name'] = sanitize_text_field($_POST['language_name']);
        $lang_props['flag'] = sanitize_text_field($_POST['language_flag']);
        $lang_props['locale'] = sanitize_text_field($_POST['language_locale']);
        if (strlen($lang) != 2) {
            $errors[] = __('Language Code has to be 2 characters long!', 'qtranslate');
        }
        if (empty($lang_props['language_name'])) {
            $errors[] = __('The Language must have a name!', 'qtranslate');
        }
        if (strlen($lang_props['locale']) < 2) {
            $errors[] = __('The Language must have a Locale!', 'qtranslate');
        }
        if ($original_lang) {
            $lang_props['locale_html'] = sanitize_text_field($_POST['language_locale_html']);
            $lang_props['date_format'] = sanitize_text_field(stripslashes($_POST['language_date_format']));
            $lang_props['time_format'] = sanitize_text_field(stripslashes($_POST['language_time_format']));
            $nam = wp_kses_post(stripslashes($_POST['language_na_message']));
            //allow valid HTML
            $nam = htmlentities(html_entity_decode($nam));
            //standardize HTML entities
            $lang_props['not_available'] = $nam;
            if (empty($lang_props['date_format'])) {
                $errors[] = sprintf(__('Option "%s" must not be empty.', 'qtranslate'), qtranxf_translate_wp('Date Format')) . ' ' . sprintf(__('It has now been pre-filled with a default value as entered on page %s, which you may wish to adjust for this language.', 'qtranslate'), '<a href="' . admin_url('options-general.php') . '" target="_blank">' . qtranxf_translate_wp('General Settings') . '</a>');
                $lang_props['date_format'] = qtranxf_translate_dt_format('date_format', $lang);
            }
            if (empty($lang_props['time_format'])) {
                $errors[] = sprintf(__('Option "%s" must not be empty.', 'qtranslate'), qtranxf_translate_wp('Time Format')) . ' ' . sprintf(__('It has now been pre-filled with a default value as entered on page %s, which you may wish to adjust for this language.', 'qtranslate'), '<a href="' . admin_url('options-general.php') . '" target="_blank">' . qtranxf_translate_wp('General Settings') . '</a>');
                $lang_props['time_format'] = qtranxf_translate_dt_format('time_format', $lang);
            }
            if (empty($lang_props['not_available'])) {
                $errors[] = __('The Language must have a Not-Available Message!', 'qtranslate');
            }
        }
        $langs_preset = qtranxf_langs_preset();
        $langs_stored = qtranxf_langs_stored($langs_preset);
        if (empty($errors)) {
            if (empty($original_lang)) {
                // new language
                if (isset($langs_stored[$lang])) {
                    $errors[] = __('There is already a language with the same Language Code!', 'qtranslate');
                }
            } else {
                // language update
                if ($lang != $original_lang && isset($langs_stored[$lang])) {
                    $errors[] = __('There is already a language with the same Language Code!', 'qtranslate');
                } else {
                    if ($lang != $original_lang) {
                        // remove old language
                        //qtranxf_unsetLanguage($langs,$original_lang);
                        unset($langs_stored[$original_lang]);
                        qtranxf_unsetLanguage($q_config, $original_lang);
                        // if was enabled, set modified one to enabled too
                        foreach ($q_config['enabled_languages'] as $k => $lng) {
                            if ($lng != $original_lang) {
                                continue;
                            }
                            $q_config['enabled_languages'][$k] = $lng;
                            break;
                        }
                    }
                    if ($original_lang == $q_config['default_language']) {
                        // was default, so set modified the default
//.........這裏部分代碼省略.........
開發者ID:razik440,項目名稱:qtranslate-x,代碼行數:101,代碼來源:qtx_admin_options_update.php

示例6: qtranxf_admin_notices_config

function qtranxf_admin_notices_config()
{
    global $q_config;
    if (empty($q_config['url_info']['errors']) && empty($q_config['url_info']['warnings']) && empty($q_config['url_info']['messages'])) {
        return;
    }
    $screen = get_current_screen();
    $link = isset($screen->id) && $screen->id == 'settings_page_qtranslate-x' ? '' : '<a href="' . admin_url('options-general.php?page=qtranslate-x') . '" style="color:magenta">qTranslate&#8209;X</a>:&nbsp;';
    if (isset($q_config['url_info']['errors']) && is_array($q_config['url_info']['errors'])) {
        foreach ($q_config['url_info']['errors'] as $key => $msg) {
            echo '<div class="error notice is-dismissible" id="qtranxs_error_' . $key . '"><p>' . $link . '<strong><span style="color: red;">' . qtranxf_translate_wp('Error') . '</span></strong>:&nbsp;' . $msg . '</p></div>';
        }
        unset($q_config['url_info']['errors']);
    }
    if (isset($q_config['url_info']['warnings']) && is_array($q_config['url_info']['warnings'])) {
        foreach ($q_config['url_info']['warnings'] as $key => $msg) {
            echo '<div class="update-nag notice is-dismissible" id="qtranxs_warning_' . $key . '"><p>' . $link . '<strong><span style="color: blue;">' . qtranxf_translate_wp('Warning') . '</span></strong>:&nbsp;' . $msg . '</p></div>';
        }
        unset($q_config['url_info']['warnings']);
    }
    if (isset($q_config['url_info']['messages']) && is_array($q_config['url_info']['messages'])) {
        foreach ($q_config['url_info']['messages'] as $key => $msg) {
            echo '<div class="updated notice is-dismissible" id="qtranxs_message_' . $key . '"><p>' . $link . $msg . '</p></div>';
        }
        unset($q_config['url_info']['messages']);
    }
}
開發者ID:AndreyLanko,項目名稱:perevorot-prozorro-wp,代碼行數:27,代碼來源:qtx_admin.php

示例7: qtranxf_add_language_menu_item

function qtranxf_add_language_menu_item(&$items, &$menu_order, &$itemid, $key, $language)
{
    global $q_config;
    $item = $items[$key];
    $flag_location = qtranxf_flag_location();
    $altlang = null;
    $url = '';
    //options
    $type = 'LM';
    //[LM|AL]
    $title = 'Language';
    //[none|Language|Current]
    $current = true;
    //[shown|hidden]
    $flags = true;
    //[none|all|items]
    $lang_names = true;
    //names=[shown|hidden]
    $colon = true;
    //[shown|hidden]
    $topflag = true;
    $p = strpos($item->url, '?');
    if ($p !== FALSE) {
        $qs = substr($item->url, $p + 1);
        $qs = str_replace('#', '', $qs);
        $pars = array();
        parse_str($qs, $pars);
        if (isset($pars['type']) && stripos($pars['type'], 'AL') !== FALSE) {
            $type = 'AL';
        }
        if (isset($pars['flags'])) {
            $flags = stripos($pars['flags'], 'no') === FALSE;
            if ($flags) {
                $topflag = stripos($pars['flags'], 'items') === FALSE;
            } else {
                $topflag = false;
            }
        }
        if (isset($pars['names'])) {
            $lang_names = stripos($pars['names'], 'hid') === FALSE;
        }
        if (isset($pars['title'])) {
            $title = $pars['title'];
            if (stripos($pars['title'], 'no') !== FALSE) {
                $title = '';
            }
            if (!$topflag && empty($title)) {
                $title = 'Language';
            }
        }
        if (isset($pars['colon'])) {
            $colon = stripos($pars['colon'], 'hid') === FALSE;
        }
        if (isset($pars['current'])) {
            $current = stripos($pars['current'], 'hid') === FALSE;
        }
        if (!$lang_names && !$flags) {
            $flags = true;
        }
    }
    if ($type == 'AL') {
        foreach ($q_config['enabled_languages'] as $lang) {
            if ($lang == $language) {
                continue;
            }
            $toplang = $lang;
            $altlang = $lang;
            break;
        }
        $item->title = empty($title) ? '' : $q_config['language_name'][$toplang];
        $item->url = qtranxf_convertURL($url, $altlang, false, true);
    } else {
        $toplang = $language;
        if (empty($title)) {
            $item->title = '';
        } elseif (stripos($title, 'Current') !== FALSE) {
            $item->title = $q_config['language_name'][$toplang];
        } else {
            $blocks = qtranxf_get_language_blocks($item->title);
            if (count($blocks) <= 1) {
                //no customization is done
                $item->title = __('Language', 'qtranslate');
                if ($item->title == 'Language') {
                    $item->title = qtranxf_translate_wp('Language');
                }
            } else {
                $item->title = qtranxf_use_block($toplang, $blocks);
            }
        }
        $item->url = null;
    }
    if ($topflag) {
        if (!empty($item->title)) {
            if ($colon) {
                $item->title .= ':';
            }
            $item->title .= '&nbsp;';
        }
        $item->title .= '<img src="' . $flag_location . $q_config['flag'][$toplang] . '" alt="' . $q_config['language_name'][$toplang] . '" />';
        //.' '.__('Flag', 'qtranslate')
//.........這裏部分代碼省略.........
開發者ID:Alesja,項目名稱:qtranslate-x,代碼行數:101,代碼來源:qtranslate_frontend.php

示例8: qtranxf_conf


//.........這裏部分代碼省略.........
							<input type="radio" name="highlight_mode" value="<?php 
            echo QTX_HIGHLIGHT_MODE_OUTLINE;
            ?>
" <?php 
            checked($highlight_mode, QTX_HIGHLIGHT_MODE_OUTLINE);
            ?>
 />
							<?php 
            _e('Outline border around translatable fields.', 'qtranslate');
            ?>
						</label><br/>
						<label title="<?php 
            _e('Use custom CSS', 'qtranslate');
            ?>
">
							<input type="radio" name="highlight_mode" value="<?php 
            echo QTX_HIGHLIGHT_MODE_CUSTOM_CSS;
            ?>
" <?php 
            checked($highlight_mode, QTX_HIGHLIGHT_MODE_CUSTOM_CSS);
            ?>
/>
							<?php 
            echo __('Use custom CSS', 'qtranslate') . ':';
            ?>
						</label><br/>
					</fieldset><br />
					<textarea id="highlight_mode_custom_css" name="highlight_mode_custom_css" style="width:100%"><?php 
            echo esc_textarea($highlight_mode_custom_css);
            ?>
</textarea>
					<p class="qtranxs_notes"><?php 
            echo __('To reset to default, clear the text.', 'qtranslate') . ' ';
            printf(__('The color in use is taken from your profile option %s, the third color.', 'qtranslate'), '"<a href="' . admin_url('/profile.php') . '">' . qtranxf_translate_wp('Admin Color Scheme') . '</a>"');
            ?>
</p>
				</td>
			</tr>
<?php 
            /*
            			<tr valign="top">
            				<th scope="row"><?php _e('Debugging Information', 'qtranslate') ?></th>
            				<td>
            					<p class="qtranxs_explanation"><?php printf(__('If you encounter any problems and you are unable to solve them yourself, you can visit the <a href="%s">Support Forum</a>. Posting the following Content will help other detect any misconfigurations.', 'qtranslate'), 'https://wordpress.org/support/plugin/qtranslate-x') ?></p>
            					<textarea readonly="readonly" id="qtranxs_debug"><?php
            						$q_config_copy = $q_config;
            						// remove information to keep data anonymous and other not needed things
            						unset($q_config_copy['url_info']);
            						unset($q_config_copy['js']);
            						unset($q_config_copy['windows_locale']);
            						//unset($q_config_copy['pre_domain']);
            						unset($q_config_copy['term_name']);
            						echo htmlspecialchars(print_r($q_config_copy, true));
            					?></textarea>
            				</td>
            			</tr>
            */
            ?>
		</table>
	<?php 
            qtranxf_admin_section_end('advanced');
            ?>
	<?php 
            qtranxf_admin_section_start('integration');
            ?>
		<table class="form-table">
開發者ID:Krishan19,項目名稱:qtranslate-x,代碼行數:67,代碼來源:qtx_configuration.php

示例9: qtranxf_update_option_time_format

function qtranxf_update_option_time_format($old_value, $value)
{
    qtranxf_update_dt_format($old_value, $value, 'time_format', qtranxf_translate_wp('Time Format'));
}
開發者ID:fernao,項目名稱:qtranslate-x,代碼行數:4,代碼來源:qtx_admin.php

示例10: walk_nav_menu_tree

    echo walk_nav_menu_tree(array_map('wp_setup_nav_menu_item', $elems_obj), 0, (object) array('walker' => $walker));
    ?>
		</ul>
	</div>
	<span class="list-controls hide-if-no-js">
		<a href="javascript:void(0);" class="help" onclick="jQuery( '#qtranxs-langsw-help' ).toggle();"><?php 
    _e('Help', 'qtranslate');
    ?>
</a>
		<span class="hide-if-js" id="qtranxs-langsw-help"><p><a name="qtranxs-langsw-help"></a>
		<?php 
    echo __('Menu item added is replaced with a drop-down menu of available languages, when menu is rendered.', 'qtranslate');
    echo ' ';
    printf(__('The rendered menu items have CSS classes %s and %s ("%s" is a language code), which can be defined in theme style, if desired. The label of language menu can also be customized via field "%s" in the menu configuration.', 'qtranslate'), '.qtranxs-lang-menu, .qtranxs-lang-menu-xx, .qtranxs-lang-menu-item', '.qtranxs-lang-menu-item-xx', 'xx', qtranxf_translate_wp('Navigation Label'));
    echo ' ';
    printf(__('The field "%s" of inserted menu item allows additional configuration described in %sFAQ%s.', 'qtranslate'), qtranxf_translate_wp('URL'), '<a href="https://qtranslatexteam.wordpress.com/faq/#LanguageSwitcherMenuConfig" target="blank">', '</a>');
    ?>
</p>
		</span>
	</span>
	<p class="button-controls">
		<span class="add-to-menu">
			<input type="submit"<?php 
    disabled($nav_menu_selected_id, 0);
    ?>
 class="button-secondary submit-add-to-menu right" value="<?php 
    esc_attr_e('Add to Menu', 'qtranslate');
    ?>
" name="add-qtranxs-langsw-menu-item" id="submit-qtranxs-langsw" />
			<span class="spinner"></span>
		</span>
開發者ID:jesusmarket,項目名稱:jesusmarket,代碼行數:31,代碼來源:qtx_admin.php

示例11: qtranxf_slug_config

function qtranxf_slug_config($request_uri)
{
    global $q_config;
    $nopermalinks = qtranxf_is_permalink_structure_query();
    qtranxf_admin_section_start('slugs');
    ?>
<table class="form-table" id="qtranxf_slug_config">
<?php 
    if ($nopermalinks) {
        ?>
	<tr>
		<th scope="row" colspan="2"><?php 
        printf(__('You have to use pretty %spermalinks%s in order to take advantage of multilingual slugs.', 'qtranslate'), '<a href="' . admin_url('options-permalink.php') . '">', '</a>');
        ?>
</th>
	</tr>
<?php 
    } else {
        ?>
	<tr>
		<th scope="row"><?php 
        _e('Translate Slugs', 'qtranslate');
        ?>
</th>
		<td><input type="checkbox" name="slugs" id="qtranxs_slugs"<?php 
        checked(!empty($q_config['slugs']));
        ?>
  value="1"><label for="qtranxs_slugs" class="qtranxs_explanation"><?php 
        printf(__('Enable multilingual URL slugs for posts, pages, categories, post types, tags, etc.', 'qtranslate'));
        ?>
</label>
		<p class="qtranxs_notes"><?php 
        printf(__('Make sure to deactivate all other 3rd-party slug services. You may need to %simport slug data%s from other slug-plugins upon activation this service.', 'qtranslate'), '<a href="' . $request_uri . '#import">', '</a>') . ' ' . printf(__('It is important to read %sLocalized Slugs Guide%s to prevent other possible confusions.', 'qtranslate'), '<a href="https://qtranslatexteam.wordpress.com/slugs/" target="_blank">', '</a>');
        ?>
</p>
		</td>
	</tr>
<?php 
        if (!empty($q_config['slugs'])) {
            ?>
	<tr>
		<td colspan="2"><p class="qtranxs_explanation"><?php 
            echo __('If you change the default language value in one of the fields below, you may need to go back to the appropriate 3rd-party configuration page and make the same change there. It may also not be possible to make the same change using their tool, since additional restrictions may apply. That is why, it is advisable to tune all the default language values first, using corresponding native tools, before entering their translations to other languages on this page.', 'qtranslate') . ' ' . __('Be aware that not all browsers support non-latin alphabets in the address field, and therefore such slugs may appear url-encoded, which is probably not what you would wish. Please, test the appearance of non-latin slugs before going too far with them, you might change your mind.', 'qtranslate') . ' ' . sprintf(__('It is important to read %sLocalized Slugs Guide%s to prevent other possible confusions.', 'qtranslate'), '<a href="https://qtranslatexteam.wordpress.com/slugs/" target="_blank">', '</a>');
            ?>
</p>
		</td>
	</tr>
	<tr><td colspan="2" id="qtranxs_slug_lsb_top"></td></tr>
<?php 
            $objects = get_taxonomies(array('public' => true, 'show_ui' => true, '_builtin' => true), 'object');
            $objects = qtranxf_slug_admin_filter_types($objects);
            if (!empty($objects)) {
                ?>
	<tr>
		<th scope="row" class="qtranxs_option_group"><?php 
                _e('Built-in Taxonomies', 'qtranslate');
                ?>
</th>
		<td><p class="qtranxs_explanation"><?php 
                printf(__('Multilingual slug base for WordPress built-in taxonomies. The default language value is defined by %sWordPress%s on admin page %s.', 'qtranslate'), '<a href="https://codex.wordpress.org/Taxonomies" target="_blank">', '</a>', '<a href="' . admin_url('options-permalink.php') . '" target="_blank">' . qtranxf_translate_wp('Settings') . '/' . qtranxf_translate_wp('Permalinks') . '</a>');
                ?>
</p>
		</td>
	</tr>
<?php 
                //qtranxf_slug_admin_field('taxonomy', qtranxf_translate_wp('Category base'), 'taxonomy_category');
                //qtranxf_slug_admin_field('taxonomy', qtranxf_translate_wp('Tag base'), 'taxonomy_post_tag');
                qtranxf_slug_admin_fields($objects, 'taxonomy_builtin');
            }
            //global $wp_taxonomies; $objects = $wp_taxonomies;
            $objects = get_taxonomies(array('public' => true, 'show_ui' => true, '_builtin' => false), 'object');
            $objects = qtranxf_slug_admin_filter_types($objects);
            if (!empty($objects)) {
                ?>
	<tr>
		<th scope="row" class="qtranxs_option_group"><?php 
                _e('Custom Taxonomies', 'qtranslate');
                ?>
</th>
		<td><p class="qtranxs_explanation"><?php 
                echo __('Multilingual slug base for custom taxonomies.', 'qtranslate') . ' ';
                printf(__('The default language value is as provided in the argument %s of a call to function %s made by a 3rd-party, which created the term.', 'qtranslate'), '<code>$args[\'rewrite\'][\'slug\']</code>', '<a href="http://codex.wordpress.org/Function_Reference/register_taxonomy" target="_blank"><code>register_taxonomy</code></a>');
                ?>
</p>
		</td>
	</tr>
<?php 
                qtranxf_slug_admin_fields($objects, 'taxonomy');
            }
            //global $wp_post_types; $objects = $wp_post_types;
            $objects = get_post_types(array('_builtin' => true, 'public' => true), 'objects');
            $objects = qtranxf_slug_admin_filter_types($objects);
            if (!empty($objects)) {
                ?>
	<tr>
		<th scope="row" class="qtranxs_option_group"><?php 
                _e('Built-in Post Types', 'qtranslate');
                ?>
</th>
		<td><p class="qtranxs_explanation"><?php 
//.........這裏部分代碼省略.........
開發者ID:razik440,項目名稱:qtranslate-x,代碼行數:101,代碼來源:qtx_admin_slug_settings.php


注:本文中的qtranxf_translate_wp函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。