wpseek.com
WordPress开发者和主题制作者的搜索引擎



get_to_ping › WordPress Function

Since1.5.0
已弃用n/a
get_to_ping ( $post )
参数:
  • (int|WP_Post) $post Post ID or post object.
    Required: Yes
返回:
  • (string[]|false) List of URLs yet to ping.
定义在:
文档:
Change Log:
  • 4.7.0

Retrieves URLs that need to be pinged.



源码

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

	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 );
}