Make WordPress Core


Ignore:
Timestamp:
06/11/2011 12:55:48 AM (13 years ago)
Author:
nacin
Message:

Mark menu items tied to invalid taxonomies and post types as invalid. props ocean90, see #13958.

File:
1 edited

Legend:

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

    r18110 r18260  
    6868        $title = $item->title;
    6969
    70         if ( isset( $item->post_status ) && 'draft' == $item->post_status ) {
     70        if ( ! empty( $item->_invalid ) ) {
     71            $classes[] = 'menu-item-invalid';
     72            /* translators: %s: title of menu item which is invalid */
     73            $title = sprintf( __( '%s (Invalid)' ), $item->title );
     74        } elseif ( isset( $item->post_status ) && 'draft' == $item->post_status ) {
    7175            $classes[] = 'pending';
    7276            /* translators: %s: title of menu item in draft status */
Note: See TracChangeset for help on using the changeset viewer.