GC_Customize_Widgets::capture_filter_pre_get_option()
最后更新于:2021-11-27 09:42:26
GC_Customize_Widgets::capture_filter_pre_get_option( mixed$value)Pre-filters captured option values before retrieving.
参数
- $value
-
(mixed) (Required) Value to return instead of the option value.
响应
(mixed) Filtered option value.
源文件
文件: gc-includes/class-gc-customize-widgets.php
public function capture_filter_pre_get_option( $value ) {
$option_name = preg_replace( '/^pre_option_/', '', current_filter() );
if ( isset( $this->_captured_options[ $option_name ] ) ) {
$value = $this->_captured_options[ $option_name ];
/** This filter is documented in gc-includes/option.php */
$value = apply_filters( 'option_' . $option_name, $value, $option_name );
}
return $value;
}