WP_Customize_Manager::get_setting() WordPress Method

The WP_Customize_Manager::get_setting() method is used to get a setting object by name. This method is useful for retrieving a specific setting object for use in custom code. It can also be used to check if a setting exists by name.

WP_Customize_Manager::get_setting( string $id ) #

Retrieves a customize setting.


Parameters

$id

(string)(Required)Customize Setting ID.


Top ↑

Return

(WP_Customize_Setting|void) The setting, if set.


Top ↑

Source

File: wp-includes/class-wp-customize-manager.php

	public function get_setting( $id ) {
		if ( isset( $this->settings[ $id ] ) ) {
			return $this->settings[ $id ];
		}
	}


Top ↑

Changelog

Changelog
VersionDescription
3.4.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.

Show More