Make WordPress Core


Ignore:
Timestamp:
07/02/2015 10:31:58 PM (9 years ago)
Author:
obenland
Message:

Use get_default_comment_status() globally.

Also makes the filter name static and passes the post type for context.

Props valendesigns.
Fixes #31168.

File:
1 edited

Legend:

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

    r32800 r33054  
    611611        $post->to_ping = '';
    612612        $post->pinged = '';
    613         $post->comment_status = get_option( 'default_comment_status' );
    614         $post->ping_status = get_option( 'default_ping_status' );
     613        $post->comment_status = get_default_comment_status( $post_type );
     614        $post->ping_status = get_default_comment_status( $post_type, 'pingback' );
    615615        $post->post_pingback = get_option( 'default_pingback_flag' );
    616616        $post->post_category = get_option( 'default_category' );
Note: See TracChangeset for help on using the changeset viewer.