Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#39193 closed defect (bug) (duplicate)

Fix two hook name to meet the naming convention for Dynamic-Hooks

Reported by: ramiy's profile ramiy Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: docs Cc:

Description

The new naming convention for Dynamic-Hooks set in #37748 is not applied for two new hooks introduced in wp4.7:

  • apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes, $id );
  • apply_filters( 'handle_bulk_actions-' . get_current_screen()->id, $redirect_to, $doaction, $comment_ids );


We should replace the hook names to:

  • "handle_network_bulk_actions-{get_current_screen()->id}"
  • "handle_bulk_actions-{get_current_screen()->id}"


The change will also fix the issues we currently see in the code reference:

Attachments (2)

39193.patch (1.3 KB) - added by ramiy 7 years ago.
39193.2.patch (1.3 KB) - added by ramiy 7 years ago.

Download all attachments as: .zip

Change History (5)

@ramiy
7 years ago

@ramiy
7 years ago

#1 @ramiy
7 years ago

  • Keywords has-patch 2nd-opinion added

@DrewAPicture please review the patch.

#2 @jnylen0
7 years ago

  • Keywords needs-refresh added; 2nd-opinion removed

The proposed patches here will not work as intended:

$ wp shell
wp> function a() {}
wp> "some_text_{a()}"
=> string(15) "some_text_{a()}"

String interpolations inside curly braces must start with {$. See http://php.net/manual/en/language.types.string.php#language.types.string.parsing

#3 @ocean90
7 years ago

  • Keywords has-patch needs-refresh removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #39148.

Note: See TracTickets for help on using tickets.