get_to_ping()

get_to_ping( int|WP_Post $post_id ) 检索需要ping的url。Retrie…

get_to_ping( int|WP_Post $post_id )

检索需要ping的url。
Retrieve URLs that need to be pinged.

目录锚点:#返回#源码


返回(Return)

无返回值


源码(Source)

/**
 * 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);

	/**
	 * Filter 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 );
}
更新版本 源码位置 使用 被使用
4.7.0 wp-includes/post.php:4817 2 4
类别:WordPress 函数手册

本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

评论 (0)COMMENT

登录 账号发表你的看法,还没有账号?立即免费 注册