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

    r33041 r33054  
    41124112     * @param string $status       Default status for the given post type,
    41134113     *                             either 'open' or 'closed'.
     4114     * @param string $post_type    Post type. Default is `post`.
    41144115     * @param string $comment_type Type of comment. Default is `comment`.
    41154116     */
    4116     return apply_filters( "get_{$post_type}_default_comment_status", $status, $comment_type );
     4117    return apply_filters( 'get_default_comment_status' , $status, $post_type, $comment_type );
    41174118}
    41184119
Note: See TracChangeset for help on using the changeset viewer.