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

WordPress Trac noreply at wordpress.org
Fri Mar 2 12:05:54 UTC 2018


#39165: Add page to assist with debugging and support
-----------------------------------+-----------------------
 Reporter:  jorbin                 |       Owner:  Clorith
     Type:  task (blessed)         |      Status:  reopened
 Priority:  normal                 |   Milestone:  5.0
Component:  Administration         |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  ui-feedback has-patch  |     Focuses:
-----------------------------------+-----------------------

Comment (by birgire):

 The problem here is that the field values currently don't support arrays.

 We have:

 {{{
 $info['wp-media']['fields'][] = array(
         'label' => __( 'Imagick Resource Limits' ),
         'value' => $limits //<-- a problematic array
 );

 }}}

 and there are two places where these field values are displayed with:

 {{{
 foreach ( $details['fields'] as $field ) {
         if ( isset( $field['private'] ) && true === $field['private'] ) {
                 continue;
         }

         printf(
                 "%s: %s\n",
                 esc_html( $field['label'] ),
                 esc_html( $field['value'] )
         );
 }

 }}}

 and

 {{{
 foreach ( $details['fields'] as $field ) {
         printf(
                 '<tr><td>%s</td><td>%s</td></tr>',
                 esc_html( $field['label'] ),
                 esc_html( $field['value'] )
         );
 }

 }}}



 Two (~~three~~) options to fix that:

 - New line for each {{{$limits}}} value.
 - Same line for each {{{$limits}}} value + translatable key label.
 - ~~Remove this field~~.

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


More information about the wp-trac mailing list