On this page
WP_Customize_New_Menu_Control::__construct( WP_Customize_Manager $manager, string $id, array $args = array() )
This method has been deprecated. Use WP_Customize_Control::__construct() instead.
Constructor.
Description
See also
Parameters
$managerWP_Customize_Manager Required-
Customizer bootstrap instance.
$idstring Required-
The control ID.
$argsarray 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_numberintOrder in which this instance was created in relation to other instances.managerWP_Customize_ManagerCustomizer bootstrap instance.idstringControl ID.settingsarrayAll settings tied to the control. If undefined,$idwill be used.settingstringThe primary setting for the control (if there is one).
Default'default'.capabilitystringCapability required to use this control. Normally this is empty and the capability is derived from$settings.priorityintOrder priority to load the control. Default 10.sectionstringSection the control belongs to.labelstringLabel for the control.descriptionstringDescription for the control.choicesarrayList of choices for'radio'or'select'type controls, where values are the keys, and labels are the values.
input_attrsarrayList 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_additionboolShow UI for adding new content, currently only used for the dropdown-pages control. Default false.jsonarrayDeprecated. Use WP_Customize_Control::json() instead.typestringControl 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_callbackcallableActive callback.
Default:
array()
Source
File: wp-includes/customize/class-wp-customize-new-menu-control.php. View all references
public function __construct( WP_Customize_Manager $manager, $id, array $args = array() ) {
_deprecated_function( __METHOD__, '4.9.0' );
parent::__construct( $manager, $id, $args );
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Customize_Control::__construct() wp-includes/class-wp-customize-control.php | Constructor. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
Changelog
| Version | Description |
|---|---|
| 4.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_new_menu_control/__construct