프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$active_callback | string | array | A custom callback to determine if the field should be visible or not. | |
$capability | string | Thje capability required so that users can edit this field. | |
$choices | array | We're whitelisting the property here and suggest you validate this in a child class. | |
$default | string | array | The default value for this field. | |
$disable_output | boolean | Set to true if you want to disable all CSS output for this field. | |
$flex_height | boolean | Whether the height is flexible for cropped image. | |
$flex_width | boolean | Whether the width is flexible for cropped image. | |
$height | integer | Suggested height for cropped image. | |
$help | string | Whitelisting for backwards-compatibility. | |
$id | string | This is auto-calculated from the $settings argument. | |
$input_attrs | array | Vustom input attributes (defined as an array). | |
$js_vars | array | Not necessary to use if you use 'transport' => 'auto' and have already set an array for the 'output' argument. | |
$kirki_config | string | The ID of the kirki_config we're using. | |
$mime_type | array | Limit the Media library to a specific mime type | |
$mode | string | Whitelisting for backwards-compatibility. | |
$multiple | integer | Defines if this is a multi-select or not. If value is > 1, then the maximum number of selectable options is the number defined here. | |
$option_name | string | If we're using options instead of theme_mods and we want them serialized, this is the option that will saved in the db. | |
$option_type | string | Use "theme_mod" or "option". | |
$output | array | Use if you want to automatically generate CSS from this field's value. | |
$partial_refresh | array | Partial Refreshes array. | |
$priority | integer | Lower priority numbers move the control to the top. | |
$required | array | Define dependencies to show/hide this field based on the values of other fields. | |
$row_label | array | Contain the settings for the repeater rows labels | |
$sanitize_callback | string | array | A custom sanitize callback that will be used to properly save the values. | |
$section | string | Fields not assigned to a section will not be displayed in the customizer. | |
$settings | string | array | The name of this setting (id for the db). | |
$tooltip | string | Text that will be used in a tooltip to provide extra info for this field. | |
$transport | string | 'auto' will automatically geberate any 'js_vars' from the 'output' argument. | |
$type | string | The field type. | |
$variables | array | If you want to use a CSS compiler, then use this to set the variable names. | |
$width | integer | Suggested width for cropped image. |
메소드 | 설명 | |
---|---|---|
__construct ( string $config_id = 'global', array $args = [] ) | The class constructor. |
메소드 | 설명 | |
---|---|---|
set_active_callback ( ) | Sets the active_callback If we're using the $required argument, Then this is where the switch is made to our evaluation method. | |
set_capability ( ) | Checks the capability chosen is valid. | |
set_choices ( ) | Sets the $choices. | |
set_default ( ) | This allows us to process this on a field-basis by using sub-classes which can override this method. | |
set_disable_output ( ) | Escapes the $disable_output. | |
set_field ( array $whitelisted_properties = [] ) | Processes the field arguments | |
set_help ( ) | This is a fallback method: $help has now become $tooltip, so this just migrates the data | |
set_id ( ) | Sets the $id. | |
set_input_attrs ( ) | Escape the $section. | |
set_js_vars ( ) | Sets the $js_vars | |
set_kirki_config ( ) | Escape $kirki_config. | |
set_multiple ( ) | Sets the $multiple | |
set_option_name ( ) | Escape $option_name. | |
set_option_type ( ) | Make sure we're using the correct option_type | |
set_output ( ) | Sets the $sanitize_callback | |
set_partial_refresh ( ) | Modifications for partial refreshes. | |
set_priority ( ) | Sets the $priority | |
set_required ( ) | Sets the $required | |
set_sanitize_callback ( ) | Sets the $sanitize_callback | |
set_section ( ) | Escape the $section. | |
set_settings ( ) | Sets the settings. | |
set_tooltip ( ) | Escapes the tooltip messages. | |
set_transport ( ) | Sets the $transport | |
set_type ( ) | Sets the control type. | |
set_variables ( ) | Sets the $variables |
public __construct ( string $config_id = 'global', array $args = [] ) | ||
$config_id | string | The ID of the config we want to use. Defaults to "global". Configs are handled by the Kirki_Config class. |
$args | array | The arguments of the field. |
protected set_active_callback ( ) |
protected set_capability ( ) |
protected set_default ( ) |
protected set_help ( ) |
protected set_id ( ) |
protected set_option_type ( ) |
protected set_partial_refresh ( ) |
protected set_settings ( ) |
protected string $capability | ||
리턴 | string |
protected array $choices | ||
리턴 | array |
protected bool $disable_output | ||
리턴 | boolean |
protected bool $flex_height | ||
리턴 | boolean |
protected bool $flex_width | ||
리턴 | boolean |
protected string $id | ||
리턴 | string |
protected array $input_attrs | ||
리턴 | array |
protected array $js_vars | ||
리턴 | array |
protected string $kirki_config | ||
리턴 | string |
protected array $mime_type | ||
리턴 | array |
protected int $multiple | ||
리턴 | integer |
protected string $option_name | ||
리턴 | string |
protected array $output | ||
리턴 | array |
protected int $priority | ||
리턴 | integer |
protected array $required | ||
리턴 | array |
protected array $row_label | ||
리턴 | array |
protected string $section | ||
리턴 | string |
protected string $tooltip | ||
리턴 | string |
protected string $transport | ||
리턴 | string |
protected array $variables | ||
리턴 | array |