Make WordPress Core


Ignore:
Timestamp:
11/29/2010 04:16:29 PM (14 years ago)
Author:
ryan
Message:

Default Add New menu link to first post type in list. Avoids empty href issues. see #15308

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r16609 r16610  
    206206        return;
    207207
    208     $wp_admin_bar->add_menu( array( 'id' => 'new-content', 'title' => _x( 'Add New', 'admin bar menu group label' ), 'href' => '', ) );
     208    $wp_admin_bar->add_menu( array( 'id' => 'new-content', 'title' => _x( 'Add New', 'admin bar menu group label' ), 'href' => admin_url( array_shift( array_keys( $actions ) ) ), ) );
    209209
    210210    foreach ( $actions as $link => $action ) {
Note: See TracChangeset for help on using the changeset viewer.