函数原型
option_update_filter( array $options ): array
函数描述
Refreshes the value of the allowed options list available via the ‘allowed_options’ hook.
是否弃用
未弃用
函数参数
-
$options
array
Required
函数返回值
array
函数位置
File: wp-admin/includes/plugin.php.
函数源码
function option_update_filter( $options ) {
global $new_allowed_options;
if ( is_array( $new_allowed_options ) ) {
$options = add_allowed_options( $new_allowed_options, $options );
}
return $options;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 5.5.0 | $new_whitelist_options was renamed to $new_allowed_options.Please consider writing more inclusive code. |
| 2.7.0 | Introduced. |

