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

Switch remaining classes to trait

parent db7fdcb6
No related branches found
No related tags found
No related merge requests found
......@@ -12,22 +12,16 @@ namespace Automattic\WP\Bulk_Actions_Cron_Offload;
*/
class Delete_Permanently {
/**
* Class constants
* Common hooks and such
*/
const ACTION = 'delete';
const ADMIN_NOTICE_KEY = 'bulk_actions_cron_offload_delete_permanently';
use Bulk_Actions;
/**
* Register this bulk process' hooks
* Class constants
*/
public static function register_hooks() {
add_action( Main::build_hook( self::ACTION ), array( __CLASS__, 'process' ) );
add_action( Main::build_cron_hook( self::ACTION ), array( __CLASS__, 'process_via_cron' ) );
const ACTION = 'delete';
add_action( 'admin_notices', array( __CLASS__, 'admin_notices' ) );
add_filter( 'posts_where', array( __CLASS__, 'hide_posts' ), 999, 2 );
}
const ADMIN_NOTICE_KEY = 'bulk_actions_cron_offload_delete_permanently';
/**
* Handle a request to delete selected posts from the trash
......
......@@ -12,22 +12,16 @@ namespace Automattic\WP\Bulk_Actions_Cron_Offload;
*/
class Edit {
/**
* Class constants
* Common hooks and such
*/
const ACTION = 'edit';
const ADMIN_NOTICE_KEY = 'bulk_actions_cron_offload_edit';
use Bulk_Actions;
/**
* Register this bulk process' hooks
* Class constants
*/
public static function register_hooks() {
add_action( Main::build_hook( self::ACTION ), array( __CLASS__, 'process' ) );
add_action( Main::build_cron_hook( self::ACTION ), array( __CLASS__, 'process_via_cron' ) );
const ACTION = 'edit';
add_action( 'admin_notices', array( __CLASS__, 'admin_notices' ) );
add_filter( 'posts_where', array( __CLASS__, 'hide_posts' ), 999, 2 );
}
const ADMIN_NOTICE_KEY = 'bulk_actions_cron_offload_edit';
/**
* Handle a request to edit some posts
......
......@@ -12,22 +12,16 @@ namespace Automattic\WP\Bulk_Actions_Cron_Offload;
*/
class Move_To_Trash {
/**
* Class constants
* Common hooks and such
*/
const ACTION = 'trash';
const ADMIN_NOTICE_KEY = 'bulk_actions_cron_offload_move_to_trash';
use Bulk_Actions;
/**
* Register this bulk process' hooks
* Class constants
*/
public static function register_hooks() {
add_action( Main::build_hook( self::ACTION ), array( __CLASS__, 'process' ) );
add_action( Main::build_cron_hook( self::ACTION ), array( __CLASS__, 'process_via_cron' ) );
const ACTION = 'trash';
add_action( 'admin_notices', array( __CLASS__, 'admin_notices' ) );
add_filter( 'posts_where', array( __CLASS__, 'hide_posts' ), 999, 2 );
}
const ADMIN_NOTICE_KEY = 'bulk_actions_cron_offload_move_to_trash';
/**
* Handle a request to move some posts to the trash
......
......@@ -12,22 +12,16 @@ namespace Automattic\WP\Bulk_Actions_Cron_Offload;
*/
class Restore_From_Trash {
/**
* Class constants
* Common hooks and such
*/
const ACTION = 'untrash';
const ADMIN_NOTICE_KEY = 'bulk_actions_cron_offload_restore_from_trash';
use Bulk_Actions;
/**
* Register this bulk process' hooks
* Class constants
*/
public static function register_hooks() {
add_action( Main::build_hook( self::ACTION ), array( __CLASS__, 'process' ) );
add_action( Main::build_cron_hook( self::ACTION ), array( __CLASS__, 'process_via_cron' ) );
const ACTION = 'untrash';
add_action( 'admin_notices', array( __CLASS__, 'admin_notices' ) );
add_filter( 'posts_where', array( __CLASS__, 'hide_posts' ), 999, 2 );
}
const ADMIN_NOTICE_KEY = 'bulk_actions_cron_offload_restore_from_trash';
/**
* Handle a request to restore some posts from the trash
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment