Make WordPress Core

Ticket #28006: 28006.3.diff

File 28006.3.diff, 972 bytes (added by hlashbrooke, 9 years ago)

Removes 'Draft:' from post title, but leaves body class in place

  • wp-includes/post-template.php

     
    145145                         */
    146146                        $private_title_format = apply_filters( 'private_title_format', __( 'Private: %s' ), $post );
    147147                        $title = sprintf( $private_title_format, $title );
    148                 } else if ( isset( $post->post_status ) && 'draft' == $post->post_status ) {
    149 
    150                         /**
    151                          * Filter the text prepended to the post title of draft posts.
    152                          *
    153                          * The filter is only applied on the front end.
    154                          *
    155                          * @since 4.0.0
    156                          *
    157                          * @param string  $prepend Text displayed before the post title.
    158                          *                         Default 'Draft: %s'.
    159                          * @param WP_Post $post    Current post object.
    160                          */
    161                         $draft_title_format = apply_filters( 'draft_title_format', __( 'Draft: %s' ), $post );
    162                         $title = sprintf( $draft_title_format, $title );
    163148                }
    164149        }
    165150