Changeset 15250 for trunk/wp-admin/includes/nav-menu.php
- Timestamp:
- 06/14/2010 08:40:52 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/nav-menu.php
r15220 r15250 72 72 73 73 if ( isset( $item->post_status ) && 'draft' == $item->post_status ) { 74 $classes[] = 'draft'; 75 /* translators: %s: title of menu item in draft status */ 76 $title = sprintf( __('%s (Draft)'), $item->title ); 74 $original_status = get_post_status_object( $original_object->post_status ); 75 $classes[] = "draft post-status-$original_object->post_status"; 76 /* translators: 1: title of menu item in draft status, 2: actual post status. */ 77 $title = sprintf( __('%1$s (%2$s)'), $item->title, $original_status->label ); 77 78 } elseif ( isset( $item->post_status ) && 'pending' == $item->post_status ) { 78 $classes[] = ' pending';79 $classes[] = 'unsaved'; 79 80 /* translators: %s: title of menu item in pending status */ 80 $title = sprintf( __('%s ( Pending)'), $item->title );81 $title = sprintf( __('%s (Unsaved)'), $item->title ); 81 82 } 82 83 … … 177 178 <?php if( 'custom' != $item->type ) : ?> 178 179 <p class="link-to-original"> 179 <?php printf( __('Original: %s'), '<a href="' . esc_attr( $item->url ) . '">' . esc_html( $original_title ) . '</a>' ); ?> 180 <?php 181 $post_status = get_post_status( $item->object_id ); 182 if( 'publish' == $post_status ) { 183 printf( __('Original: %s'), '<a href="' . esc_attr( $item->url ) . '">' . esc_html( $original_title ) . '</a>', '' ); 184 } else { 185 $original_url = $item->url; 186 if( 'trash' == $post_status ) { 187 $original_url = add_query_arg( 188 array( 189 'post_status' => 'trash', 190 'post_type' => $item->object, 191 ), 192 admin_url( 'edit.php' ) 193 ); 194 } 195 $post_status_obj = get_post_status_object( $post_status ); 196 /* translators: 1: title, 2: post status. */ 197 printf( __('Original: %1$s (%2$s)'), '<a href="' . esc_attr( $original_url ) . '">' . esc_html( $original_title ) . '</a>', 198 $post_status_obj->label ); 199 } 200 ?> 180 201 </p> 181 202 <?php endif; ?> … … 1090 1111 1091 1112 if ( $some_pending_menu_items ) 1092 $result .= '<div class="updated inline"><p>' . __('Click Save Menu to make pendingmenu items public.') . '</p></div>';1113 $result .= '<div class="updated inline"><p>' . __('Click Save Menu to make unsaved menu items public.') . '</p></div>'; 1093 1114 1094 1115 $result .= '<ul class="menu" id="menu-to-edit"> ';
Note: See TracChangeset
for help on using the changeset viewer.