get_to_ping()
最后更新于:2021-11-27 03:01:20
get_to_ping( int|GC_Post$post_id)Retrieve URLs that need to be pinged.
参数
- $post_id
-
(int|GC_Post) (Required) Post Object or ID
响应
(string[]|false) List of URLs yet to ping.
源文件
文件: gc-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 2.0.0
*
* @param string[] $to_ping List of URLs yet to ping.
*/
return apply_filters( 'get_to_ping', $to_ping );
}