handle_bulk_actions-{$screen}

handle_bulk_actions-{$screen}

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

See hook in core

Displaying hooks found in version: wordpress-6.7.2

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

  • /wp-admin/edit-comments.php line 120
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    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
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
            $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
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
             * @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
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
        } 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
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
                    $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 345
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
            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
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
        $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();