apply_filters( "pre_option_{$option}", bool|mixed $pre_option, string $option )

Filters the value of an existing option before it is retrieved.


Description Description

The dynamic portion of the hook name, $option, refers to the option name.

Passing a truthy value to the filter will short-circuit retrieving the option value, returning the passed value instead.


Parameters Parameters

$pre_option

(bool|mixed) Value to return instead of the option value. Default false to skip it.

$option

(string) Option name.


Top ↑

Source Source

File: wp-includes/option.php

View on Trac


Top ↑

Changelog Changelog

Changelog
Version Description
4.4.0 The $option parameter was added.
1.5.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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