!
也想出现在这里? 联系我们
广告位
当前位置:首页>开发>WordPress开发手册>WordPress函数手册>WordPress函数文档generic_ping()

WordPress函数文档generic_ping()

将Pings发送给所有ping网站服务 描述 译文 将 pings 发送给所有ping网站服务 原文 Send…--由S9社区整理

将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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

/* ———————————-
* wordpress函数 kim收集
* ———————————- */
/**
* 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;

}

原文:http://codex.wordpress.org/Function_Reference/generic_ping

给TA打赏
共{{data.count}}人
人已打赏
WordPress函数手册

WordPress函数文档get_approved_comments()

2023-6-16 19:40:07

WordPress函数手册

WordPress函数文档get_ancestors()

2023-6-16 19:40:49

声明 本站上的部份代码及教程来源于互联网,仅供网友学习交流,若您喜欢本文可附上原文链接随意转载。无意侵害您的权益,请发送邮件至 [email protected] 或点击右侧 私信:林沐阳 反馈,我们将尽快处理。
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索