• Hi,

    I noticed from the documentation that you are supposed to be able to hook into the new WordPress 2.7 admin shortcuts menu (but it doesn’t say how). Does anyone know what new hook(s) are available to be able to add new shortcut menu items, and preferably new menus that sit along side the shortcuts menu in the header bar. You would assume that this would be similar to creating a new top level menu item (but in the header area, by the shortcuts menu), but there is no information around in the documentation that I can find. Anyone know more about this, or have an example etc?

    Thanks,

    David

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter gwycon

    (@gwycon)

    I know I can add my own menu underneath the shortcuts menu, such as the ‘Ozh’ Admin Drop Down Menu’, but I can’t find any hooks that specifically refer to the new shortcuts menu or header bar.

    Thread Starter gwycon

    (@gwycon)

    Ok, so after a little digging around in the WordPress core, the admin-header.php file (in the wp-admin folder) contains the code for the admin header.

    <div id="wphead-info">
     <div id="user_info">
      <?php printf(__('Howdy, <a href="%1$s" title="Edit your profile">%2$s</a>'), 'profile.php', $user_identity) ?>
      <?php if ( ! $is_opera ) { ?><span class="turbo-nag hidden"> | <a href="tools.php"><?php _e('Turbo') ?></a></span><?php } ?> |
      <a href="<?php echo wp_logout_url() ?>" title="<?php _e('Log Out') ?>"><?php _e('Log Out'); ?></a>
    
     </div>
     <?php favorite_actions(); ?>
    </div>

    that points to a favorite_actions() funtion.

    Now, if we take a look at this function we see that we can add or remove existing items from the short cuts menu as required by using the favorite_actions filter, $actions = apply_filters('favorite_actions', $actions);.

    At least that is something even thought there is no hook as yet to directly tap into the admin header directly, to create menus along side the short cuts drop down menu.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugin hook for the new admin shortcuts menu?’ is closed to new replies.