General: Use interpolation instead of concatenation for all dynamic hook names.
This fixes the rendering of the hook names on developer.wordpress.org. Props keesiemeijer Fixes #39148 Built from https://develop.svn.wordpress.org/trunk@39600 git-svn-id: http://core.svn.wordpress.org/trunk@39540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -83,19 +83,23 @@ if ( $doaction ) {
|
||||
}
|
||||
|
||||
if ( ! in_array( $doaction, array( 'approve', 'unapprove', 'spam', 'unspam', 'trash', 'delete' ), true ) ) {
|
||||
$screen = get_current_screen()->id;
|
||||
|
||||
/**
|
||||
* Fires when a custom bulk action should be handled.
|
||||
*
|
||||
* The redirect link should be modified with success or failure feedback
|
||||
* from the action to be used to display feedback to the user.
|
||||
*
|
||||
* The dynamic portion of the hook name, `$screen`, refers to the current screen ID.
|
||||
*
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @param string $redirect_url The redirect URL.
|
||||
* @param string $doaction The action being taken.
|
||||
* @param array $items The items to take the action on.
|
||||
*/
|
||||
$redirect_to = apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $comment_ids );
|
||||
$redirect_to = apply_filters( "handle_bulk_actions-{$screen}", $redirect_to, $doaction, $comment_ids );
|
||||
}
|
||||
|
||||
wp_defer_comment_counting( false );
|
||||
|
||||
Reference in New Issue
Block a user