[wp-trac] [WordPress Trac] #57736: Remove unused parameter in query for `get_block_templates` method

WordPress Trac noreply at wordpress.org
Thu Feb 16 17:23:18 UTC 2023


#57736: Remove unused parameter in query for `get_block_templates` method
-------------------------+------------------------------
 Reporter:  oandregal    |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Themes       |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  template
-------------------------+------------------------------

Comment (by oandregal):

 I don't see anything that misbehaves due to this, so I don't think it's a
 bug right now, no.

 However, it is still wrong, and it could induce readers of this code to
 use this pattern in other parts of the codebase thinking
 `get_block_templates` admits that filter and using it inappropriately.

 Hope this helps.

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


More information about the wp-trac mailing list