Making WordPress.org


Ignore:
Timestamp:
04/04/2017 05:45:12 PM (8 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Improve organization of the user contributed note submission area.

  • Move some writing-related prefatory text into list above comment textarea
  • Leave remaining submit-related text below comment textarea, but formatted as a list
  • Add button-like styles around the code buttons text
  • Minor string tweaks
  • Ensure autoscroll goes to top of prefatory text and not just to the textarea

Props DrewAPicture.
Fixes #1905.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/comments.php

    r3852 r5239  
    6868            'class_form'          => 'comment-form tab-container',
    6969            'comment_field'       => DevHub_User_Submitted_Content::wp_editor_comments(),
    70             'comment_notes_after' => DevHub_Note_Preview::comment_preview() .
    71                 '<p>' .
    72                 __( 'Notes should supplement code reference entries, for example examples, tips, explanations, use-cases, and best practices.', 'wporg' ) .
    73                 '</p><p>' .
    74                 __( 'Feedback can be to report errors or omissions with the documentation on this page. Such feedback will not be publicly posted.', 'wporg' ) .
    75                 '</p><p>' .
    76                 __( 'Do not use this form for support requests, discussions, spam, bug reports, complaints, or self-promotion. Entries of this nature will be deleted.', 'wporg' ) .
    77                 '</p><p>' .
    78                 __( 'You can enter text and code. Use the php, js, or inline code buttons to wrap code snippets.', 'wporg' ) .
    79                 '</p><p>' .
    80                 __( 'In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key. In some cases the Esc key will need to be pressed twice before the Tab key will allow you to continue.', 'wporg' ) .
    81                 '</p><p class="user-notes-are-gpl">' .
    82                 sprintf( __( '<strong>NOTE:</strong> All contributions are licensed under <a href="%s">GFDL</a> and are moderated before appearing on the site.', 'wporg' ), 'https://gnu.org/licenses/fdl.html' ) .
    83                 '</p>',
     70            'logged_in_as'        => '<p class="logged-in-as">'
     71                . sprintf(
     72                    /* translators: 1: user profile link, 2: accessibility text, 3: user name, 4: logout URL */
     73                    __( '<a href="%1$s" aria-label="%2$s">Logged in as %3$s</a>. <a href="%4$s">Log out?</a>' ),
     74                    'https://profiles.wordpress.org/' . esc_attr( wp_get_current_user()->user_nicename ),
     75                    /* translators: %s: user name */
     76                    esc_attr( sprintf( __( 'Logged in as %s. Edit your profile.' ), $user_identity ) ),
     77                    $user_identity,
     78                    wp_logout_url( apply_filters( 'the_permalink', get_permalink() ) )
     79                )
     80                . '</p><p><ul><li>'
     81                . __( 'Notes should supplement code reference entries, for example examples, tips, explanations, use-cases, and best practices.', 'wporg' )
     82                . '</li><li>'
     83                . __( 'Feedback can be to report errors or omissions with the documentation on this page. Such feedback will not be publicly posted.', 'wporg' )
     84                . '</li><li>'
     85                /* translators: 1: php button, 2: js button, 3: inline code button */
     86                . sprintf(
     87                    __( 'You can enter text and code. Use the %1$s, %2$s, or %3$s buttons to wrap code snippets.', 'wporg' ),
     88                    '<span class="text-button">php</span>',
     89                    '<span class="text-button">js</span>',
     90                    '<span class="text-button">' . __( 'inline code', 'wporg' ) . '</span>'
     91                )
     92                . '</li></ul></p>',
     93            'comment_notes_after' => DevHub_Note_Preview::comment_preview()
     94                . '<p>'
     95                . __( 'Submission Notes:', 'wporg' )
     96                . '<ul><li>'
     97                . __( 'This form is not for support requests, discussions, spam, bug reports, complaints, or self-promotion. Entries of this nature will be deleted.', 'wporg' )
     98                . '</li><li>'
     99                . __( 'In the editing area the Tab key enters a tab character. To move below this area by pressing Tab, press the Esc key followed by the Tab key. In some cases the Esc key will need to be pressed twice before the Tab key will allow you to continue.', 'wporg' )
     100                . '</li><li class="user-notes-are-gpl">'
     101                . sprintf(
     102                    /* translators: 1: GFDL link */
     103                    __( '<strong>NOTE:</strong> All contributions are licensed under %s and are moderated before appearing on the site.', 'wporg' ),
     104                    '<a href="https://gnu.org/licenses/fdl.html">GFDL</a>'
     105                )
     106                . '</li></ul></p>',
    84107            'label_submit'        => __( 'Add Note or Feedback', 'wporg' ),
    85108            'must_log_in'         => '<p>' . sprintf(
Note: See TracChangeset for help on using the changeset viewer.