[wp-trac] [WordPress Trac] #56939: Twenty Twenty-Three never calls comments_template

WordPress Trac noreply at wordpress.org
Tue Nov 1 05:18:33 UTC 2022


#56939: Twenty Twenty-Three never calls comments_template
---------------------------+------------------------------
 Reporter:  Justin_K       |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:  6.1
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------
Changes (by mukesh27):

 * version:   => 6.1
 * component:  General => Bundled Theme


Old description:

> All themes are supposed to apply the comments_template filter to allow
> plugins to replace the comment template. Twenty Twenty-Three does not.
>
> Repro:
>
> ```
> // Pages still load fine with this here, which proves that it is never
> calling this filter as it should
> add_filter('comments_template', 'suppress_comments');
> function suppress_comments($file)
> {
>     die("it was called");
> }
> ```
>
> Twenty Twenty-Three thus breaks any plugins that rely on this filter to
> swap out the comment template.

New description:

 All themes are supposed to apply the comments_template filter to allow
 plugins to replace the comment template. Twenty Twenty-Three does not.

 Repro:

 {{{
 // Pages still load fine with this here, which proves that it is never
 calling this filter as it should
 add_filter('comments_template', 'suppress_comments');
 function suppress_comments($file)
 {
     die("it was called");
 }
 }}}

 Twenty Twenty-Three thus breaks any plugins that rely on this filter to
 swap out the comment template.

--

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


More information about the wp-trac mailing list