The source code is for testing only and should not be used commercially. The source code comes from the Internet. If there is any infringement, please contact me to remove it.
汉化版 WordPress插件源码 定时发帖插件源码 WordPress定时发布文章插件源码

The WordPress plug-in Missed Scheduled Post Publisher is a plug-in used to solve the problem of failed publishing articles on a regular basis. It can check whether regularly published WordPress articles miss the schedule and change the status of missed planned items from planned status to published.

You can use this plugin in one of two ways:

Method 1:

Install and enable the Missed Scheduled Post Publisher plug-in.
Method 2:

If you don't want to install a plug-in, you can add the provided code to the end of the WordPress theme functions.php file.
Please note that this is a piece of PHP code that performs plug-in-like functions, but you need to be careful because modifying the theme file may affect the normal operation of the website. Before using the code, it's best to back up your functions.php file in case anything goes wrong.

 

<?php

if(!function_exists(‘add_action’)){

header(‘Status 403 Forbidden’);header(‘HTTP/1.0 403 Forbidden’);header(‘HTTP/1.1 403 Forbidden’);exit();}

?>

<?php

function wpms_log(){

echo”\n<!–Plugin WP Missed Schedule 2011.0920.2011 Active–>”;

}

add_action(‘wp_head’,’wpms_log’);

add_action(‘wp_footer’,’wpms_log’)

?>

<?php

define(‘WPMS_DELAY’,5);

define(‘WPMS_OPTION’,’wp_missed_schedule’);

function wpms_replace(){

delete_option(WPMS_OPTION);

}

register_deactivation_hook(__FILE__,’wpms_replace’);

function wpms_init(){

remove_action(‘publish_future_post’,’check_and_publish_future_post’);

$last=get_option(WPMS_OPTION,false);

if(($last!==false)&&($last>(time()-(WPMS_DELAY*60))))return;

update_option(WPMS_OPTION,time());

global$wpdb;

$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″);

if(!count($scheduledIDs))return;

foreach($scheduledIDs as$scheduledID){if(!$scheduledID)continue;

wp_publish_post($scheduledID);}

}

add_action(‘init’,’wpms_init’,0)

?>

 

read more
Resource download
Price25 Meteor coin
The use is limited to testing, experiments, and research purposes. It is prohibited for all commercial operations. This team is not responsible for any illegal behavior of users during use. Please self-test all source codes! There is no guarantee of the integrity and validity of your source code. All source code is collected from the entire network
Original link:https://bcbccb.cn/en/16297.html, please indicate the source for reprinting. Disclaimer: This resource has not been authorized by the original rights holder and is not commercially available. It can only be used to learn and analyze the underlying code, CSS, etc., and is prohibited for commercial purposes. Any relevant disputes and legal liabilities arising from unauthorized commercial use shall be fully borne by the user. Everyone is responsible to support genuine copies. Please delete them within 24 hours after downloading. Thank you for your support!
1

Comments0

七星游戏源码搭建教程详细文档说明
Seven Star Games source code construction tutorial detailed document description
Someone bought it 10 minutes ago Go and have a look

Site Announcements

The source code (theme/plug-in/application source code) and other resources provided by this site are only for learning and exchange

Commercial use is prohibited, otherwise all consequences will be borne by the downloading user!

Some resources are collected or copied online. If they infringe on your legitimate rights and interests, please write to us.

Currently, members have a big reward, and the current price for a lifetime member is 299 gold coins.Recent price adjustments

Join quickly, opportunities wait for no one! immediately participated in

Captcha

Fast login to social accounts

en_USEnglish