Changeset 33054
- Timestamp:
- 07/02/2015 10:31:58 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r32800 r33054 611 611 $post->to_ping = ''; 612 612 $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' ); 615 615 $post->post_pingback = get_option( 'default_pingback_flag' ); 616 616 $post->post_category = get_option( 'default_category' ); -
trunk/src/wp-admin/post.php
r32654 r33054 130 130 check_admin_referer( 'add-' . $post->post_type ); 131 131 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' ); 134 134 135 135 edit_post(); -
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r32993 r33054 4810 4810 break; 4811 4811 default: 4812 $comment_status = get_ option('default_comment_status');4812 $comment_status = get_default_comment_status( $post_type ); 4813 4813 break; 4814 4814 } … … 4823 4823 break; 4824 4824 default: 4825 $comment_status = get_ option('default_comment_status');4825 $comment_status = get_default_comment_status( $post_type ); 4826 4826 break; 4827 4827 } 4828 4828 } 4829 4829 } else { 4830 $comment_status = get_ option('default_comment_status');4830 $comment_status = get_default_comment_status( $post_type ); 4831 4831 } 4832 4832 … … 4841 4841 break; 4842 4842 default: 4843 $ping_status = get_ option('default_ping_status');4843 $ping_status = get_default_comment_status( $post_type, 'pingback' ); 4844 4844 break; 4845 4845 } … … 4853 4853 break; 4854 4854 default: 4855 $ping_status = get_ option('default_ping_status');4855 $ping_status = get_default_comment_status( $post_type, 'pingback' ); 4856 4856 break; 4857 4857 } 4858 4858 } 4859 4859 } else { 4860 $ping_status = get_ option('default_ping_status');4860 $ping_status = get_default_comment_status( $post_type, 'pingback' ); 4861 4861 } 4862 4862 … … 5121 5121 break; 5122 5122 default: 5123 $comment_status = get_ option('default_comment_status');5123 $comment_status = get_default_comment_status( $post_type ); 5124 5124 break; 5125 5125 } … … 5134 5134 break; 5135 5135 default: 5136 $comment_status = get_ option('default_comment_status');5136 $comment_status = get_default_comment_status( $post_type ); 5137 5137 break; 5138 5138 } … … 5150 5150 break; 5151 5151 default: 5152 $ping_status = get_ option('default_ping_status');5152 $ping_status = get_default_comment_status( $post_type, 'pingback' ); 5153 5153 break; 5154 5154 } … … 5162 5162 break; 5163 5163 default: 5164 $ping_status = get_ option('default_ping_status');5164 $ping_status = get_default_comment_status( $post_type, 'pingback' ); 5165 5165 break; 5166 5166 } -
trunk/src/wp-includes/post.php
r33041 r33054 4112 4112 * @param string $status Default status for the given post type, 4113 4113 * either 'open' or 'closed'. 4114 * @param string $post_type Post type. Default is `post`. 4114 4115 * @param string $comment_type Type of comment. Default is `comment`. 4115 4116 */ 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 ); 4117 4118 } 4118 4119
Note: See TracChangeset
for help on using the changeset viewer.