Commit 17f571cc authored by John James Jacoby's avatar John James Jacoby
Browse files

Don't subtract a cell in day/week views.

Fixes bug where events for less than 1 hour would not appear.
parent c43675b6
......@@ -148,7 +148,7 @@ class WP_Event_Calendar_Day_Table extends WP_Event_Calendar_List_Table {
// Calculate the cell offset
$offset = intval( ( $this->item_start - $this->day_start ) / DAY_IN_SECONDS );
$cell = ( $start_hour * $interval ) + $offset;
$end_cell = ( $end_hour * $interval ) + ( $offset - 1 );
$end_cell = ( $end_hour * $interval ) + $offset;
}
// Loop through days
......
......@@ -157,8 +157,8 @@ class WP_Event_Calendar_Week_Table extends WP_Event_Calendar_List_Table {
// Start the days loop with the start day
$cell = ( $start_hour * $interval ) + $offset;
// Don't include the end hour
$end_cell = ( $end_hour * $interval ) + ( $offset - 1 );
// Maybe don't include the end hour
$end_cell = ( $end_hour * $interval ) + $offset;
}
// Loop through days
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment