diff --git src/wp-includes/admin-bar.php src/wp-includes/admin-bar.php
index cd1bb82..ea1127e 100644
|
|
function wp_admin_bar_edit_menu( $wp_admin_bar ) { |
530 | 530 | if ( ! empty( $current_object->post_type ) |
531 | 531 | && ( $post_type_object = get_post_type_object( $current_object->post_type ) ) |
532 | 532 | && current_user_can( 'edit_post', $current_object->ID ) |
533 | | && $post_type_object->show_ui && $post_type_object->show_in_admin_bar ) |
| 533 | && $post_type_object->show_ui && $post_type_object->show_in_admin_bar |
| 534 | && $edit_post_link = get_edit_post_link( $current_object->ID ) ) |
534 | 535 | { |
535 | 536 | $wp_admin_bar->add_menu( array( |
536 | 537 | 'id' => 'edit', |
537 | 538 | 'title' => $post_type_object->labels->edit_item, |
538 | | 'href' => get_edit_post_link( $current_object->ID ) |
| 539 | 'href' => $edit_post_link |
539 | 540 | ) ); |
540 | 541 | } elseif ( ! empty( $current_object->taxonomy ) |
541 | 542 | && ( $tax = get_taxonomy( $current_object->taxonomy ) ) |