pre_option_{$option}

pre_option_{$option}

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('pre_option_{$option}') is found 1 times:

  • /wp-includes/option.php line 132
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    * @param string $option        Option name.
     * @param mixed  $default_value The fallback value to return if the option does not exist.
     *                              Default false.
     */
    $pre = apply_filters( "pre_option_{$option}", false, $option, $default_value );
     
    /**
     * Filters the value of all existing options before it is retrieved.
     *
     * Returning a truthy value from the filter will effectively short-circuit retrieval
     * and return the passed value instead.

See this hook used in plugins: