[wp-trac] [WordPress Trac] #39165: Add page to assist with debugging and support
WordPress Trac
noreply at wordpress.org
Sun Mar 11 10:31:05 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 patch in [attachment:39165.16.diff] has few other suggestions that:
- Makes these strings translatable:
- {{{$imagick_version = 'Imagick not available';}}}
- {{{$gs = ( ! empty( $gs ) ? $gs : 'Not available' );}}}
- {{{'value' => ( is_array( $gd ) ? $gd['GD Version'] : 'GD
not available' ),}}}
- Moves inline CSS style to {{{debug.css}}}:
- {{{style="display: block; width: 100%; text-align: <?php echo (
is_rtl() ? 'left' : 'right' ); ?>"}}}
where {{{debug-rtl.css}}} would take care of the {{{text-align left;}}}
case.
- Uses {{{<div>}}} instead of {{{<span style="display: block; width:
100%;">}}}
- Adds numbered placeholders for:
- {{{'<a href="#%s" class="debug-toc">%s</a>'}}}
- {{{"\n\t %s: %s"}}}
- {{{"### %s%s ###\n\n"}}}
- {{{'<h2 id="%s">%s%s</h2>'}}}
- {{{'<li>%s: %s</li>'}}}
- {{{'<tr><td>%s</td><td>%s</td></tr>'}}}
- {{{"%s: %s\n"}}}
- {{{'<a href="%s">%s</a>'}}} (in {{{admin-footer.php}}})
- Changes {{{$item}}} to {{{$subfield}}}.
- Checks if the sub-field's label and value are set: {{{if( isset(
$subfield['label'], $subfield['value'] ) )}}}
- Adds a full stop (dot) for:
- {{{// Trigger all update checks}}}
- {{{'Show debug info'}}} (in {{{admin-footer.php}}})
- Uses tab instead of space indentation for the part in {{{admin-
footer.php}}}.
- Removes a space in array key: {{{$info[ 'wp-active-theme']['fields']}}}
- Adds a span tag around the counters: {{{' <span
class="count">(%d)</span>'}}}
- Capitalizes all words in:
- {{{'System information'}}}
- {{{'Other themes'}}}
- {{{'Media handling'}}}
- {{{'WordPress constants'}}}
- {{{'Filesystem permissions'}}}
- {{{'Permalink structure'}}}
- {{{'Not available'}}}
- {{{'Server architecture'}}}
- {{{'Server settings'}}}
- {{{'PHP time limit'}}}
- {{{'PHP memory limit'}}}
- {{{'PHP max input variables'}}}
- {{{'Max input time'}}}
- {{{'Upload max filesize'}}}
- {{{'PHP post max size'}}}
- {{{'SUHOSIN installed'}}}
- {{{'Server version'}}}
- {{{'Client version'}}}
- {{{'Database user'}}}
- {{{'Database host'}}}
- {{{'Database name'}}}
- {{{'Database prefix'}}}
- {{{'Author website'}}}
- {{{'Parent theme'}}}
- {{{'Supported theme features'}}}
- {{{'The Must Use Plugins directory'}}}
- {{{'Not writable'}}}
- Re-uses the existing strings from {{{wp-admin/options-general.php}}}:
- {{{'Home URL'}}} -> {{{'Site Address (URL)'}}}
- {{{'Site URL'}}} -> {{{'WordPress Address (URL)'}}}
- Wraps the javascript into an anonymous function: {{{( function( $ ) {
... })( jQuery )}}}.
- Adjusts the javascript according to jshint.
- Avoids the {{{onclick}}} attribute and moves it to the script tag
instead:
- {{{onclick="document.getElementById('system-information-copy-
wrapper').style.display = 'block'; this.style.display = 'none';"}}}
- {{{onclick="document.getElementById('system-information-copy-
field').select(); document.execCommand( 'copy' );"}}}
- Uses {{{show()/hide()}}} in jQuery.
- Uses {{{on( 'click', ... )}}} instead of the shortcut {{{click()}}}.
Wasn't sure though what's preferred.
- Adds JS DocBlocks.
- Changes {{{?> <?php } ?> <?php } ?>}}} to {{{} } ?>}}}.
To consider:
- The ticket [https://core.trac.wordpress.org/ticket/40037 #40037 Add
ability to ask wpdb for full db server info] introduces the method
{{{wpdb::db_server_info()}}} that could be useful here.
- Create a {{{debug.js}}} file for the javascript?
- Should more translatable strings end in a dot (.) ?
- Should we move the parentheses out of this translatable string: {{{'(
Latest version: %s )'}}} ?
- Fix parentheses display for RTL languages. (See e.g. #43476)
- Should we use:
- {{{'Not Available'}}} instead of {{{'Imagick not available'}}}
- {{{'Not Available'}}} instead of {{{'GD not available'}}}
to reuse existing strings?
- Have the text {{{'Show debug info.'}}} filterable, like for other text
in the footer?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39165#comment:81>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list