[wordpress插件] cbnet Ping Optimizercbnet Ping优化器

wordpress 插件 文章 2020-03-19 04:50 581 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Hello there!

你好!

You may be wondering why you’re reading this, instead of looking at Plugin settings.

您可能想知道为什么要阅读此内容,而不是查看插件设置。

Well, the reason that you’re not looking at Plugin settings is because there aren’t any Plugin settings anymore.

嗯,您之所以不查看插件设置,是因为不再有任何插件设置。

In fact, this Plugin doesn’t have any functionality anymore.

实际上,该插件不再具有任何功能。

Why?

为什么?

Because this Plugin’s functionality is no longer needed.

因为不再需要此插件的功能。

In fact, this Plugin’s functionality may never have been needed in the first place.

实际上,一开始可能根本不需要此插件的功能。

But regardless of that, it certainly isn’t needed now.

但是无论如何,现在肯定不需要了。

How Pings Work in WordPress

Pings如何在WordPress中工作

Let me explain why, starting with a walkthrough of how pings work in WordPress, courtesy of @Otto42:

让我解释一下为什么,首先由@ Otto42提供,首先介绍ping在WordPress中的工作方式:

    • When a post gets created, updated, inserted, modified, etc., eventually, it always goes through wp_insert_post().
    • 最终创建,更新,插入,修改帖子后,它总是通过wp_insert_post()。

    • wp_insert_post() calls wp_transition_post_status().
    • wp_insert_post()调用wp_transition_post_status()。

    • wp_transition_post_status() does various actions, but importantly it does this:
    • wp_transition_post_status()会执行各种操作,但重要的是,它会执行以下操作:

    • do_action(“{$new_status}_{$post->post_type}”, $post->ID, $post);
    • do_action(“ {$ new_status} _ {$ post-> post_type}”,$ post-> ID,$ post);

    • So the action of new-status and new-post-type is called.

    • 因此调用了new-status和new-post-type的动作。

      In this case, we’re interested in the publish status on the post post-type, so publish_post is the action hook.

    • 在这种情况下,我们对post post类型的发布状态感兴趣,因此publish_post是操作挂钩。

    • In wp-includes/default-filters.php, we have this:

    • 在wp-includes / default-filters.php中,我们有以下内容:

      ** add_action( ‘publish_post’, ‘_publish_post_hook’, 5, 1 );

      ** add_action('publish_post','_publish_post_hook',5,1);

      ** So that causes publish_post to call _publish_post_hook().

    • **因此导致publish_post调用_publish_post_hook()。

    • _publish_post_hook(), among other things, adds the '_pingme' post meta to the post, and schedules the do_pings action for a one-time cron call, which will happen on the next page load (because it's hooked to time(

    • _publish_post_hook()除其他外,将'_pingme'帖子元添加到帖子中,并为一次cron调用安排do_pings操作,该操作将在下一次页面加载时发生(因为它与时间挂钩(

      ) for the schedule).

    • )的时间表)。

    • Again in wp-includes/default-filters.php, we have this:

    • 再次在wp-includes / default-filters.php中,我们有以下内容:

      ** add_action( ‘do_pings’, ‘do_all_pings’ );

    • ** add_action('do_pings','do_all_pings');

    • The do_all_pings() function does all the pings for all the posts that are marked as needing them done at the moment.
    • do_all_pings()函数对所有标记为当前需要完成的帖子执行所有ping操作。

    Regarding draft, scheduled (future), and edited posts:

    关于草稿,预定(未来)和已编辑的帖子:

      • Draft posts have a post_status of draft, meaning that wp_transition_post_status() calls do_action() on draft_post rather than on publish_post.

      • 草稿后的文章具有post_status的草稿状态,这意味着wp_transition_post_status()在draft_post而不是publish_post上调用do_action()。

        Scheduled posts have a post_status of future, meaning that wp_transition_post_status() calls do_action() on future_post rather than on publish_post.

        计划的帖子具有post_status的将来状态,这意味着wp_transition_post_status()在future_post而不是publish_post上调用do_action()。

        Thus, neither draft nor scheduled posts get pings sent for them until they actually transistion to publish, since that is when the publish_post action will get fired.

      • 因此,草稿或计划发布的帖子都不会为它们发送ping命令,直到它们实际发送出去为止,因为那是publish_post操作将被触发的时候。

      • Editing posts: editing an existing post will send pings for the post, but do_all_pings() is smart.

      • 编辑帖子:编辑现有帖子将发送ping帖子,但是do_all_pings()很聪明。

        It calls the pingback() function to send pingbacks to blogs, and that in turn calls the get_pung() function to get the URLs in the post that have already been successfully pinged once before.

        它调用pingback()函数将pingback发送到博客,然后依次调用get_pung()函数以获取帖子中以前已经成功ping一次的URL。

        This is very old code – so old, in fact, that the list of pinged blogs is actually a primary column (pinged) in the wp_posts table.

      • 这是很旧的代码-实际上太旧了,以至于ping博客的列表实际上是wp_posts表中的主列(被ping)。

      Why the Ping Optimizer Plugin Isn’t Needed

      为什么不需要Ping Optimizer插件

      So consider again the Plugin description:

      因此,请再次考虑插件说明:

      Do you know your WordPress blog pings unnecessarily every time you edit a post?

      您每次编辑帖子时都不必要知道WordPress博客ping吗?

      Think how many times you click on “Save and Continue Editing” or “Save” button.

      想想您单击“保存并继续编辑”或“保存”按钮的次数。

      Your blog will ping unnecessarily that many times you click on those buttons.

      单击您的博客很多次,您的博客将不必要地ping。

      Save your blog from getting tagged as ping spammer by installing this plugin.

      通过安装此插件,避免博客被标记为ping垃圾邮件发送者。

      After you install cbnet Ping Optimizer:

      安装cbnet Ping Optimizer之后:

        • When you create a new post, your blog will ping and notify all the ping services that it has been updated.

        • 创建新帖子时,您的博客将ping并通知所有ping服务它已更新。

          This encourages search engines and different blog directories/services to index your updated blog properly.

        • 这鼓励搜索引擎和不同的博客目录/服务正确地索引更新的博客。

        • When you edit an existing post, it won’t send any unnecessary ping to ping services and saves your blog from getting banned by such services.
        • 编辑现有帖子时,它不会向ping服务发送任何不必要的ping操作,并且可以避免您的博客被此类服务禁止。

        • When you post a future post by editing the time stamp, it will ping only when your post appears in future.

        • 当您通过编辑时间戳记发布将来的帖子时,它将仅在以后出现您的帖子时ping。

          It won’t unnecessarily ping many times when you schedule posts as WordPress does by default.

        • 默认情况下,当您安排帖子排期时,它不会像WordPress那样多次重复ping。

      It should be obvious that most of that just isn’t true anymore.

      很明显,其中大部分不再是真的。

      Think how many times you click on “Save and Continue Editing” or “Save” button.

      请考虑您单击“保存并继续编辑”或“保存”按钮的次数。

      Your blog will ping unnecessarily that many times you click on those buttons.

      单击您的博客很多次,您的博客将不必要地ping。

      As you see above, this isn’t true.

      如上所述,这不是事实。

      Saving a draft post does not fire the publish_post action;

      保存草稿帖子不会触发publish_post操作;

      therefore, no pings are triggered.

      因此,不会触发ping操作。

      When you create a new post, your blog will ping and notify all the ping services that it has been updated.

      创建新帖子时,您的博客将ping并通知所有ping服务它已更新。

      WordPress core functionality does this already.

      WordPress核心功能已经做到了。

      When you edit an existing post, it won’t send any unnecessary ping to ping services and saves your blog from getting banned by such services.

      编辑现有帖子时,它不会向ping服务发送任何不必要的ping操作,并且可以避免博客被此类服务禁止。

      As you see above, WordPress intelligently fires pings when a post is edited, by keeping track of previous successful pings and not re-pinging them.

      正如您在上面看到的那样,WordPress通过跟踪先前成功的ping而不重新对其进行ping操作,在编辑帖子时智能地触发ping。

      When you post a future post by editing the time stamp, it will ping only when your post appears in future.

      当您通过编辑时间戳记发布将来的帖子时,它将仅在以后出现您的帖子时ping。

      It won’t unnecessarily ping many times when you schedule posts as WordPress does by default.

      默认情况下,当您安排帖子排期时,它不会像WordPress一样多次重复

      As you see above, scheduling a post fires the future_post action, and not the publish_post action.

      如上所示,安排发布会触发future_post操作,而不是publish_post操作。

      Thus, until a scheduled post actually transitions to publish, thereby firing the publish_post action, no pings are triggered.

      因此,在预定的帖子实际上过渡到发布,从而触发publish_post操作之前,不会触发ping操作。

      So, none of this Plugin’s functionality is needed.

      因此,不需要此插件的任何功能。

      You can safely deactivate and uninstall it, with the understanding of why the core WordPress handling of pings works just fine.

      您可以安全地停用和卸载它,并了解为什么WordPress的WordPress核心处理操作正常。

