option_{$option}
最后更新于:2021-11-27 12:29:05
apply_filters( “option_{$option}”, mixed $value, string $option )
Filters the value of an existing option.
参数
- $value
-
(mixed)
Value of the option. If stored serialized, it will be unserialized prior to being returned. - $option
-
(string)
Option name.
源文件
文件: gc-includes/option.php
add_filter( 'option_blogdescription', 'my_theme_filter_blogdescription' ); function my_theme_filter_blogdescription( $description ) { if ( ! is_archive() ) { return $description; } global $page, $paged; if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { $description .= $description . sprintf( __( ' Page %d' ), max( $paged, $page ) ); } return $description; }