Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#39193 closed defect (bug) (duplicate)

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

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

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 10 years ago.
39193.2.patch​ (1.3 KB ) - added by ramiy 10 years ago.

Download all attachments as: .zip

Change History (5)

#1 @ramiy
10 years ago

  • Keywords has-patch 2nd-opinion added

@DrewAPicture please review the patch.

#2 @jnylen0
10 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
10 years ago

  • Keywords has-patch needs-refresh removed
  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → closed

Duplicate of #39148.

Note: See TracTickets for help on using tickets.