安装步骤

Don’t install this Plugin.

请勿安装此插件。

You don’t need it

您不需要

下载地址
https://downloads.wordpress.org/plugin/cbnet-ping-optimizer.3.0.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] clubmember俱乐部会员
[wordpress插件] Contact Form 7 Gated Content联系表7门控内容
[wordpress插件] WordPress Appointment Booking and Online Scheduling Plugin by AppointyWordPress预约和在线预约插件
[wordpress插件] Backend Custom Fields For Forms Management System表单管理系统的后端自定义字段
[wordpress插件] Contact Form 7 Image Captcha联系表7 Image Captcha
随便看看
没太懂,提交答案要求看激励视频也算是“网赚行为”? 374
小程序获取地理位置功能? 456
小程序发起支付且支付完成后,到微信账单查看订单详情。账单图标不是小程序的图标,如何解决? 644
cover-view 组件 页面滚动 会覆盖掉页面的内容? 549
小程序radio 修改默认颜色? 512
微信支付成功 不能打印成功的信息? 450
商户传入appi不正确,请联系商户处理? 475
云开发小程序如何充值 362
小程序与运营类目不符,被暂停服务,公司已经在办相关营业范围了,现已改正多久可以审核? 470
云函数读取数据库信息,无返回值打印,这是哪里错了? 355