WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Quote Of The day] The day should start at midnight, the hour at 0 minutes

[Resolved] [Plugin: Quote Of The day] The day should start at midnight, the hour at 0 minutes

  • 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/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: Quote Of The day] The day should start at midnight, the hour at 0 minutes’ is closed to new replies.