Verified Commit a6ff76de authored by Erick Hitter's avatar Erick Hitter
Browse files

Only re-sort the array when filtering the `cron` option

parent 9c3a0928
......@@ -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
......
......@@ -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 );
......
Supports Markdown
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