
如何使用Varying Vagrant Vagrants (VVV) 进行WordPress开发
get_to_ping ( $post )
get_to_ping: 这个函数检索当一个文章发布时应该被ping的URL的列表。它返回一个从文章内容解析出来的URL数组。
检索需要被ping的URL。
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 ); }