WP_Widget_Links::表单(阵列 $实例 )

输出链接小部件的设置表单。

参数

$实例阵列必修的
当前设置。

来源

公共函数窗体($instance){//默认值。$instance=wp_parse_args((数组)$实例,阵列(“images”=>真,“name”=>true,'description'=>错误,“评级”=>假,“类别”=>false,“orderby”=>“name”,“限制”=>-1,));$link_cats=get_terms(数组(“分类法”=>“链接类别”));$limit=(int)$instance['limit'];if(!$limit){$limit=-1;}?><p><label for=“<?php echo$this->get_field_id('类别');?>”><?php_e('选择链接类别:');?></标签><select class=“widefat”id=“<?php echo$this->get_field_id('category');?>”name=“<?php echo$this->get_field_name('catemory')?>”><选项值=“”><?php_ex(“所有链接”,“链接小部件”);?></选项><?php foreach($link_cats作为$link_cat):?><option value=“<?php echo(int)$link_cat->term_id;?>”<?选择的php($instance['category'],$link_cat->term_id);?>><?php-echo eschtml($link_cat->name);?></选项><?php endforeach;?></选择><label for=“<?php echo$this->get_field_id('orderby');?>”><?php_e('排序依据:');?></标签><select name=“<?php echo$this->get_field_name('orderby');?>”id=“<?php echo$this->get_field_id('ordersby')?>”class=“widefat”><option value=“name”<?php选中($instance['orderby'],'name');?>><?php_e(“链接标题”);?></选项><选项值=“额定值”<?php选中($instance['orderby'],'rating');?>><?php_e(“链接评级”);?></选项><选项值=“id”<?php已选中($instance['orderby'],'id');?>><?php_e(“链接ID”);?></选项><选项值=“rand”<?php选中($instance['orderby'],'rand');?>><?php_ex(“随机”,“链接小部件”);?></选项></选择></p><p><input class=“checkbox”type=“checkbox”<?php已检查($instance['images'],true);?>id=“<?php echo$this->get_field_id('图像');?>”name=“<?hp echo$this->get_field_name('图像]);?”/><label for=“<?php echo$this->get_field_id('图像');?>”><?php_e(“显示链接图像”);?></标签><br/><input class=“checkbox”type=“checkbock”<?php已检查($instance['name'],true);?>id=“<?php-echo$this->get_field_id('name');?>”name=“<label for=“<?php echo$this->get_field_id('name');?>”><?php_e('显示链接名称');?></标签><br/><input class=“checkbox”type=“checkbock”<?php已检查($instance['description'],true);?>id=“<?php echo$this->get_field_id('描述');?>”name=“<?php echo$this->get_field_name('描述]);?”/><label for=“<?php echo$this->get_field_id('description');?>”><?php_e('显示链接说明');?></标签><br/><input class=“checkbox”type=“checkbock”<?php已检查($instance['rating'],true);?>id=“<?php echo$this->get_field_id('rating');?>”name=“<label for=“<?php echo$this->get_field_id('rating');?>”><?php_e(“显示链接评级”);?></标签></p><p><label for=“<?php echo$this->get_field_id('limit');?>”><?php_e('要显示的链接数:');?></标签><input id=“<?php echo$this->get_field_id('limit');?>”name=“<?php echo$this->get_field_name('limp');”?>“type=”text“value=”<?php-echo(-1!=$limit)?(int)$limit:'';?>“size=”3“/></p><?php(电话)}

变更日志

版本描述
2.8.0介绍。

用户贡献的笔记

你必须登录在能够发表注释或反馈之前。