WP_Customize_Media_Control::__construct() WordPress Method

The WP_Customize_Media_Control::__construct() method is used to create a new media control object. This object can be used to manage and control media objects within the WordPress customizer. The media control object allows for the selection, upload, and management of media objects such as images, videos, and audio files.

WP_Customize_Media_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.

Default value: array()


Top ↑

Source

File: wp-includes/customize/class-wp-customize-media-control.php

	public function __construct( $manager, $id, $args = array() ) {
		parent::__construct( $manager, $id, $args );

		$this->button_labels = wp_parse_args( $this->button_labels, $this->get_default_button_labels() );
	}


Top ↑

Changelog

Changelog
VersionDescription
4.2.0Moved from WP_Customize_Upload_Control.
4.1.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.