dynamic_sidebar_params
apply_filters( ‘dynamic_sidebar_params’, array $params )
过滤器::过滤传递给小部件显示回调的参数。
Filter Hook: Filters the parameters passed to a widget’s display callback.
说明(Description)
注意:过滤器在前端和后端都进行评估,包括在窗口小部件屏幕上的非活动窗口小部件侧栏。
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$params | (array) | “args”(数组)小部件显示参数的数组。 |
‘name'(string) Name of the sidebar the widget is assigned to. | ‘id’(string) ID of the sidebar the widget is assigned to. | “description”(字符串)侧边栏说明。 |
‘class'(string) CSS class applied to the sidebar container. | ‘before_widget’(string) HTML markup to prepend to each widget in the sidebar. | “after_widget”(字符串)附加到侧栏中每个小部件的HTML标记。 |
‘before_title'(string) HTML markup to prepend to the widget title when displayed. | ‘after_title’(string) HTML markup to append to the widget title when displayed. | 小部件的“widget_id”(字符串)id。 |
‘widget_name'(string) Name of the widget. | ‘widget_args’(array) An array of multi-widget arguments. | “number”(int)用于同一小部件的倍数的数字增量。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.5.0 | wp-includes/widgets.php:773 | 1 | 0 |
dynamic_sidebar_params 为WP2原创文章,链接:https://www.wp2.cn/hook/dynamic_sidebar_params/