[wp-trac] [WordPress Trac] #36424: graphically visualize if comments are closed (in wp-admin/edit.php)

WordPress Trac noreply at wordpress.org
Fri Apr 8 20:47:47 UTC 2016


#36424: graphically visualize if comments are closed (in wp-admin/edit.php)
----------------------------+---------------------------------
 Reporter:  pixelverbieger  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Comments        |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  ui, administration
----------------------------+---------------------------------

Comment (by Presskopp):

 I have a pre-patch, or patch-idea:

 Apply the following change in

 wp-admin\includes\class-wp-list-table.php:658 (wordpress-4.5-RC1)

 {{{#!php

                 // No comments at all.
                 if (!comments_open( $post_id )) {
                         printf( '<span aria-hidden="true"><span
 class="dashicons dashicons-lock"></span></span><span class="screen-reader-
 text">%s</span>',
                                 __( 'Comments closed' )
                         );
                 // Comments are closed, show a lock then - Translation
 needed
                 } elseif ( ! $approved_comments && ! $pending_comments ) {
                         printf( '<span aria-hidden="true">—</span><span
 class="screen-reader-text">%s</span>',
                                 __( 'No comments' )
                         );
 }}}

 Now you may feed the fish with it :-)

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


More information about the wp-trac mailing list