这是我在为语言切换器定义的小部件区域中遇到的错误:
注意:未定义索引:/HOME/DUTCHTAX/DOMAINS/DUTCHTAXADVICE.NL/PUBLIC_HTML/WP-CONTENT/THEMES/PATTI/FUNCTIONS.PHP 中的代码 835 EN
// Language Switcher for WPML
if (!function_exists('delicious_language_selector')) {
function delicious_language_selector() {
if (function_exists('icl_get_languages')) {
$languages = icl_get_languages('skip_missing=0&orderby=code');
wp_enqueue_script( 'dt-tipsy' );
wp_enqueue_style( 'dt-tipsy' );
if(!empty($languages)){
echo '<div id="header_language_list"><ul>';
foreach($languages as $l){
if($l['active']) { echo '<li class="active-lang switch-lang" original-title="'.$l['native_name'].'">'; }
else { echo '<li class="switch-lang" original-title="'.$l['native_name'].'">'; }
if(!$l['active']) echo '<a href="'.$l['url'].'">';
if($l['code'] != 'zh-hant') { echo substr($l['native_name'], 0, 2); } else { echo $l['native_name']; }
if(!$l['active']) echo '</a>';
echo '</li>';
}
echo '</ul></div>';
}
}
}
}