Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Publicious.org
Plugins
Event Calendar
Commits
17f571cc
Commit
17f571cc
authored
May 12, 2016
by
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
includes/common/list-table-day.php
View file @
17f571cc
...
@@ -148,7 +148,7 @@ class WP_Event_Calendar_Day_Table extends WP_Event_Calendar_List_Table {
...
@@ -148,7 +148,7 @@ class WP_Event_Calendar_Day_Table extends WP_Event_Calendar_List_Table {
// Calculate the cell offset
// Calculate the cell offset
$offset
=
intval
(
(
$this
->
item_start
-
$this
->
day_start
)
/
DAY_IN_SECONDS
);
$offset
=
intval
(
(
$this
->
item_start
-
$this
->
day_start
)
/
DAY_IN_SECONDS
);
$cell
=
(
$start_hour
*
$interval
)
+
$offset
;
$cell
=
(
$start_hour
*
$interval
)
+
$offset
;
$end_cell
=
(
$end_hour
*
$interval
)
+
(
$offset
-
1
)
;
$end_cell
=
(
$end_hour
*
$interval
)
+
$offset
;
}
}
// Loop through days
// Loop through days
...
...
includes/common/list-table-week.php
View file @
17f571cc
...
@@ -157,8 +157,8 @@ class WP_Event_Calendar_Week_Table extends WP_Event_Calendar_List_Table {
...
@@ -157,8 +157,8 @@ class WP_Event_Calendar_Week_Table extends WP_Event_Calendar_List_Table {
// Start the days loop with the start day
// Start the days loop with the start day
$cell
=
(
$start_hour
*
$interval
)
+
$offset
;
$cell
=
(
$start_hour
*
$interval
)
+
$offset
;
//
D
on't include the end hour
//
Maybe d
on't include the end hour
$end_cell
=
(
$end_hour
*
$interval
)
+
(
$offset
-
1
)
;
$end_cell
=
(
$end_hour
*
$interval
)
+
$offset
;
}
}
// Loop through days
// Loop through days
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment