jankx / option
Jankx 选项可用于创建主题,附加选项与您喜爱的选项框架集成
dev-master
2023-02-20 16:23 UTC
This package is auto-updated.
Last update: 2024-09-20 19:31:54 UTC
README
规格
文件和目录结构
include/options
- option-section
- fields
- single-field.php
- multi-fields.php
- sub-section
- fields
- single-field.php
- multi-fields.php
- sub-options-args.php
- option-args.php
- general-fields.php
字段结构
章节和子章节参数
return array( 'id' => 'id-of-sections', 'title' => esc_html__('Section title'), 'subtitle' => esc_html__('Section sub-title'), 'desc' => esc_html__('The section decription'), 'icon' => 'fa-user', 'priority' => 10, // Alias is `sort` );
单个字段
return array( 'id' => 'field-id', 'type' => 'data-type', 'title' => esc_html__('Field title'), 'subtitle' => esc_html__('Field subtitle') 'desc' => esc_html__('Field description'), 'hint' => array( 'content' => 'This is a <b>hint</b> tool-tip for the text field.<br/><br/>Add any HTML based text you like here.', ), 'priority' => 10, // Alias is `sort` );
多字段
return array( array( array( 'id' => 'field-id-1', 'type' => 'data-type', 'title' => esc_html__('Field title 1'), 'subtitle' => esc_html__('Field subtitle 1') 'desc' => esc_html__('Field description 1'), 'hint' => array( 'content' => 'This is a <b>hint</b> tool-tip for the text field.<br/><br/>Add any HTML based text you like here.', ) ), array( 'id' => 'field-id-2', 'type' => 'text', 'title' => esc_html__('Field title 2'), 'subtitle' => esc_html__('Field subtitle 2') 'desc' => esc_html__('Field description'), 'priority' => 10, // Alias is `sort` ) ) );