Make WordPress Core

Changeset 15047


Ignore:
Timestamp:
05/28/2010 08:41:39 PM (15 years ago)
Author:
nacin
Message:

Don't show (pending) in JS mode for nav menus UI. props filosofo, fixes #13604.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r15008 r15047  
    824824        $menu_obj = get_post( $menu_item_id );
    825825        if ( ! empty( $menu_obj->ID ) ) {
    826             $menu_items[] = wp_setup_nav_menu_item( $menu_obj );
     826            $menu_obj = wp_setup_nav_menu_item( $menu_obj );
     827            $menu_obj->label = $menu_obj->title; // don't show "(pending)" in ajax-added items
     828            $menu_items[] = $menu_obj;
    827829        }
    828830    }
  • trunk/wp-admin/includes/nav-menu.php

    r15045 r15047  
    7373            $title = sprintf( __('%s (Pending)'), $item->title );
    7474        }
     75
     76        $title = empty( $item->label ) ? $title : $item->label;
    7577
    7678        ?>
Note: See TracChangeset for help on using the changeset viewer.