get_to_ping( int|WP_Post $post )

Retrieves URLs that need to be pinged.


Parameters

$post

(Required) Post ID or post object.


Return

(string[]|false) List of URLs yet to ping.


Source

File: wp-includes/post.php

function get_to_ping( $post_id ) {
	$post = get_post( $post_id );

	if ( ! $post ) {
		return false;
	}

	$to_ping = sanitize_trackback_urls( $post->to_ping );
	$to_ping = preg_split('/\s/', $to_ping, -1, PREG_SPLIT_NO_EMPTY);

	/**
	 * Filters the list of URLs yet to ping for the given post.
	 *
	 * @since WP-2.0.0
	 *
	 * @param array $to_ping List of URLs yet to ping.
	 */
	return apply_filters( 'get_to_ping', $to_ping );
}

Changelog

Changelog
Version Description
4.7.0 $post can be a WP_Post object.
1.5.0 Introduced.