将Pings发送给所有ping网站服务
描述
译文
将 pings 发送给所有ping网站服务
原文
Sends pings to all of the ping site services.
用法
<?php generic_ping( $post_id ) ?>
参数
$post_id
(integer) (可选) Post ID. Only used as a return velue.
默认值: 0
返回值
(integer)
Returns $post_id unaltered.
注意
The $post_id and return values do not have to be an integer data types, but in WordPress $post_id is always an integer data type.
使用到: get_option() to get all ping sites.
使用到: weblog_ping() for each ping site.
历史
添加于 版本: 1.2.0
源文件
generic_ping() 函数的代码位于 wp-includes/comment.php
.
1 |
/* ———————————- 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; } |
原文:http://codex.wordpress.org/Function_Reference/generic_ping