option_{$option} WordPress Filter Hook

The {$option} hook is used to modify various aspects of the WordPress core. It is one of the most versatile hooks available, and can be used to modify nearly any aspect of WordPress.

apply_filters( "option_{$option}", mixed $value, string $option ) #

Filters the value of an existing option.


Description

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


Top ↑

Parameters

$value

(mixed)Value of the option. If stored serialized, it will be unserialized prior to being returned.

$option

(string)Option name.


Top ↑

More Information

This hook allows you to filter any option after database lookup.


Top ↑

Source

File: wp-includes/option.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.0The $option parameter was added.
3.0.0
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More