GC_Customize_Widgets::get_captured_option()

最后更新于:2021-11-27 10:38:27

GC_Customize_Widgets::get_captured_option( string$option_name, mixed$default=false)

Retrieves the option that was captured from being saved.

参数

$option_name

(string) (Required) Option name.

$default

(mixed) (Optional) Default value to return if the option does not exist.

Default value: false

响应

(mixed) Value set for the option.

源文件

文件: gc-includes/class-gc-customize-widgets.php

	protected function get_captured_option( $option_name, $default = false ) {
		if ( array_key_exists( $option_name, $this->_captured_options ) ) {
			$value = $this->_captured_options[ $option_name ];
		} else {
			$value = $default;
		}
		return $value;
	}