Function Reference/get field name

来自WordPress中文文档
跳转至: 导航搜索

This function is used to uniquely identify form fields in the configuration form of Widgets. It should be used to generate field-ids for labeling the form fields in the widget configuration form.

function form($configuration)
{
?>

<label for="<?php echo $this->get_field_id("title");  ?>">
    <p>Title: <input type="text"  value="<?php echo $config['title']; ?>" name="<?php  echo $this->get_field_name("title"); ?>" id="<?php  echo $this->get_field_id("title") ?>"></p>
    </label>
<?php
}


http://core.trac.wordpress.org/browser/tags/3.1.3/wp-includes/widgets.php#L109

includeonlydiv style=clear:both; background-color:#F7F7F7; border:1px solid #CCCCCC; color:#000000; padding:7px; margin:0.5em auto 0.5em auto; vertical-align:middle;See also index of Function Reference and index of Template Tags./div/includeonlynoinclude

Description

This Template is used by Codex:Template Messages.

Usage

pre 检查到模板循环:模板:Message /pre

Result

检查到模板循环:模板:Message

/noinclude