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/post.php

    r32654 r33054  
    130130    check_admin_referer( 'add-' . $post->post_type );
    131131
    132     $_POST['comment_status'] = get_option( 'default_comment_status' );
    133     $_POST['ping_status'] = get_option( 'default_ping_status' );
     132    $_POST['comment_status'] = get_default_comment_status( $post->post_type );
     133    $_POST['ping_status']    = get_default_comment_status( $post->post_type, 'pingback' );
    134134
    135135    edit_post();
Note: See TracChangeset for help on using the changeset viewer.