<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>开发 on 背字根</title><link>https://www.beizigen.com/category/dev/</link><description>Recent content in 开发 on 背字根</description><generator>Hugo</generator><language>zh-CN</language><copyright>2016</copyright><lastBuildDate>Fri, 08 May 2026 09:59:47 +0800</lastBuildDate><atom:link href="https://www.beizigen.com/category/dev/index.xml" rel="self" type="application/rss+xml"/><item><title>WordPress向所有ping站点服务发送ping函数：generic_ping</title><link>https://www.beizigen.com/post/wordpress-function-generic_ping/</link><pubDate>Fri, 08 May 2026 09:59:47 +0800</pubDate><guid>https://www.beizigen.com/post/wordpress-function-generic_ping/</guid><description>&lt;p>WordPress函数generic_ping()向所有订阅了ping服务的站点发送ping，通知它们有新的内容更新。该函数通常在发布或更新文章时调用，以确保订阅了ping服务的站点能够及时获取到最新信息。&lt;/p></description></item><item><title>WordPress执行trackback函数：do_trackbacks</title><link>https://www.beizigen.com/post/wordpress-function-do_trackbacks/</link><pubDate>Fri, 08 May 2026 09:44:28 +0800</pubDate><guid>https://www.beizigen.com/post/wordpress-function-do_trackbacks/</guid><description>&lt;p>WordPress函数do_trackbacks()用于执行trackback。该函数接受一个文章ID或文章对象作为参数，并尝试向其他站点发送trackback请求。如果发送失败，则返回false。&lt;/p></description></item><item><title>WordPress发送到pingback服务函数：do_all_pings</title><link>https://www.beizigen.com/post/wordpress-function-do_all_pings/</link><pubDate>Wed, 06 May 2026 10:46:07 +0800</pubDate><guid>https://www.beizigen.com/post/wordpress-function-do_all_pings/</guid><description>&lt;p>WordPress函数do_all_pings()执行所有pingbacks、enclosures、trackbacks和发送到pingback服务的操作。该函数通常用于在发布新文章后，自动通知其他网站或服务，以便它们可以抓取和索引新内容。&lt;/p></description></item><item><title>WordPress查找pingback服务器URI函数：discover_pingback_server_uri</title><link>https://www.beizigen.com/post/wordpress-function-discover_pingback_server_uri/</link><pubDate>Sun, 03 May 2026 10:04:18 +0800</pubDate><guid>https://www.beizigen.com/post/wordpress-function-discover_pingback_server_uri/</guid><description>&lt;p>WordPress函数discover_pingback_server_uri()用于根据给定的URL查找pingback服务器URI，从指定的URL中提取pingback服务器的地址。&lt;/p></description></item><item><title>WordPress更新文章评论数函数：wp_update_comment_count</title><link>https://www.beizigen.com/post/wordpress-function-wp_update_comment_count/</link><pubDate>Fri, 01 May 2026 15:08:00 +0800</pubDate><guid>https://www.beizigen.com/post/wordpress-function-wp_update_comment_count/</guid><description>&lt;p>WordPress函数wp_update_comment_count()用于更新文章的评论数。该函数接受两个参数，一个是要更新评论数的文章ID，另一个是布尔值，指示是否处理之前延迟的评论计数更新。&lt;/p></description></item><item><title>WordPress更新评论函数：wp_update_comment</title><link>https://www.beizigen.com/post/wordpress-function-wp_update_comment/</link><pubDate>Thu, 30 Apr 2026 10:56:34 +0800</pubDate><guid>https://www.beizigen.com/post/wordpress-function-wp_update_comment/</guid><description>&lt;p>WordPress函数wp_update_comment()更新数据库中的现有评论。该函数接受一个包含评论信息的数组，并根据提供的信息更新指定的评论。如果设置$wp_error为true，则在更新失败时返回一个WP_Error对象。&lt;/p></description></item><item><title>WordPress设置评论的状态函数：wp_set_comment_status</title><link>https://www.beizigen.com/post/wordpress-function-wp_set_comment_status/</link><pubDate>Sat, 25 Apr 2026 09:42:16 +0800</pubDate><guid>https://www.beizigen.com/post/wordpress-function-wp_set_comment_status/</guid><description>&lt;p>WordPress函数wp_set_comment_status()用于设置评论的状态，允许为指定评论ID或WP_Comment对象的评论更新状态。状态可以是hold、approve、spam或trash。&lt;/p></description></item><item><title>WordPress添加新评论函数：wp_new_comment</title><link>https://www.beizigen.com/post/wordpress-function-wp_new_comment/</link><pubDate>Fri, 27 Feb 2026 09:18:51 +0800</pubDate><guid>https://www.beizigen.com/post/wordpress-function-wp_new_comment/</guid><description>&lt;p>WordPress函数wp_new_comment()向数据库添加新评论。该函数接受一个包含评论数据的数组和一个可选的布尔值参数，用于指定在发生错误时是否返回WP_Error对象。成功时返回评论的ID，失败时返回false或WP_Error对象。&lt;/p></description></item><item><title>WordPress检测洪水评论函数：wp_throttle_comment_flood</title><link>https://www.beizigen.com/post/wordpress-function-wp_throttle_comment_flood/</link><pubDate>Thu, 26 Feb 2026 20:53:19 +0800</pubDate><guid>https://www.beizigen.com/post/wordpress-function-wp_throttle_comment_flood/</guid><description>&lt;p>WordPress函数wp_throttle_comment_flood()检测是否存在刷评论。该函数通过比较最后一条评论的时间戳和新评论的时间戳，判断时间差是否小于15秒，以防止评论泛滥。&lt;/p></description></item><item><title>WordPress过滤评论数据函数：wp_filter_comment</title><link>https://www.beizigen.com/post/wordpress-function-wp_filter_comment/</link><pubDate>Mon, 01 Dec 2025 10:30:55 +0800</pubDate><guid>https://www.beizigen.com/post/wordpress-function-wp_filter_comment/</guid><description>&lt;p>WordPress函数wp_filter_comment()过滤和净化评论数据。&lt;/p>
&lt;pre tabindex="0">&lt;code>wp_filter_comment( array $commentdata ): array
&lt;/code>&lt;/pre>&lt;h2>函数参数&lt;/h2>&lt;p>&lt;strong>$commentdata&lt;/strong>&lt;/p>
&lt;p>数据类型：array (必须)&lt;/p>
&lt;p>包含有关评论的信息。参考：&lt;a href="https://www.beizigen.com/post/wordpress-function-wp_insert_comment/">WordPress在数据库插入评论函数：wp_insert_comment&lt;/a>&lt;/p>
&lt;h2>函数返回值&lt;/h2>&lt;p>wp_filter_comment()函数返回过滤处理后的评论信息。&lt;/p></description></item></channel></rss>