Ticket #40286: 40286.3.diff
File 40286.3.diff, 1.2 KB (added by , 8 years ago) |
---|
-
src/wp-includes/comment-template.php
1191 1191 1192 1192 $_post = get_post($post_id); 1193 1193 1194 $post_id = $_post ? $_post->ID : 0; 1194 1195 $open = ( 'open' == $_post->comment_status ); 1195 1196 1196 1197 /** … … 1198 1199 * 1199 1200 * @since 2.5.0 1200 1201 * 1201 * @param bool 1202 * @param int |WP_Post $post_id The post ID or WP_Post object.1202 * @param bool $open Whether the current post is open for comments. 1203 * @param int $post_id Post ID. 1203 1204 */ 1204 1205 return apply_filters( 'comments_open', $open, $post_id ); 1205 1206 } … … 1216 1217 1217 1218 $_post = get_post($post_id); 1218 1219 1220 $post_id = $_post ? $_post->ID : 0; 1219 1221 $open = ( 'open' == $_post->ping_status ); 1220 1222 1221 1223 /** … … 1223 1225 * 1224 1226 * @since 2.5.0 1225 1227 * 1226 * @param bool 1227 * @param int |WP_Post $post_id The post ID or WP_Post object.1228 * @param bool $open Whether the current post is open for pings. 1229 * @param int $post_id Post ID. 1228 1230 */ 1229 1231 return apply_filters( 'pings_open', $open, $post_id ); 1230 1232 }