handle_bulk_actions-{$screen}

handle_bulk_actions-{$screen}

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('handle_bulk_actions-{$screen}') is found 7 times:

  • /wp-admin/edit-comments.php line 120
    	if ( ! in_array( $doaction, array( 'approve', 'unapprove', 'spam', 'unspam', 'trash', 'delete' ), true ) ) {
    		$screen = get_current_screen()->id;
    
    		/** This action is documented in wp-admin/edit.php */
    		$redirect_to = apply_filters( "handle_bulk_actions-{$screen}", $redirect_to, $doaction, $comment_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    	}
    
    	wp_defer_comment_counting( false );
    
    	if ( $approved ) {
    		$redirect_to = add_query_arg( 'approved', $approved, $redirect_to );
    
  • /wp-admin/edit-tags.php line 207
    		$screen = get_current_screen()->id;
    		$tags   = (array) $_REQUEST['delete_tags'];
    
    		/** This action is documented in wp-admin/edit.php */
    		$location = apply_filters( "handle_bulk_actions-{$screen}", $location, $wp_list_table->current_action(), $tags ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    		break;
    }
    
    if ( ! $location && ! empty( $_REQUEST['_wp_http_referer'] ) ) {
    	$location = remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) );
    }
    
  • /wp-admin/edit.php line 222
    			 * @param string $doaction The action being taken.
    			 * @param array  $items    The items to take the action on. Accepts an array of IDs of posts,
    			 *                         comments, terms, links, plugins, attachments, or users.
    			 */
    			$sendback = apply_filters( "handle_bulk_actions-{$screen}", $sendback, $doaction, $post_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    			break;
    	}
    
    	$sendback = remove_query_arg( array( 'action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view' ), $sendback );
    
    	wp_redirect( $sendback );
    
  • /wp-admin/link-manager.php line 38
    	} else {
    		$screen = get_current_screen()->id;
    
    		/** This action is documented in wp-admin/edit.php */
    		$redirect_to = apply_filters( "handle_bulk_actions-{$screen}", $redirect_to, $doaction, $bulklinks ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    	}
    	wp_redirect( $redirect_to );
    	exit;
    } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
    	wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
    	exit;
    
  • /wp-admin/plugins.php line 545
    				$sendback = wp_get_referer();
    				$plugins  = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array();
    
    				/** This action is documented in wp-admin/edit.php */
    				$sendback = apply_filters( "handle_bulk_actions-{$screen}", $sendback, $action, $plugins ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    				wp_safe_redirect( $sendback );
    				exit;
    			}
    			break;
    	}
    }
    
  • /wp-admin/upload.php line 344
    		default:
    			$screen = get_current_screen()->id;
    
    			/** This action is documented in wp-admin/edit.php */
    			$location = apply_filters( "handle_bulk_actions-{$screen}", $location, $doaction, $post_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    	}
    
    	wp_redirect( $location );
    	exit;
    } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
    	wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
    
  • /wp-admin/users.php line 590
    			$sendback = wp_get_referer();
    			$user_ids = array_map( 'intval', (array) $_REQUEST['users'] );
    
    			/** This action is documented in wp-admin/edit.php */
    			$sendback = apply_filters( "handle_bulk_actions-{$screen}", $sendback, $wp_list_table->current_action(), $user_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    
    			wp_safe_redirect( $sendback );
    			exit;
    		}
    
    		$wp_list_table->prepare_items();