generic_ping()
generic_ping( int $post_id )
向所有ping站点服务发送ping。
Sends pings to all of the ping site services.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$post_id | (int) | 必需 | 邮政编码。 |
返回(Return)
(int)与Post ID from参数相同
源码(Source)
/** * Sends pings to all of the ping site services. * * @since 1.2.0 * * @param int $post_id Post ID. * @return int Same as Post ID from parameter */ function generic_ping( $post_id = 0 ) { $services = get_option('ping_sites'); $services = explode(" ", $services); foreach ( (array) $services as $service ) { $service = trim($service); if ( '' != $service ) weblog_ping($service); } return $post_id; }
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
1.2.0 | wp-includes/comment.php:2780 | 1 function | 2 |
generic_ping() 为WP2原创文章,链接:https://www.wp2.cn/functions/generic_ping/