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.
Parameters
- $value
(string)The option value.
- $id
(int)Blog ID.
Source
File: wp-includes/ms-blogs.php
Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |