Changeset 53715 for trunk/src/wp-includes/comment.php
- Timestamp:
- 07/18/2022 05:35:51 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r53458 r53715 150 150 151 151 /** 152 * Retrieves the approved comments for post $post_id.152 * Retrieves the approved comments for a post. 153 153 * 154 154 * @since 2.0.0 … … 860 860 */ 861 861 function wp_check_comment_flood( $is_flood, $ip, $email, $date, $avoid_die = false ) { 862 863 862 global $wpdb; 864 863 … … 1448 1447 function wp_delete_comment( $comment_id, $force_delete = false ) { 1449 1448 global $wpdb; 1449 1450 1450 $comment = get_comment( $comment_id ); 1451 1451 if ( ! $comment ) { … … 1992 1992 function wp_insert_comment( $commentdata ) { 1993 1993 global $wpdb; 1994 1994 1995 $data = wp_unslash( $commentdata ); 1995 1996 … … 2652 2653 function wp_update_comment_count_now( $post_id ) { 2653 2654 global $wpdb; 2655 2654 2656 $post_id = (int) $post_id; 2657 2655 2658 if ( ! $post_id ) { 2656 2659 return false; … … 2661 2664 2662 2665 $post = get_post( $post_id ); 2666 2663 2667 if ( ! $post ) { 2664 2668 return false; … … 2887 2891 * 2888 2892 * @since 1.5.0 2889 * @since 4.7.0 `$post _id` can be a WP_Post object.2893 * @since 4.7.0 `$post` can be a WP_Post object. 2890 2894 * 2891 2895 * @global wpdb $wpdb WordPress database abstraction object. 2892 2896 * 2893 * @param int|WP_Post $post _id Post object or IDto do trackbacks on.2894 */ 2895 function do_trackbacks( $post _id) {2897 * @param int|WP_Post $post Post ID or object to do trackbacks on. 2898 */ 2899 function do_trackbacks( $post ) { 2896 2900 global $wpdb; 2897 $post = get_post( $post_id ); 2901 2902 $post = get_post( $post ); 2903 2898 2904 if ( ! $post ) { 2899 2905 return false; … … 2902 2908 $to_ping = get_to_ping( $post ); 2903 2909 $pinged = get_pung( $post ); 2910 2904 2911 if ( empty( $to_ping ) ) { 2905 2912 $wpdb->update( $wpdb->posts, array( 'to_ping' => '' ), array( 'ID' => $post->ID ) ); … … 2948 2955 * 2949 2956 * @param int $post_id Post ID. 2950 * @return int Same as Post ID from parameter2957 * @return int Same post ID as provided. 2951 2958 */ 2952 2959 function generic_ping( $post_id = 0 ) { … … 2968 2975 * 2969 2976 * @since 0.71 2970 * @since 4.7.0 `$post _id` can be a WP_Post object.2977 * @since 4.7.0 `$post` can be a WP_Post object. 2971 2978 * 2972 2979 * @param string $content Post content to check for links. If empty will retrieve from post. 2973 * @param int|WP_Post $post _id Post Object or ID.2974 */ 2975 function pingback( $content, $post _id) {2980 * @param int|WP_Post $post Post ID or object. 2981 */ 2982 function pingback( $content, $post ) { 2976 2983 include_once ABSPATH . WPINC . '/class-IXR.php'; 2977 2984 include_once ABSPATH . WPINC . '/class-wp-http-ixr-client.php'; … … 2980 2987 $post_links = array(); 2981 2988 2982 $post = get_post( $post_id ); 2989 $post = get_post( $post ); 2990 2983 2991 if ( ! $post ) { 2984 2992 return; … … 3033 3041 * @param string[] $post_links Array of link URLs to be checked (passed by reference). 3034 3042 * @param string[] $pung Array of link URLs already pinged (passed by reference). 3035 * @param int $post_ IDThe post ID.3043 * @param int $post_id The post ID. 3036 3044 */ 3037 3045 do_action_ref_array( 'pre_ping', array( &$post_links, &$pung, $post->ID ) );
Note: See TracChangeset
for help on using the changeset viewer.