Can admin_bar_menu or another action be used to modify the Dashboard admin bar?
-
I have used
add_action('admin_bar_menu', 'modify_admin_bar')
to change the admin bar on the “front end” of WordPress (the site the user sees). However, it seems thatmodify_admin_bar()
is not called before the admin bar is rendered on the “back end” (the Dashboard or admin side of WordPress).How can I modify the admin bar as it is presented on the admin side of WordPress?
Here’s an example…
add_action( 'admin_bar_menu', 'modify_admin_bar'); function modify_admin_bar() { error_log('admin barring'); }
In this example, my error log shows “admin barring” every time I refresh a page on the user side of WordPress, but never shows “admin barring” when I refresh the admin side (the Dashboard) of WordPress. It does not seem that the function gets called from the admin side. I am running WP 3.5, but have confirmed the same behavior in 3.4.2.
- The topic ‘Can admin_bar_menu or another action be used to modify the Dashboard admin bar?’ is closed to new replies.