On this page
WP_Customize_Control::value( string $setting_key = 'default' ): mixed
Fetch a setting’s value.
Description
Grabs the main setting by default.
Parameters
$setting_keystring Optional-
Default:
'default'
Return
mixed The requested setting's value, if the setting exists.
Source
File: wp-includes/class-wp-customize-control.php. View all references
final public function value( $setting_key = 'default' ) {
if ( isset( $this->settings[ $setting_key ] ) ) {
return $this->settings[ $setting_key ]->value();
}
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Customize_Control::render_content() wp-includes/class-wp-customize-control.php | Render the control’s content. |
Changelog
| Version | Description |
|---|---|
| 3.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_control/value