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.
Return
(WP_Customize_Setting|void) The setting, if set.
Source
File: wp-includes/class-wp-customize-manager.php
public function get_setting( $id ) { if ( isset( $this->settings[ $id ] ) ) { return $this->settings[ $id ]; } }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |