Changeset 59818
- Timestamp:
- 02/12/2025 11:44:00 PM (5 weeks ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r59657 r59818 2891 2891 $pingback_link_offset_dquote = strpos( $contents, $pingback_str_dquote ); 2892 2892 $pingback_link_offset_squote = strpos( $contents, $pingback_str_squote ); 2893 2893 2894 if ( $pingback_link_offset_dquote || $pingback_link_offset_squote ) { 2894 2895 $quote = ( $pingback_link_offset_dquote ) ? '"' : '\''; … … 3080 3081 * @since 0.71 3081 3082 * @since 4.7.0 `$post` can be a WP_Post object. 3083 * @since 6.8.0 Returns an array of pingback statuses indexed by link. 3082 3084 * 3083 3085 * @param string $content Post content to check for links. If empty will retrieve from post. 3084 3086 * @param int|WP_Post $post Post ID or object. 3087 * @return array<string, bool> An array of pingback statuses indexed by link. 3085 3088 */ 3086 3089 function pingback( $content, $post ) { … … 3094 3097 3095 3098 if ( ! $post ) { 3096 return ;3099 return array(); 3097 3100 } 3098 3101 … … 3109 3112 $post_links_temp = wp_extract_urls( $content ); 3110 3113 3114 $ping_status = array(); 3111 3115 /* 3112 3116 * Step 2. … … 3180 3184 $client->debug = false; 3181 3185 3182 if ( $client->query( 'pingback.ping', $pagelinkedfrom, $pagelinkedto ) || ( isset( $client->error->code ) && 48 == $client->error->code ) ) { // Already registered. 3186 $status = $client->query( 'pingback.ping', $pagelinkedfrom, $pagelinkedto ); 3187 3188 if ( $status // Ping registered. 3189 || ( isset( $client->error->code ) && 48 === $client->error->code ) // Already registered. 3190 ) { 3183 3191 add_ping( $post, $pagelinkedto ); 3184 3192 } 3185 } 3186 } 3193 $ping_status[ $pagelinkedto ] = $status; 3194 } 3195 } 3196 3197 return $ping_status; 3187 3198 } 3188 3199
Note: See TracChangeset
for help on using the changeset viewer.