WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Quote Of The day] The day should start at midnight, the hour at 0 minutes (2 posts)

  1. Jacob N. Breetvelt
    Member
    Posted 4 years ago #

    The day should start at midnight, the hour at 0 minutes.
    After changing the interval, the starttime must be reset.

    This code modification in cd-qotd-admin.php does it. (See comments)

    switch ($op) {
    	case "qotd":
    		if ($_POST['action'] == "setqotd") {
    			update_option('cd_qotd_type', $wpdb->escape($_POST['cd_qotd_type']));
    			update_option('cd_qotd_freq', $wpdb->escape($_POST['cd_qotd_freq']));
    			if ($_POST['cd_qotd_freq'] == '2') $cd_qotd_time = mktime(date("H"),0,0);	/* Added to make the hour start at zero minutes */
    			else $cd_qotd_time = mktime(0,0,0);				/* Added to make the day start at midnight */
    				update_option('cd_qotd_time', $cd_qotd_time);				/* Added to save the resetted starttime */

    http://wordpress.org/extend/plugins/cd-qotd/

  2. Jacob N. Breetvelt
    Member
    Posted 4 years ago #

    Fixed in 1.1.0 Thank you

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags