WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/03/2019 01:56:25 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Docs: Move the canonical DocBlock for handle_bulk_actions-{$screen} action to wp-admin/edit.php.

  • Document accepted values for the $items parameter.
  • Use interpolated syntax for the filter name.

Props dilipbheda, johnbillion, SergeyBiryukov.
Fixes #48857.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/plugins.php

    r45932 r46811  
    415415            if ( isset( $_POST['checked'] ) ) {
    416416                check_admin_referer( 'bulk-plugins' );
     417
     418                $screen   = get_current_screen()->id;
     419                $sendback = wp_get_referer();
    417420                $plugins  = isset( $_POST['checked'] ) ? (array) wp_unslash( $_POST['checked'] ) : array();
    418                 $sendback = wp_get_referer();
    419 
    420                 /** This action is documented in wp-admin/edit-comments.php */
    421                 $sendback = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $sendback, $action, $plugins );  // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
     421
     422                /** This action is documented in wp-admin/edit.php */
     423                $sendback = apply_filters( "handle_bulk_actions-{$screen}", $sendback, $action, $plugins );  // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    422424                wp_safe_redirect( $sendback );
    423425                exit;
Note: See TracChangeset for help on using the changeset viewer.