generic_ping( int $post_id ): int

In this article

Sends pings to all of the ping site services.

Parameters

$post_idintrequired
Post ID.

Return

int Same post ID as provided.

Source

function generic_ping( $post_id = 0 ) {
	$services = get_option( 'ping_sites' );

	$services = explode( "\n", $services );
	foreach ( (array) $services as $service ) {
		$service = trim( $service );
		if ( '' !== $service ) {
			weblog_ping( $service );
		}
	}

	return $post_id;
}

Changelog

VersionDescription
1.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.