wpseek.com
WordPress开发者和主题制作者的搜索引擎



dynamic_sidebar › WordPress动作钩子

Since3.0.0
已弃用n/a
› do_action( 'dynamic_sidebar', $wp_registered_widgets[ $id ] )
参数:
  • () widget { An associative array of widget arguments. @type string $name Name of the widget. @type string $id Widget ID. @type callable $callback When the hook is fired on the front end, `$callback` is an array containing the widget object. Fired on the back end, `$callback` is 'wp_widget_control', see `$_callback`. @type array $params An associative array of multi-widget arguments. @type string $classname CSS class applied to the widget container. @type string $description The widget description. @type array $_callback When the hook is fired on the back end, `$_callback` is populated with an array containing the widget object, see `$callback`. }
    Required: Yes
定义在:
文档:

Fires before a widget's display callback is called.

Note: The action fires on both the front end and back end, including for widgets in the Inactive Widgets sidebar on the Widgets screen. The action is not fired for empty sidebars.




源码

do_action( 'dynamic_sidebar', $wp_registered_widgets[ $id ] );