WP_Customize_Color_Control::__construct( WP_Customize_Manager $manager, string $id, array $args = array() )

Constructor.


Description

Top ↑

See also


Top ↑

Parameters

$manager WP_Customize_Manager Required
Customizer bootstrap instance.
$id string Required
Control ID.
$args array Optional
Arguments to override class property defaults.
See WP_Customize_Control::__construct() for information on accepted arguments.
More Arguments from WP_Customize_Control::__construct( ... $args ) Array of properties for the new Control object.
  • instance_numberint
    Order in which this instance was created in relation to other instances.
  • managerWP_Customize_Manager
    Customizer bootstrap instance.
  • idstring
    Control ID.
  • settingsarray
    All settings tied to the control. If undefined, $id will be used.
  • settingstring
    The primary setting for the control (if there is one).
    Default 'default'.
  • capabilitystring
    Capability required to use this control. Normally this is empty and the capability is derived from $settings.
  • priorityint
    Order priority to load the control. Default 10.
  • sectionstring
    Section the control belongs to.
  • labelstring
    Label for the control.
  • descriptionstring
    Description for the control.
  • choicesarray
    List of choices for 'radio' or 'select' type controls, where values are the keys, and labels are the values.
  • input_attrsarray
    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.
  • allow_additionbool
    Show UI for adding new content, currently only used for the dropdown-pages control. Default false.
  • jsonarray
    Deprecated. Use WP_Customize_Control::json() instead.
  • typestring
    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'.
  • active_callbackcallable
    Active callback.

Default: array()


Top ↑

Source

File: wp-includes/customize/class-wp-customize-color-control.php. View all references

public function __construct( $manager, $id, $args = array() ) {
	$this->statuses = array( '' => __( 'Default' ) );
	parent::__construct( $manager, $id, $args );
}


Top ↑

Changelog

Changelog
Version Description
3.4.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.