option_
Filter HookDescription
Pre-filters captured option values before retrieving.Hook Information
File Location |
wp-includes/class-wp-customize-widgets.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2177 |
Hook Parameters
Type | Name | Description |
---|---|---|
mixed
|
$value
|
Value to return instead of the option value. |
Usage Examples
Basic Usage
<?php
// Hook into option_
add_filter('option_', 'my_custom_filter', 10, 1);
function my_custom_filter($value) {
// Your custom filtering logic here
return $value;
}
Source Code Context
wp-includes/class-wp-customize-widgets.php:2177
- How this hook is used in WordPress core
<?php
2172
2173 if ( isset( $this->_captured_options[ $option_name ] ) ) {
2174 $value = $this->_captured_options[ $option_name ];
2175
2176 /** This filter is documented in wp-includes/option.php */
2177 $value = apply_filters( 'option_' . $option_name, $value, $option_name );
2178 }
2179
2180 return $value;
2181 }
2182
PHP Documentation
<?php
/**
* Pre-filters captured option values before retrieving.
*
* @since 3.9.0
*
* @param mixed $value Value to return instead of the option value.
* @return mixed Filtered option value.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/class-wp-customize-widgets.php
Related Hooks
Related hooks will be displayed here in future updates.