WP_Customize_Widgets::capture_filter_pre_get_option( mixed $value )

Pre-filters captured option values before retrieving.


Description Description


Parameters Parameters

$value

(mixed) (Required) Value to return instead of the option value.


Top ↑

Return Return

(mixed) Filtered option value.


Top ↑

Source Source

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

Top ↑

Changelog Changelog

Changelog
Version Description
3.9.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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