Warning: This method has been deprecated. Use WP_Customize_Control::__construct() instead.

WP_Customize_New_Menu_Control::__construct() WordPress Method

The WP_Customize_New_Menu_Control::__construct( $manager ) method is used to create a new custom menu control. This class extends the WP_Customize_Control class. It allows you to add a custom menu to your WordPress site. You can use this control to: Add a custom menu to your WordPress site. Change the name of themenu. Set the number of levels to display in the menu. Set the depth of the menu. Add a custom CSS class to the menu. Set the position of the menu. Set the URL for the menu. Set the description for the menu. The WP_Customize_New_Menu_Control::__construct( $manager ) method takes one parameter: $manager (WP_Customize_Manager) – The customizer manager object.

WP_Customize_New_Menu_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)The control ID.

$args

(array)(Optional) Arguments to override class property defaults. See WP_Customize_Control::__construct() for information on accepted arguments.

Default value: array()


Top ↑

Source

File: wp-includes/customize/class-wp-customize-new-menu-control.php

	public function __construct( WP_Customize_Manager $manager, $id, array $args = array() ) {
		_deprecated_function( __METHOD__, '4.9.0' );
		parent::__construct( $manager, $id, $args );
	}


Top ↑

Changelog

Changelog
VersionDescription
4.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by the Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.