Ticket #15054: get_option_filter.patch
File get_option_filter.patch, 1.0 KB (added by , 14 years ago) |
---|
-
wp-includes/functions.php
296 296 * Any value other than false will "short-circuit" the retrieval of the option 297 297 * and return the returned value. You should not try to override special options, 298 298 * but you will not be prevented from doing so. 299 * @uses apply_filters() Calls 'get_option' before checking the option passing the 300 * option name and the default value as paramaters to be filtered. 301 * Any value other than false will "short-circuit" the retrieval of the option 299 302 * @uses apply_filters() Calls 'option_$option', after checking the option, with 300 303 * the option value. 301 304 * … … 314 317 if ( empty($option) ) 315 318 return false; 316 319 320 $filtered_value = apply_filters('get_option', false, $option, $default); 321 if (false !== $filtered_value) 322 return $filtered_value; 323 317 324 if ( defined( 'WP_SETUP_CONFIG' ) ) 318 325 return false; 319 326