blog_option_{$option} WordPress Filter Hook

The blog_option_{$option} hook is used to filter the value of a blog option before it is retrieved. This hook is useful for modifying default blog options, or for creating new options if none already exist. The first parameter passed to the hook function is the value of the option being retrieved. The second parameter is the name of the option. The third parameter is the blog id. The hook function must return a value. The value returned will be used as the value of the option. This hook can be used in a plugin or in a theme's functions.php file.

apply_filters( "blog_option_{$option}", string $value, int $id ) #

Filters a blog option value.


Description

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


Top ↑

Parameters

$value

(string)The option value.

$id

(int)Blog ID.


Top ↑

Source

File: wp-includes/ms-blogs.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.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.