add_settings_field ( $id, $title, $callback, $page, $section = 'default', $args = array() )
- 参数
-
-
(string)
$id
Slug-name to identify the field. Used in the ‘id’ attribute of tags.- Required: 是
-
(string)
$title
Formatted title of the field. Shown as the label for the field during output.- Required: 是
-
(callable)
$callback
Function that fills the field with the desired form inputs. The function should echo its output.- Required: 是
-
(string)
$page
The slug-name of the settings page on which to show the section (general, reading, writing, …).- Required: 是
-
(string)
$section
Optional. The slug-name of the section of the settings page in which to show the box. Default ‘default’.- Required: 否
- Default: ‘default’
-
(array)
$args
{ Optional. Extra arguments that get passed to the callback function. @type string $label_for When supplied, the setting title will be wrapped in a `
-
(string)
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。