WordPress.org

Forums

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

  1. MonkeyPress
    Member
    Posted 2 years 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
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Electric Studio Auto Post Expire
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.