| 1 | Index: wp-includes/admin-bar.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/admin-bar.php (revision 22265) |
|---|
| 4 | +++ wp-includes/admin-bar.php (working copy) |
|---|
| 5 | @@ -454,7 +454,7 @@ |
|---|
| 6 | if ( empty( $current_object ) ) |
|---|
| 7 | return; |
|---|
| 8 | |
|---|
| 9 | - if ( ! empty( $current_object->post_type ) |
|---|
| 10 | + if ( ! empty( $current_object->post_type ) && $current_object->ID |
|---|
| 11 | && ( $post_type_object = get_post_type_object( $current_object->post_type ) ) |
|---|
| 12 | && current_user_can( $post_type_object->cap->edit_post, $current_object->ID ) |
|---|
| 13 | && $post_type_object->show_ui && $post_type_object->show_in_admin_bar ) |
|---|