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
WP Plugins
Cron-Control
Commits
a6ff76de
Verified
Commit
a6ff76de
authored
Nov 18, 2016
by
Erick Hitter
Browse files
Only re-sort the array when filtering the `cron` option
parent
9c3a0928
Changes
2
Hide whitespace changes
Inline
Side-by-side
includes/class-cron-options-cpt.php
View file @
a6ff76de
...
...
@@ -122,6 +122,8 @@ class Cron_Options_CPT extends Singleton {
}
}
while
(
true
);
// Re-sort the array just as Core does when events are scheduled
// Ensures events are sorted chronologically
uksort
(
$cron_array
,
'strnatcasecmp'
);
// If we're unscheduling an event, hold onto the previous value so we can identify what's unscheduled
...
...
includes/class-events.php
View file @
a6ff76de
...
...
@@ -31,10 +31,6 @@ class Events extends Singleton {
return
array
(
'events'
=>
null
,
);
}
// To be safe, re-sort the array just as Core does when events are scheduled
// Ensures events are sorted chronologically
uksort
(
$events
,
'strnatcasecmp'
);
// Simplify array format for further processing
$events
=
collapse_events_array
(
$events
);
...
...
Write
Preview
Supports
Markdown
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