Arguments参数
Name | Type | Default | Description |
type | string | ‘raw’ | Value identifying the field type.字符串类型的字段类型。 |
id | string | Unique ID identifying the field. Must be different from all other field IDs. 标识字段的id字符串唯一ID。必须与所有其他字段ID不同。 | |
title | string | Displays title of the option. | |
subtitle | string | Subtitle display of the option, situated beneath the title. 标题下字幕选项的字幕字符串显示。 | |
desc | string | Description of the option, appearing beneath the field control. | |
class | string | Appends any number of classes to the field’s class attribute. 添加任意数量的类的字段的类属性。 | |
required | array | Provide the parent, comparison operator, and value which affects the field’s visibility. More info 提供影响字段可见性的父、比较运算符和值。更多信息 | |
full_width | true | Flag to set denote if the field is full width or sectioned. | |
markdown | bool | Flag to set the markdown of standard line-break and tab characters to HTML. 设置标准换行字符为HTML和标签的降价旗帜。 | |
content | string | HTML content to display. String values or file output may be used.可以使用字符串值或文件输出。 | |
content_path | string | Full path to file that will be used as the content for this field. 将作为该字段内容使用的文件的完整路径。 | |
hint | array | Array containing the content and optional title arguments for the hint tooltip. More info包含提示工具提示的内容和可选标题参数的数组。更多信息 |
Example Declaration 示例 宣言
1
2
3
4
5
6
7
8
|
$fields
=
array
(
'id'
=>
'opt-raw'
,
'type'
=>
'raw'
,
'title'
=> __(
'Raw output'
,
'redux-framework-demo'
),
'subtitle'
=> __(
'Subtitle text goes here.'
,
'redux-framework-demo'
),
'desc'
=> __(
'This is the description field for additional info.'
,
'redux-framework-demo'
),
'content'
=>
file_get_contents
(dirname(
__FILE__
) .
'/myfile.txt'
)
);
|