[wp-trac] [WordPress Trac] #21758: Do not require a file in comments_template()

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 31 20:22:16 UTC 2012


#21758: Do not require a file in comments_template()
-------------------------+-----------------------------
 Reporter:  mattonomics  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Comments     |    Version:  3.4.1
 Severity:  normal       |   Keywords:  has-patch
-------------------------+-----------------------------
 comments_template() is a very useful and reliable way to set up comments
 for a page, but it has a major downfall: it forces a file to be included
 when, in reality, one does not need to be.

 Numerous times it has been the case that I needed comments to be setup in
 the wp_query object, but did not want to output anything at that time. The
 hack I have used is simply to include an empty comments.php file. This
 method is less than desirable for obvious reasons.

 So, I propose that we simply add a parameter I'm calling $require that
 will control whether or not a file is included at all.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21758>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list