[wp-trac] [WordPress Trac] #57097: `_add_template_loader_filters` uses `add_filter` instead of `add_action`

WordPress Trac noreply at wordpress.org
Tue Feb 14 15:55:20 UTC 2023


#57097: `_add_template_loader_filters` uses `add_filter` instead of `add_action`
---------------------------------------------+----------------------------
 Reporter:  swissspidy                       |       Owner:  davidbaumwald
     Type:  defect (bug)                     |      Status:  closed
 Priority:  low                              |   Milestone:  6.2
Component:  Themes                           |     Version:
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  good-first-bug has-patch commit  |     Focuses:
---------------------------------------------+----------------------------
Changes (by davidbaumwald):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55335" 55335]:
 {{{
 #!CommitTicketReference repository="" revision="55335"
 Themes: Use `add_action` for `pre_get_posts` hook in
 `_add_template_loader_filters()`.

 Although `add_action` and `add_filter` are internally the same,
 `pre_get_posts` is an action hook.  This change updates the hook type to
 match what developers would expect when evaluating the code.

 Follow-up to [52316].

 Props swissspidy, riccardodicurti.
 Fixes #57097.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57097#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list