wphooks.info - pre_option_{$option}

pre_option_{$option}

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-includes/option.php:
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
	 * @since 4.9.0 The `$default` parameter was added.
	 *
	 * @param bool|mixed $pre_option The value to return instead of the option value. This differs from
	 *                               `$default`, which is used as the fallback value in the event the option
	 *                               doesn't exist elsewhere in get_option(). Default false (to skip past the
	 *                               short-circuit).
	 * @param string     $option     Option name.
	 * @param mixed      $default    The fallback value to return if the option does not exist.
	 *                               Default is false.
	 */
	$pre = apply_filters( "pre_option_{$option}", false, $option, $default );

	if ( false !== $pre ) {
		return $pre;
	}

	if ( defined( 'WP_SETUP_CONFIG' ) ) {
		return false;
	}