Make WordPress Core

Ticket #29538: 29538.patch

File 29538.patch, 973 bytes (added by boonebgorges, 9 years ago)
  • src/wp-includes/admin-bar.php

    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 ) { 
    530530                if ( ! empty( $current_object->post_type )
    531531                        && ( $post_type_object = get_post_type_object( $current_object->post_type ) )
    532532                        && 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 ) )
    534535                {
    535536                        $wp_admin_bar->add_menu( array(
    536537                                'id' => 'edit',
    537538                                'title' => $post_type_object->labels->edit_item,
    538                                 'href' => get_edit_post_link( $current_object->ID )
     539                                'href' => $edit_post_link
    539540                        ) );
    540541                } elseif ( ! empty( $current_object->taxonomy )
    541542                        && ( $tax = get_taxonomy( $current_object->taxonomy ) )