Forums

Electric Studio Auto Post Expire
Cron Schedule Bug with Fix (2 posts)

  1. MonkeyPress
    Member
    Posted 6 months ago #

    One of my clients is using your plugin in their site, and it looks like you're overwriting any other cron schedules that other plugins try to implement. The issue is with the add_crons function. You should be accepting a $schedules array and then you would add your schedules to that array and then return it. Here's a revised add_crons function that fixes this issue:

    function add_crons($schedules) {
    	$schedules['fifteenmins'] = array('display' => __( 'Every 15 minutes' ), 'interval' => 900);
    	$schedules['halfhour'] = array('display' => __( 'Every half hour' ), 'interval' => 1800);
    	$schedules['fourdaily'] = array('display' => __( 'Four times a day' ), 'interval' => 21600);
    
    	return $schedules;
    }

    http://wordpress.org/extend/plugins/electric-studio-auto-expire-post/

  2. Gabor Javorszky
    Member
    Plugin Contributor

    Posted 6 months ago #

    Yes, you're right. Thank you. I'll implement that, and push it up. +50 internets for you :)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.