Make WordPress Core

Ticket #27683: 27683.diff

File 27683.diff, 688 bytes (added by MikeHansenMe, 11 years ago)

patch based on comment

  • src/wp-includes/post.php

     
    31333133         * @param bool  $maybe_empty Whether the post should be considered "empty".
    31343134         * @param array $postarr     Array of post data.
    31353135         */
    3136         if ( apply_filters( 'wp_insert_post_empty_content', $maybe_empty, $postarr ) ) {
     3136        if ( $id = apply_filters( 'wp_insert_post_empty_content', $maybe_empty, $postarr ) ) {
    31373137                if ( $wp_error ) {
    31383138                        return new WP_Error( 'empty_content', __( 'Content, title, and excerpt are empty.' ) );
    31393139                } else {
    3140                         return 0;
     3140                        return $id;
    31413141                }
    31423142        }
    31433143