myblogs_options
云策文档标注
概述
myblogs_options 过滤器用于控制“我的站点”屏幕中“全局设置”部分的 HTML 标记显示。默认情况下,该部分被隐藏,通过此过滤器可以启用并添加全局或站点特定的设置。
关键要点
- 过滤器名称:myblogs_options
- 作用:过滤“我的站点”屏幕中“全局设置”部分的 HTML 标记
- 默认行为:全局设置部分隐藏,传递非空字符串可启用
- 参数:$settings_html(HTML 标记字符串,默认空)、$context(设置上下文,如 'global' 或站点特定,默认 'global')
- 引入版本:MU (3.0.0)
代码示例
$settings_html = apply_filters( 'myblogs_options', '', 'global' );
原文内容
Filters the settings HTML markup in the Global Settings section on the My Sites screen.
Description
By default, the Global Settings section is hidden. Passing a non-empty string to this filter will enable the section, and allow new settings to be added, either globally or for specific sites.
Parameters
$settings_htmlstring-
The settings HTML markup. Default empty.
$contextstring-
Context of the setting (global or site-specific). Default
'global'.
Source
$settings_html = apply_filters( 'myblogs_options', '', 'global' );
Changelog
| Version | Description |
|---|---|
| MU (3.0.0) | Introduced. |