get_sidebar

get_sidebar

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('get_sidebar') is found 1 times:

  • /wp-includes/general-template.php line 126
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    *
     * @param string|null $name Name of the specific sidebar file to use. Null for the default sidebar.
     * @param array       $args Additional arguments passed to the sidebar template.
     */
    do_action( 'get_sidebar', $name, $args );
     
    $templates = array();
    $name      = (string) $name;
    if ( '' !== $name ) {
        $templates[] = "sidebar-{$name}.php";
    }