Skip to content

Instantly share code, notes, and snippets.

@Ataurr
Created April 25, 2016 11:56
Show Gist options
  • Save Ataurr/dbfc302537c10096fc503792d66e53f5 to your computer and use it in GitHub Desktop.
Save Ataurr/dbfc302537c10096fc503792d66e53f5 to your computer and use it in GitHub Desktop.
function startuplanding_admin_menu() {
global $wp_admin_bar;
$menu_id = 'xs';
$wp_admin_bar->add_menu(array('id' => $menu_id, 'title' => 'xs', 'href' => '#'));
$wp_admin_bar->add_menu(array('parent' => $menu_id, 'title' => __('Theme Settings'), 'id' => 'xs-theme-settings', 'href' => admin_url('admin.php?page=fw-settings')));
$wp_admin_bar->add_menu(array('parent' => 'xs-theme-settings', 'title' => __('Styling'), 'id' => 'xs-styling-settings', 'href' => admin_url('admin.php?page=fw-settings#fw-options-tab-styling_settings'), 'meta' => array('title' => 'Change color or fonts')));
$wp_admin_bar->add_menu(array('parent' => $menu_id, 'title' => __('Unyson Extensions'), 'id' => 'xs-unyson-extensions', 'href' => admin_url('admin.php?page=fw-extensions')));
}
add_action('admin_bar_menu', 'startuplanding_admin_menu', 2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment