apply filter for optionsframework_admin_bar ?
aprakasa opened this issue · 3 comments
aprakasa commented
Hi Devin,
Since optionsframework_menu
is filterable, why not apply filters for optionsframework_admin_bar
as well. The admin bar menu for Theme Options will not work anymore if the parent slug has changed.
Something like this maybe:
function optionsframework_admin_bar() {
$menu = $this->menu_settings();
global $wp_admin_bar;
$args = apply_filters( 'optionsframework_admin_bar', array(
'parent' => 'appearance',
'id' => 'of_theme_options',
'title' => __( 'Theme Options', 'optionsframework' ),
'href' => admin_url( 'themes.php?page=' . $menu['menu_slug'] )
));
$wp_admin_bar->add_menu( $args );
}
What do you think?
devinsays commented
Good thought. I had forgotten about the menu link.
Want to send a pull request? If not, I can take care of it.
aprakasa commented
You can take care of it since only few line of code 😃
Thanks Devin
devinsays commented
Feel free to test. Thanks for the suggestion!