get_to_ping()
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 |
get_to_ping() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_to_ping/