Make WordPress Core

Ticket #28006: 28006.diff

File 28006.diff, 1.8 KB (added by hlashbrooke, 10 years ago)

Changes as listed in ticket description

  • wp-includes/admin-bar.php

     
    520520                        && current_user_can( 'edit_post', $current_object->ID )
    521521                        && $post_type_object->show_ui && $post_type_object->show_in_admin_bar )
    522522                {
     523                        $title = $post_type_object->labels->edit_item;
     524                        if( 'draft' == $current_object->post_status ) {
     525                                $title .= ' (' . __( 'Draft' ) . ')';
     526                        }
     527
    523528                        $wp_admin_bar->add_menu( array(
    524529                                'id' => 'edit',
    525                                 'title' => $post_type_object->labels->edit_item,
     530                                'title' => $title,
    526531                                'href' => get_edit_post_link( $current_object->ID )
    527532                        ) );
    528533                } elseif ( ! empty( $current_object->taxonomy )
  • wp-includes/link-template.php

     
    12081208        if ( !$url = get_edit_post_link( $post->ID ) )
    12091209                return;
    12101210
    1211         if ( null === $link )
     1211        if ( null === $link ) {
    12121212                $link = __('Edit This');
     1213                if( 'draft' == $post->post_status ) {
     1214                        $link .= ' (' . __( 'Draft' ) . ')';
     1215                }
     1216        }
    12131217
    12141218        $post_type_obj = get_post_type_object( $post->post_type );
    12151219        $link = '<a class="post-edit-link" href="' . $url . '">' . $link . '</a>';
  • wp-includes/post-template.php

     
    521521                if ( isset( $post->post_type ) ) {
    522522                        $classes[] = 'single-' . sanitize_html_class($post->post_type, $post_id);
    523523                        $classes[] = 'postid-' . $post_id;
     524                        $classes[] = 'single-status-' . $post->post_status;
    524525
    525526                        // Post Format
    526527                        if ( post_type_supports( $post->post_type, 'post-formats' ) ) {