Created
January 17, 2021 09:47
-
-
Save gvgvgvijayan/4b9fd90ad26ef5dba74a594c778f31f3 to your computer and use it in GitHub Desktop.
Revisions
-
gvgvgvijayan created this gist
Jan 17, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ <?php ... /** * Get bulk actions. * * @return void */ public function process_bulk_action() { if ( 'trash' === $this->current_action() ) { $post_ids = filter_input( INPUT_GET, 'draft_id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ); if ( is_array( $post_ids ) ) { $post_ids = array_map( 'intval', $post_ids ); if ( count( $post_ids ) ) { array_map( 'wp_trash_post', $post_ids ); } } } } ...