WP_Customize_Widgets::get_captured_option( string $option_name, mixed $default_value = false ): mixed

In this article

Retrieves the option that was captured from being saved.

Parameters

$option_namestringrequired
Option name.
$default_valuemixedoptional
Default value to return if the option does not exist.

Default:false

Return

mixed Value set for the option.

Source

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;
}

Changelog

VersionDescription
4.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.