Changeset 54488 for trunk/src/wp-includes/comment-template.php
- Timestamp:
- 10/11/2022 03:43:04 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r54134 r54488 2325 2325 $post = get_post( $post ); 2326 2326 2327 $post_id = $post ? $post->ID : get_the_ID(); 2328 2329 // Exit the function when comments for the post are closed. 2330 if ( ! comments_open( $post_id ) ) { 2327 // Exit the function if the post is invalid or comments are closed. 2328 if ( ! $post || ! comments_open( $post ) ) { 2331 2329 /** 2332 2330 * Fires after the comment form if comments are closed. 2331 * 2332 * For backward compatibility, this action also fires if comment_form() 2333 * is called with an invalid post object or ID. 2333 2334 * 2334 2335 * @since 3.0.0 … … 2339 2340 } 2340 2341 2342 $post_id = $post->ID; 2341 2343 $commenter = wp_get_current_commenter(); 2342 2344 $user = wp_get_current_user();
Note: See TracChangeset
for help on using the changeset viewer.