wp_admin_bar_render

SummerySummery

Renders the admin bar to the page based on the $wp_admin_bar->menu member var.

Syntax

wp_admin_bar_render()

DescriptionDescription

This is called very early on the ‘wp_body_open’ action so that it will render before anything else being added to the page body.

For backward compatibility with themes not using the ‘wp_body_open’ action, the function is also called late on ‘wp_footer’.

It includes the ‘admin_bar_menu’ action which should be used to hook in and add new menus to the admin bar. That way you can be sure that you are adding at most optimal point, right before the admin bar is rendered. This also gives you access to the $post global, among others.

SourceSource

File: wp-includes/admin-bar.php


			

ChangelogChangelog

Changelog
Version Description
5.4.0 Called on 'wp_body_open' action first, with 'wp_footer' as a fallback.
3.1.0 Introduced.
Scroll to Top