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

On second thought, a utility isn't needed for this

See a2c0141d8
parent 5a2dceca
......@@ -8,16 +8,3 @@ namespace WP_Cron_Control_Revisited;
function get_plugin_var( $variable ) {
return property_exists( Main::instance(), $variable ) ? Main::instance()->$variable : null;
}
/**
* Delete an event
*
* @param $timestamp int Unix timestamp
* @param $action string name of action used when the event is registered (unhashed)
* @param $instance string md5 hash of the event's arguments array, which Core uses to index the `cron` option
*
* @return bool
*/
function delete_cron_event( $timestamp, $action, $instance ) {
return Cron_Options_CPT::instance()->delete_event( $timestamp, $action, $instance );
}
......@@ -248,7 +248,7 @@ class Main {
}
wp_unschedule_event( $event['timestamp'], $event['action'], $event['args'] );
delete_cron_event( $event['timestamp'], $event['action'], $event['instance'] );
Cron_Options_CPT::instance()->delete_event( $event['timestamp'], $event['action'], $event['instance'] );
// Run the event
do_action_ref_array( $event['action'], $event['args'] );
......
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