You need to hook into 'wp_before_admin_bar_render'
, not 'admin_bar_menu'
. According to the documentation an action attached to this hook fires before the admin bar is rendered.
You need to hook into 'wp_before_admin_bar_render'
, not 'admin_bar_menu'
. According to the documentation an action attached to this hook fires before the admin bar is rendered.