HTTP/2 301
server: nginx
date: Sat, 11 Oct 2025 14:13:17 GMT
content-type: text/html; charset=UTF-8
x-olaf: ⛄
vary: accept, content-type
x-redirect-by: WordPress
location: https://developer.wordpress.org/reference/classes/wp_customize_widgets/get_captured_option/
x-frame-options: SAMEORIGIN
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
HTTP/2 200
server: nginx
date: Sat, 11 Oct 2025 14:13:18 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
WP_Customize_Widgets::get_captured_option() – Method | Developer.WordPress.org
WordPress Developer Resources
WP_Customize_Widgets::get_captured_option()
WP_Customize_Widgets::get_captured_option( string $option_name, mixed $default_value = false ): mixed
Retrieves the option that was captured from being saved.
$option_name
stringrequiredOption name.
$default_value
mixedoptionalDefault value to return if the option does not exist.
Default:false
mixed Value set for the option.
protected function get_captured_option( $option_name, $default_value = false ) {
if ( array_key_exists( $option_name, $this->_captured_options ) ) {
$value = $this->_captured_options[ $option_name ];
} else {
$value = $default_value;
}
return $value;
}
View all references View on Trac View on GitHub
Version | Description |
---|
4.2.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.