I'm in the process of making wordpress plugin using PHP. The objective is that the plugin will run until a stated date, than it will stop.
The problem is, let say I stated the expired date is on 16/9/2012. The system will only stop the plugin on 17/9/2012 08:00AM. How can I make it stop at 17/9/2012 12:00AM.
The coding that correspond are shown below. Need your advice. Thanks!
function display($content) {
$exp_date = "16-09-2012";
$todays_date = date("d-m-Y");
$today = strtotime($todays_date);
$expiration_date = strtotime($exp_date);
if ($expiration_date >= $today) {
return flag().$content;
} else {
return $content;
}
}