mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Mark menu items tied to invalid taxonomies and post types as invalid. props ocean90, see #13958.
git-svn-id: https://develop.svn.wordpress.org/trunk@18260 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -387,6 +387,16 @@ body {
|
||||
-khtml-border-radius: 3px;
|
||||
}
|
||||
|
||||
#menu-to-edit .menu-item-invalid .menu-item-handle {
|
||||
background-color: #f6c9cc; /* Fallback */
|
||||
background-image: -ms-linear-gradient(bottom, #f6c9cc, #fdf8ff); /* IE10 */
|
||||
background-image: -moz-linear-gradient(bottom, #f6c9cc, #fdf8ff); /* Firefox */
|
||||
background-image: -o-linear-gradient(bottom, #f6c9cc, #fdf8ff); /* Opera */
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(#f6c9cc), to(#fdf8ff)); /* old Webkit */
|
||||
background-image: -webkit-linear-gradient(bottom, #f6c9cc, #fdf8ff); /* new Webkit */
|
||||
background-image: linear-gradient(bottom, #f6c9cc, #fdf8ff); /* proposed W3C Markup */
|
||||
}
|
||||
|
||||
.menu-item-edit-active .menu-item-handle {
|
||||
-moz-border-radius: 3px 3px 0 0;
|
||||
-webkit-border-bottom-right-radius: 0;
|
||||
|
||||
@@ -67,7 +67,11 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
|
||||
|
||||
$title = $item->title;
|
||||
|
||||
if ( isset( $item->post_status ) && 'draft' == $item->post_status ) {
|
||||
if ( ! empty( $item->_invalid ) ) {
|
||||
$classes[] = 'menu-item-invalid';
|
||||
/* translators: %s: title of menu item which is invalid */
|
||||
$title = sprintf( __( '%s (Invalid)' ), $item->title );
|
||||
} elseif ( isset( $item->post_status ) && 'draft' == $item->post_status ) {
|
||||
$classes[] = 'pending';
|
||||
/* translators: %s: title of menu item in draft status */
|
||||
$title = sprintf( __('%s (Pending)'), $item->title );
|
||||
|
||||
Reference in New Issue
Block a user