프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$active_callback | Callback. | ||
$allow_addition | boolean | Show UI for adding new content, currently only used for the dropdown-pages control. | |
$capability | string | Normally this is empty and the capability is derived from the capabilities of the associated $settings. | |
$choices | array | ||
$description | string | ||
$id | string | ||
$input_attrs | array | ||
$instance_number | integer | Order in which this instance was created in relation to other instances. | |
$json | array | ||
$label | string | ||
$manager | WP_Customize_Manager | ||
$priority | integer | ||
$section | string | ||
$setting | string | The primary setting for the control (if there is one). | |
$settings | array | All settings tied to the control. | |
$type | string |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$instance_count | integer | Used when sorting two instances whose priorities are equal. |
메소드 | 설명 | |
---|---|---|
__construct ( WP_Customize_Manager $manager, string $id, array $args = [] ) | Constructor. | |
active ( ) : boolean | Check whether control is active to current Customizer preview. | |
active_callback ( ) : true | Default callback used when invoking WP_Customize_Control::active(). | |
check_capabilities ( ) : boolean | Checks if the user can use this control. | |
enqueue ( ) | Enqueue control related scripts/styles. | |
get_content ( ) : string | Get the control's content for insertion into the Customizer pane. | |
get_link ( string $setting_key = 'default' ) : string | Get the data link attribute for a setting. | |
input_attrs ( ) | Render the custom attributes for the control's input element. | |
json ( ) : array | Get the data to export to the client via JSON. | |
link ( string $setting_key = 'default' ) | Render the data link attribute for the control's input element. | |
maybe_render ( ) | Check capabilities and render the control. | |
print_template ( ) | Render the control's JS template. | |
to_json ( ) | Refresh the parameters passed to the JavaScript via JSON. | |
value ( string $setting_key = 'default' ) : mixed | Fetch a setting's value. |
메소드 | 설명 | |
---|---|---|
content_template ( ) | An Underscore (JS) template for this control's content (but not its container). | |
render ( ) | Renders the control wrapper and calls $this->render_content() for the internals. | |
render_content ( ) | Render the control's content. |
public __construct ( WP_Customize_Manager $manager, string $id, array $args = [] ) | ||
$manager | WP_Customize_Manager | Customizer bootstrap instance. |
$id | string | Control ID. |
$args | array | { Optional. Arguments to override class property defaults. @type int $instance_number Order in which this instance was created in relation to other instances. @type WP_Customize_Manager $manager Customizer bootstrap instance. @type string $id Control ID. @type array $settings All settings tied to the control. If undefined, `$id` will be used. @type string $setting The primary setting for the control (if there is one). Default 'default'. @type int $priority Order priority to load the control. Default 10. @type string $section Section the control belongs to. Default empty. @type string $label Label for the control. Default empty. @type string $description Description for the control. Default empty. @type array $choices List of choices for 'radio' or 'select' type controls, where values are the keys, and labels are the values. Default empty array. @type array $input_attrs List of custom input attributes for control output, where attribute names are the keys and values are the values. Not used for 'checkbox', 'radio', 'select', 'textarea', or 'dropdown-pages' control types. Default empty array. @type array $json Deprecated. Use WP_Customize_Control::json() instead. @type string $type Control type. Core controls include 'text', 'checkbox', 'textarea', 'radio', 'select', and 'dropdown-pages'. Additional input types such as 'email', 'url', 'number', 'hidden', and 'date' are supported implicitly. Default 'text'. } |
public active_callback ( ) : true | ||
리턴 | true | Always true. |
final public check_capabilities ( ) : boolean | ||
리턴 | boolean | False if theme doesn't support the control or user doesn't have the required permissions, otherwise true. |
protected content_template ( ) |
final public get_content ( ) : string | ||
리턴 | string | Contents of the control. |
public input_attrs ( ) |
final public print_template ( ) |
protected render ( ) |
protected render_content ( ) |
public bool $allow_addition | ||
리턴 | boolean |
public string $capability | ||
리턴 | string |
protected static int $instance_count | ||
리턴 | integer |
public int $instance_number | ||
리턴 | integer |
public string $setting | ||
리턴 | string |