WordPress 插件定时发帖Missed Scheduled Post Publisher 汉化版

WordPress 插件定时发帖Missed Scheduled Post Publisher 汉化版。用Missed Scheduled Posts插件解决WordPress定时发布文章失败问题?以查看定时发布的WordPress文章是否错过了时间表。如果找到任何错过的计划项目,则它将状态从计划状态更改为已发布。

使用方法:

一、安装并启用Missed Scheduled Post Publisher插件。

二、如果你不想安装插件,也可以直接将试试添加代码到functions.php的最后面即可:

  1. <?php
  2. if(!function_exists(‘add_action’)){
  3. header(‘Status 403 Forbidden’);header(‘HTTP/1.0 403 Forbidden’);header(‘HTTP/1.1 403 Forbidden’);exit();}
  4. ?>
  5. <?php
  6. function wpms_log(){
  7. echo”\\n<!–Plugin WP Missed Schedule 2011.0920.2011 Active–>”;
  8. }
  9. add_action(‘wp_head’,’wpms_log’);
  10. add_action(‘wp_footer’,’wpms_log’)
  11. ?>
  12. <?php
  13. define(‘WPMS_DELAY’,5);
  14. define(‘WPMS_OPTION’,’wp_missed_schedule’);
  15. function wpms_replace(){
  16. delete_option(WPMS_OPTION);
  17. }
  18. register_deactivation_hook(__FILE__,’wpms_replace’);
  19. function wpms_init(){
  20. remove_action(‘publish_future_post’,’check_and_publish_future_post’);
  21. $last=get_option(WPMS_OPTION,false);
  22. if(($last!==false)&&($last>(time()-(WPMS_DELAY*60))))return;
  23. update_option(WPMS_OPTION,time());
  24. global$wpdb;
  25. $scheduledIDs=$wpdb->get_col(“SELECT`ID`FROM`{$wpdb->posts}`”.”WHERE(“.”((`post_date`>0)&&(`post_date`<=CURRENT_TIMESTAMP()))OR”.”((`post_date_gmt`>0)&&(`post_date_gmt`<=UTC_TIMESTAMP()))”.”)AND`post_status`=’future’LIMIT 0,5″);
  26. if(!count($scheduledIDs))return;
  27. foreach($scheduledIDs as$scheduledID){if(!$scheduledID)continue;
  28. wp_publish_post($scheduledID);}
  29. }
  30. add_action(‘init’,’wpms_init’,0)
  31. ?>

WordPress 插件定时发帖Missed Scheduled Post Publisher 汉化版

资源下载
下载价格10 积分
VIP免费
客服QQ:2978058527 QQ群:730534064
声明:1.本文部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责。 2.若您需要商业运营或用于其他商业活动,请您购买正版授权并合法使用。 3.如果本站有侵犯、不妥之处的资源,请在网站最下方联系我们。将会第一时间解决! 4.本站所有内容均由互联网收集整理、网友上传,仅供大家参考、学习,不存在任何商业目的与商业用途。 5.本站提供的所有资源仅供参考学习使用,版权归原著所有,禁止下载本站资源参与商业和非法行为,请在24小时之内自行删除!
九年老站,质量有保证,90%亲自测试!优惠:原价199终身SVIP,仅需79,立省 120,抓紧上车,数量有限!购买SVIP
显示验证码
没有账号?注册  忘记密码?