generic_ping

Advertisement

Summery Summery

Sends pings to all of the ping site services.

Syntax Syntax

generic_ping( int $post_id )

Parameters Parameters

$post_id

(Required) Post ID.

Return Return

(int) Same as Post ID from parameter

Source Source

File: wp-includes/comment.php

		$pingback_link_offset    = ( '"' === $quote ) ? $pingback_link_offset_dquote : $pingback_link_offset_squote;
		$pingback_href_pos       = strpos( $contents, 'href=', $pingback_link_offset );
		$pingback_href_start     = $pingback_href_pos + 6;
		$pingback_href_end       = strpos( $contents, $quote, $pingback_href_start );
		$pingback_server_url_len = $pingback_href_end - $pingback_href_start;
		$pingback_server_url     = substr( $contents, $pingback_href_start, $pingback_server_url_len );

		// We may find rel="pingback" but an incomplete pingback URL.
		if ( $pingback_server_url_len > 0 ) { // We got it!
			return $pingback_server_url;
		}
	}

Advertisement

Changelog Changelog

Changelog
Version Description
1.2.0 Introduced.

Advertisement

Leave a Reply