Make WordPress Core

Changeset 30626

Timestamp:
11/29/2014 07:25:36 PM (10 years ago)
Author:
boonebgorges
Message:

In get_default_post_to_edit(), let 'post_name' be passed to filter.

Previously, it was being overridden after the default post had been inserted
into the database, making it cumbersome to override with the 'wp_insert_post_data'
filter.

Props danielbachhuber.
Fixes #29847.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/post.php

    r30364 r30626  
    556556        $post->post_date_gmt = '';
    557557        $post->post_password = '';
     558
    558559        $post->post_type = $post_type;
    559560        $post->post_status = 'draft';
     
    599600     */
    600601    $post->post_excerpt = apply_filters( 'default_excerpt', $post_excerpt, $post );
    601     $post->post_name = '';
    602602
    603603    return $post;
Note: See TracChangeset for help on using the changeset viewer.