diff --git a/bulk-edit-cron-offload.php b/bulk-edit-cron-offload.php index 6ed1c21bbf5036eb8b743a7bd7782bbf6d87ae47..dd1c1aabd16294bdf75336e93f50992e84e3564a 100644 --- a/bulk-edit-cron-offload.php +++ b/bulk-edit-cron-offload.php @@ -16,3 +16,4 @@ require __DIR__ . '/includes/utils.php'; // Plugin functionality require __DIR__ . '/includes/class-main.php'; require __DIR__ . '/includes/class-delete-all.php'; +require __DIR__ . '/includes/class-move-to-trash.php'; diff --git a/includes/class-move-to-trash.php b/includes/class-move-to-trash.php new file mode 100644 index 0000000000000000000000000000000000000000..0275032bd8e1d74637ed3376bbc7767464047f03 --- /dev/null +++ b/includes/class-move-to-trash.php @@ -0,0 +1,26 @@ +<?php + +namespace Automattic\WP\Bulk_Edit_Cron_Offload; + +class Move_To_Trash { + /** + * Class constants + */ + const CRON_EVENT = 'a8c_bulk_edit_move_to_trash'; + + /** + * Register this bulk process' hooks + */ + public static function register_hooks() { + add_action( Main::build_hook( 'trash' ), array( __CLASS__, 'process' ) ); + } + + /** + * Handle a request to delete all trashed items for a given post type + */ + public static function process( $vars ) { + error_log( var_export( $vars, true ) ); + } +} + +Move_To_Trash::register_hooks();