[ XREF Home ] [ Index ]

PHP Cross Reference of WordPress Trunk

Provided by Yoast

title

Body

[close]

/wp-includes/ -> admin-bar.php (summary)

Admin Bar This code handles the building and rendering of the press bar.

File Size: 391 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 15 functions

  _wp_admin_bar_init()
  wp_admin_bar_render()
  wp_admin_bar_my_account_menu()
  wp_admin_bar_my_sites_menu()
  wp_admin_bar_shortlink_menu()
  wp_admin_bar_edit_menu()
  wp_admin_bar_new_content_menu()
  wp_admin_bar_comments_menu()
  wp_admin_bar_appearance_menu()
  wp_admin_bar_updates_menu()
  wp_admin_bar_header()
  _admin_bar_bump_cb()
  show_admin_bar()
  is_admin_bar_showing()
  _get_admin_bar_pref()

Functions
Functions that are not part of a class:

_wp_admin_bar_init()   X-Ref
Instantiate the admin bar object and set it up as a global for access elsewhere.

To hide the admin bar, you're looking in the wrong place. Unhooking this function will not
properly remove the admin bar. For that, use show_admin_bar(false) or the show_admin_bar filter.

return: bool Whether the admin bar was successfully initialized.

wp_admin_bar_render()   X-Ref
Render the admin bar to the page based on the $wp_admin_bar->menu member var.
This is called very late on the footer actions so that it will render after anything else being
added to the footer.

It includes the action "admin_bar_menu" 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.


wp_admin_bar_my_account_menu( $wp_admin_bar )   X-Ref
Add the "My Account" menu and all submenus.


wp_admin_bar_my_sites_menu( $wp_admin_bar )   X-Ref
Add the "My Sites/[Site Name]" menu and all submenus.


wp_admin_bar_shortlink_menu( $wp_admin_bar )   X-Ref
Provide a shortlink.


wp_admin_bar_edit_menu( $wp_admin_bar )   X-Ref
Provide an edit link for posts and terms.


wp_admin_bar_new_content_menu( $wp_admin_bar )   X-Ref
Add "Add New" menu.


wp_admin_bar_comments_menu( $wp_admin_bar )   X-Ref
Add edit comments link with awaiting moderation count bubble.


wp_admin_bar_appearance_menu( $wp_admin_bar )   X-Ref
Add "Appearance" menu with widget and nav menu submenu.


wp_admin_bar_updates_menu( $wp_admin_bar )   X-Ref
Provide an update link if theme/plugin/core updates are available.


wp_admin_bar_header()   X-Ref
Style and scripts for the admin bar.


_admin_bar_bump_cb()   X-Ref
Default admin bar callback.


show_admin_bar( $show )   X-Ref
Set the display status of the admin bar

This can be called immediately upon plugin load.  It does not need to be called from a function hooked to the init action.

param: bool $show Whether to allow the admin bar to show.
return: void

is_admin_bar_showing()   X-Ref
Determine whether the admin bar should be showing.

return: bool Whether the admin bar should be showing.

_get_admin_bar_pref( $context, $user = 0 )   X-Ref
Retrieve the admin bar display preference of a user based on context.

param: string $context Context of this preference check, either 'admin' or 'front'
param: int $user Optional. ID of the user to check, defaults to 0 for current user
return: bool Whether the admin bar should be showing for this user



Generated: Wed Jun 1 08:30:02 2011 Cross-referenced by PHPXref 0.7
Provided by Yoast and awesome WordPress Hosting