[wp-trac] [WordPress Trac] #39193: Fix two hook name to meet the naming convention for Dynamic-Hooks

WordPress Trac noreply at wordpress.org
Fri Dec 9 00:09:56 UTC 2016


#39193: Fix two hook name to meet the naming convention for Dynamic-Hooks
--------------------------+-----------------------------
 Reporter:  ramiy         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:  docs          |
--------------------------+-----------------------------
 The [https://make.wordpress.org/core/handbook/best-practices/coding-
 standards/php/#interpolation-for-naming-dynamic-hooks 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:

 * https://developer.wordpress.org/reference/hooks/handle_bulk_actions-
 get_current_screen-id/

 * https://developer.wordpress.org/reference/hooks
 /handle_network_bulk_actions-get_current_screen-id/

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39193>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list