Make WordPress Core


Ignore:
Timestamp:
12/14/2016 04:17:38 AM (9 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/site-themes.php

    r38957 r39600  
    125125                $themes = (array) $_POST['checked'];
    126126                $n = count( $themes );
     127                $screen = get_current_screen()->id;
     128
    127129                /**
    128130                 * Fires when a custom bulk action should be handled.
     
    130132                 * The redirect link should be modified with success or failure feedback
    131133                 * from the action to be used to display feedback to the user.
     134                 *
     135                 * The dynamic portion of the hook name, `$screen`, refers to the current screen ID.
    132136                 *
    133137                 * @since 4.7.0
     
    136140                 * @param string $action       The action being taken.
    137141                 * @param array  $items        The items to take the action on.
    138                  * @param int    $site_id      The site id.
     142                 * @param int    $site_id      The site ID.
    139143                 */
    140                 $referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes, $id );
     144                $referer = apply_filters( "handle_network_bulk_actions-{$screen}", $referer, $action, $themes, $id );
    141145            } else {
    142146                $action = 'error';
Note: See TracChangeset for help on using the changeset viewer.