[wp-trac] [WordPress Trac] #39165: Add page to assist with debugging and support

WordPress Trac noreply at wordpress.org
Thu Sep 14 02:33:05 UTC 2017


#39165: Add page to assist with debugging and support
-------------------------+-----------------------
 Reporter:  jorbin       |       Owner:  Clorith
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  4.9
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+-----------------------

Comment (by birgire):

 @Clorith thanks for the detailed feedback. Here are some minor
 adjustments:

 - I get extra indentation for the first section (because the PHP tags are
 not like {{{<textarea><?php}}} and {{{?></textarea>}}}). Maybe this was
 the intention for the first section?:
 {{{
 `
                 ### WordPress ###

 Version: 4.9-alpha-41375
 Language: en_US
 }}}
 - The string {{{'version %1$s by %2$s'}}} is not translatable for {{{wp-
 themes}}}, because of missing {{{__()}}}.
 - We might want to wrap {{{<p>}}} tags around {{{<?php esc_html_e( 'Some
 information may be filtered ...}}}
 - In {{{"### %s%S ###\n\n"}}} I noticed the capital {{{%S}}}.
 - Sometimes {{{AS}}} and sometimes {{{as}}} in {{{foreach}}} loops.

 Some other ideas:

 - Replace {{{<a href="#system-information-table-of-contents">...}}} with
 {{{<a href="#">...}}} to go to the top of the document?
 - Find a way to have the headings in view (hidden under the wp-admin-bar)
 when using named anchors
 - Float the "Return to table of contents" links to the right (or left for
 rtl)
 - Copy to clipboard without displaying the textarea? (might invovle cross-
 browser implementation issues?)
 - Maybe the string can be simplified to "Private information has been
 filtered out from the list you are about to copy." ?

 Then there's the accessibility to consider (like screen-reader-text etc)

 I played with the new filter:

 {{{
 $external_info = apply_filters( 'debug_information', array() );

 // Merge the core and external debug fields
 $info = array_merge( $external_info, $info );
 }}}

 with this demo:

 {{{
 add_filter( 'debug_information', 'warp_drive_debug_information' );

 function warp_drive_debug_information ( $info ) {
         $info['warp-drive-info'] = array(
                 'label'         => __( 'Warp Drive', 'startrek' ),
                 'description'   => __( 'Data from the Enterprise Engine
 Room', 'startrek' ),
                 'show_count'    => true,
                 'fields'        => array(
                         array(
                                 'label' => __( 'Core status', 'startrek'
 ),
                                 'value' => __( 'Stable', 'startrek' )
                         ),
                         array(
                                 'label' => __( 'Warp factor', 'startrek'
 ),
                                 'value' => rand( 1, 10 )
                         ),
                 )
         );
         return $info;
 }
 }}}

 and we can see in the screenshot here below how it's added on top of the
 core info.

 Maybe some plugins will adjust the priority to stay on top?

 I wonder if the external info should be added after the core info?

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


More information about the wp-trac mailing list