Skip to content
Snippets Groups Projects
Commit c7305154 authored by Erick Hitter's avatar Erick Hitter
Browse files

Can't use `handle_bulk_actions-$screen_id` because it doesn't fire, since we unset the action

parent 59c39cb3
No related branches found
No related tags found
No related merge requests found
...@@ -29,10 +29,12 @@ class Delete_All { ...@@ -29,10 +29,12 @@ class Delete_All {
if ( $existing_event_ts ) { if ( $existing_event_ts ) {
// TODO: Notice that event already scheduled // TODO: Notice that event already scheduled
self::redirect_error();
} else { } else {
wp_schedule_single_event( time(), self::CRON_EVENT, array( $vars ) ); wp_schedule_single_event( time(), self::CRON_EVENT, array( $vars ) );
// TODO: Notice that event scheduled // TODO: Notice that event scheduled
self::redirect_success();
} }
} }
...@@ -86,6 +88,22 @@ class Delete_All { ...@@ -86,6 +88,22 @@ class Delete_All {
return false; return false;
} }
} }
/**
*
*/
public static function redirect_error() {
// TODO: implement
self::redirect_success();
}
/**
*
*/
public static function redirect_success() {
wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce', 'delete_all', 'delete_all2', ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
exit;
}
} }
Delete_All::register_hooks(); Delete_All::register_hooks();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment