diff --git a/includes/class-delete-permanently.php b/includes/class-delete-permanently.php index e9687589369137339c028125d6436adf1cb8ae7d..4b80dff28610ba52b4811f32d544596cdc9c5324 100644 --- a/includes/class-delete-permanently.php +++ b/includes/class-delete-permanently.php @@ -23,22 +23,6 @@ class Delete_Permanently { const ADMIN_NOTICE_KEY = 'bulk_actions_cron_offload_delete_permanently'; - /** - * Handle a request to delete selected posts from the trash - * - * @param object $vars Bulk-request variables. - */ - public static function process( $vars ) { - $action_scheduled = Main::next_scheduled( $vars ); - - if ( empty( $action_scheduled ) ) { - Main::schedule_processing( $vars ); - Main::do_admin_redirect( self::ADMIN_NOTICE_KEY, true ); - } else { - Main::do_admin_redirect( self::ADMIN_NOTICE_KEY, false ); - } - } - /** * Cron callback to move requested items to trash * diff --git a/includes/class-edit.php b/includes/class-edit.php index b39f7539276a4c2d37c34a94961deced1142bea2..42185cb68b83116377d4b6f4c2ae88fec5acaa19 100644 --- a/includes/class-edit.php +++ b/includes/class-edit.php @@ -23,22 +23,6 @@ class Edit { const ADMIN_NOTICE_KEY = 'bulk_actions_cron_offload_edit'; - /** - * Handle a request to edit some posts - * - * @param object $vars Bulk-request variables. - */ - public static function process( $vars ) { - $action_scheduled = Main::next_scheduled( $vars ); - - if ( empty( $action_scheduled ) ) { - Main::schedule_processing( $vars ); - Main::do_admin_redirect( self::ADMIN_NOTICE_KEY, true ); - } else { - Main::do_admin_redirect( self::ADMIN_NOTICE_KEY, false ); - } - } - /** * Cron callback to edit requested items * diff --git a/includes/class-move-to-trash.php b/includes/class-move-to-trash.php index 379dd25ebfab945971f326b5049bff798bef984c..d087726e914a2e022524590b9270dd3d5f32777e 100644 --- a/includes/class-move-to-trash.php +++ b/includes/class-move-to-trash.php @@ -23,22 +23,6 @@ class Move_To_Trash { const ADMIN_NOTICE_KEY = 'bulk_actions_cron_offload_move_to_trash'; - /** - * Handle a request to move some posts to the trash - * - * @param object $vars Bulk-request variables. - */ - public static function process( $vars ) { - $action_scheduled = Main::next_scheduled( $vars ); - - if ( empty( $action_scheduled ) ) { - Main::schedule_processing( $vars ); - Main::do_admin_redirect( self::ADMIN_NOTICE_KEY, true ); - } else { - Main::do_admin_redirect( self::ADMIN_NOTICE_KEY, false ); - } - } - /** * Cron callback to move requested items to trash * diff --git a/includes/class-restore-from-trash.php b/includes/class-restore-from-trash.php index b36c6a56e3d64f7c3a82e0b429106c7c3f948188..65092a784e77a9c5badc0ccfc1c717e823a744cc 100644 --- a/includes/class-restore-from-trash.php +++ b/includes/class-restore-from-trash.php @@ -23,22 +23,6 @@ class Restore_From_Trash { const ADMIN_NOTICE_KEY = 'bulk_actions_cron_offload_restore_from_trash'; - /** - * Handle a request to restore some posts from the trash - * - * @param object $vars Bulk-request variables. - */ - public static function process( $vars ) { - $action_scheduled = Main::next_scheduled( $vars ); - - if ( empty( $action_scheduled ) ) { - Main::schedule_processing( $vars ); - Main::do_admin_redirect( self::ADMIN_NOTICE_KEY, true ); - } else { - Main::do_admin_redirect( self::ADMIN_NOTICE_KEY, false ); - } - } - /** * Cron callback to restore requested items from trash * diff --git a/includes/trait-bulk-actions.php b/includes/trait-bulk-actions.php index 4c90149f0b4f91f47fddf871c50acef096fd9790..163e5740533e3c868349f0dbceb3d87a3ee6874e 100644 --- a/includes/trait-bulk-actions.php +++ b/includes/trait-bulk-actions.php @@ -28,6 +28,22 @@ trait Bulk_Actions { */ public static function register_extra_hooks() {} + /** + * Process request + * + * @param object $vars Bulk-request variables. + */ + public static function process( $vars ) { + $action_scheduled = Main::next_scheduled( $vars ); + + if ( empty( $action_scheduled ) ) { + Main::schedule_processing( $vars ); + Main::do_admin_redirect( self::ADMIN_NOTICE_KEY, true ); + } else { + Main::do_admin_redirect( self::ADMIN_NOTICE_KEY, false ); + } + } + /** * When an edit is pending for a given post type, hide those posts in the admin *