Uses
Uses | Description |
---|---|
wp-includes/plugin.php: current_filter() | Retrieve the name of the current filter or action. |
wp-includes/plugin.php: apply_filters() | Calls the callback functions that have been added to a filter hook. |
Pre-filters captured option values before retrieving.
(mixed) (Required) Value to return instead of the option value.
(mixed) Filtered option value.
File: wp-includes/class-wp-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 wp-includes/option.php */ $value = apply_filters( 'option_' . $option_name, $value, $option_name ); } return $value; }
Version | Description |
---|---|
3.9.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_widgets/capture_filter_pre_get_option