get_sidebar

动作钩子


do_action( 'get_sidebar', $name, $args )
参数
  • (string|null)
    $name
    Name of the specific sidebar file to use. Null for the default sidebar.
    Required:
  • (array)
    $args
    Additional arguments passed to the sidebar template.
    Required:
定义位置
  • wp-includes/general-template.php
    , line 126
引入
5.5.0
弃用

Fires before the sidebar template file is loaded.

do_action( 'get_sidebar', $name, $args );