Nav Menus: Avoid a PHP Notice when a menu contains a now unregistered post type archive.
Props kucrut. Fixes #34449 for trunk. Built from https://develop.svn.wordpress.org/trunk@36095 git-svn-id: http://core.svn.wordpress.org/trunk@36060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -80,7 +80,9 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
|
||||
$original_title = get_the_title( $original_object->ID );
|
||||
} elseif ( 'post_type_archive' == $item->type ) {
|
||||
$original_object = get_post_type_object( $item->object );
|
||||
$original_title = $original_object->labels->archives;
|
||||
if ( $original_object ) {
|
||||
$original_title = $original_object->labels->archives;
|
||||
}
|
||||
}
|
||||
|
||||
$classes = array(
|
||||
|
||||
Reference in New Issue
Block a user