Changeset 45590 for trunk/src/wp-includes/comment.php
- Timestamp:
- 07/02/2019 11:41:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r45424 r45590 49 49 50 50 // Check for the number of external links if a max allowed number is set. 51 if ( $max_links = get_option( 'comment_max_links' ) ) { 51 $max_links = get_option( 'comment_max_links' ); 52 if ( $max_links ) { 52 53 $num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out ); 53 54 … … 1039 1040 $page = null; 1040 1041 1041 if ( ! $comment = get_comment( $comment_ID ) ) { 1042 $comment = get_comment( $comment_ID ); 1043 if ( ! $comment ) { 1042 1044 return; 1043 1045 } … … 1360 1362 function wp_delete_comment( $comment_id, $force_delete = false ) { 1361 1363 global $wpdb; 1362 if ( ! $comment = get_comment( $comment_id ) ) { 1364 $comment = get_comment( $comment_id ); 1365 if ( ! $comment ) { 1363 1366 return false; 1364 1367 } … … 1436 1439 } 1437 1440 1438 if ( ! $comment = get_comment( $comment_id ) ) { 1441 $comment = get_comment( $comment_id ); 1442 if ( ! $comment ) { 1439 1443 return false; 1440 1444 } … … 2049 2053 2050 2054 if ( isset( $commentdata['user_ID'] ) ) { 2051 $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID']; 2055 $commentdata['user_ID'] = (int) $commentdata['user_ID']; 2056 $commentdata['user_id'] = $commentdata['user_ID']; 2052 2057 } 2053 2058 … … 2065 2070 $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; 2066 2071 if ( isset( $commentdata['user_ID'] ) && $prefiltered_user_id !== (int) $commentdata['user_ID'] ) { 2067 $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID']; 2072 $commentdata['user_ID'] = (int) $commentdata['user_ID']; 2073 $commentdata['user_id'] = $commentdata['user_ID']; 2068 2074 } elseif ( isset( $commentdata['user_id'] ) ) { 2069 2075 $commentdata['user_id'] = (int) $commentdata['user_id']; … … 2476 2482 wp_cache_delete( "comments-{$post_id}", 'counts' ); 2477 2483 2478 if ( ! $post = get_post( $post_id ) ) { 2484 $post = get_post( $post_id ); 2485 if ( ! $post ) { 2479 2486 return false; 2480 2487 } … … 2775 2782 if ( ! in_array( $link_test, $pung ) && ( url_to_postid( $link_test ) != $post->ID ) // If we haven't pung it already and it isn't a link to itself 2776 2783 && ! is_local_attachment( $link_test ) ) : // Also, let's never ping local attachments. 2777 if ( $test = @parse_url( $link_test ) ) { 2784 $test = @parse_url( $link_test ); 2785 if ( $test ) { 2778 2786 if ( isset( $test['query'] ) ) { 2779 2787 $post_links[] = $link_test; … … 3135 3143 function wp_handle_comment_submission( $comment_data ) { 3136 3144 3137 $comment_post_ID = $comment_parent = $user_ID = 0; 3138 $comment_author = $comment_author_email = $comment_author_url = $comment_content = null; 3145 $comment_post_ID = 0; 3146 $comment_parent = 0; 3147 $user_ID = 0; 3148 $comment_author = null; 3149 $comment_author_email = null; 3150 $comment_author_url = null; 3151 $comment_content = null; 3139 3152 3140 3153 if ( isset( $comment_data['comment_post_ID'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.