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

WordPress Trac noreply at wordpress.org
Tue Nov 1 15:18:42 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:  close          |     Focuses:
---------------------------+------------------------------

Comment (by Justin_K):

 That's how a user can manually edit it - how does a plugin
 programmatically edit/remove it on a specific page id? i.e. the following
 is now broken/no effect, what's the replacement?:

 {{{#!php
 <?php
 add_filter('comments_template', 'suppress_comments');
 function suppress_comments($file)
 {
     global $post, $opt_vgb_page;
     if ($post->ID == get_option($opt_vgb_page)) return dirname(__FILE__) .
 '/_blank.php';
     else                                         return $file;
 }
 }}}

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


More information about the wp-trac mailing list