WordPress.org

Making WordPress.org

Changeset 9390


Ignore:
Timestamp:
01/10/2020 10:29:25 PM (7 months ago)
Author:
coffee2code
Message:

Developer: Default to having comment form initially expanded.

Props sebastienserre, Kenshino, coffee2code.
Fixes #4831.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
Files:
3 edited

Legend:

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

    r9325 r9390  
    6464    <?php if ( \DevHub\is_parsed_post_type() && DevHub\can_user_post_note( true, get_the_ID() ) ) : ?>
    6565
    66         <?php if ( is_user_logged_in() ) : ?>
    67             <?php
    68                 /* Hide the add user note link by default.
    69                  * It will be displayed by Javascript.
    70                  * If Javascript is disabled the comment form is displayed and the link stays hidden.
    71                  */
    72             ?>
    73             <p id="add-user-note" style="display: none;"><a href="<?php echo user_trailingslashit( get_permalink() ) . '#respond'; ?>"><?php _e( 'Have a note or feedback to contribute?', 'wporg' ); ?></a></p>
    74         <?php endif; ?>
    75 
    7666        <?php
    7767        if ( class_exists( 'DevHub_User_Submitted_Content' ) )  {
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/user-notes-preview.js

    r7754 r9390  
    7272
    7373        // Set preview heigth when the textarea is visible
    74         $( '#add-user-note, .table-of-contents a[href="#add-note-or-feedback"]' ).click( function( e ) {
     74        $( '.table-of-contents a[href="#add-note-or-feedback"]' ).click( function( e ) {
    7575            e.preventDefault();
    7676            tabs.parents( '.tablist' ).show();
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/user-notes.js

    r7754 r9390  
    77
    88    var commentForm = $( '.comment-form textarea' );
    9     var add_user_note = $( '#add-user-note' ); 
    109    var commentID = window.location.hash;
    1110    var wpAdminBar = 0;
     
    5352
    5453    function showCommentForm() {
    55         if( add_user_note.length ) {
    56             add_user_note.hide();
    57         }
    58 
    59         $( '#respond' ).show();
    60 
    6154        var target = $( '#commentform #add-note-or-feedback' );
    6255        if ( target.length ) {
     
    7568    }
    7669
    77     if( add_user_note.length ) {
    78         add_user_note.show();
    79 
    80         // Hide by default if #add-user-note exists
    81         $( '#respond' ).hide();
    82     }
    83 
    84     $( '#add-user-note, .table-of-contents a[href="#add-note-or-feedback"]' ).click( function( e ) {
     70    $( '.table-of-contents a[href="#add-note-or-feedback"]' ).click( function( e ) {
    8571        e.preventDefault();
    8672        showCommentForm();
Note: See TracChangeset for help on using the changeset viewer.