WordPress Version: 4.6
/**
* Retrieve URLs that need to be pinged.
*
* @since 1.5.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $post_id Post ID
* @return array
*/
function get_to_ping($post_id)
{
global $wpdb;
$to_ping = $wpdb->get_var($wpdb->prepare("SELECT to_ping FROM {$wpdb->posts} WHERE ID = %d", $post_id));
$to_ping = sanitize_trackback_urls($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 2.0.0
*
* @param array $to_ping List of URLs yet to ping.
*/
return apply_filters('get_to_ping', $to_ping);
}