Making WordPress.org


Ignore:
Timestamp:
06/18/2015 08:42:09 PM (11 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Add support for a blog.

  • Add post-specific template.
  • Add nav menu to house 'Blog' link.
  • Enable general, non-"User Contributed Notes" commenting.
  • Handle post comments distinctly from User Contributed Notes.
  • Comment styling and display scripting.

Fixes #872.
Props atimmer.

File:
1 edited

Legend:

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

    r988 r1675  
    4040                 * See wporg_developer_comment() in inc/template-tags.php for more.
    4141                 */
    42                 wp_list_comments( array( 'callback' => 'wporg_developer_user_note' ) );
     42                if ( is_singular( 'post' ) ) {
     43                    wp_list_comments();
     44                } else {
     45                    wp_list_comments( array( 'callback' => 'wporg_developer_user_note' ) );
     46                }
    4347            ?>
    4448        </ol><!-- .comment-list -->
     
    5458    <?php endif; // have_comments() ?>
    5559
    56     <?php if ( DevHub\can_user_post_note( false, get_the_ID() ) ) : ?>
     60    <?php if ( \DevHub\is_parsed_post_type() && DevHub\can_user_post_note( false, get_the_ID() ) ) : ?>
    5761
    58     <p id="add-user-note" style="display:none;"><a href=""><?php _e( 'Have a note to contribute?', 'wporg' ); ?></a></p>
     62        <p id="add-user-note" style="display:none;"><a href=""><?php _e( 'Have a note to contribute?', 'wporg' ); ?></a></p>
    5963
    60     <?php comment_form( array(
    61         'comment_field'       => DevHub_User_Submitted_Content::wp_editor_comments(),
    62         'comment_notes_after' => '<p>' .
    63             __( 'Notes should supplement code reference entries, for example examples, tips, explanations, use-cases, and best practices.', 'wporg' ) .
    64             '</p><p>' .
    65             __( 'Do not use this form for support requests, discussions, spam, bug reports, complaints, or self-promotion. Entries of this nature will be deleted.', 'wporg' ) .
    66             '</p><p>' .
    67             __( 'You can enter text and code. Use the php, js, or inline code buttons to wrap code snippets.', 'wporg' ) .
    68             '</p><p class="user-notes-are-gpl">' .
    69             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' ) .
    70             '</p>',
    71         'label_submit'        => __( 'Add Note', 'wporg' ),
    72         'must_log_in'         => '<p>' . sprintf( __( 'You must <a href="%s">log in</a> before being able to contribute a note.', 'wporg' ), 'https://wordpress.org/support/bb-login.php' ) . '</p>',
    73         'title_reply'         =>  '', //'Add Example'
    74     ) ); ?>
     64        <?php comment_form( array(
     65            'comment_field'       => DevHub_User_Submitted_Content::wp_editor_comments(),
     66            'comment_notes_after' => '<p>' .
     67                __( 'Notes should supplement code reference entries, for example examples, tips, explanations, use-cases, and best practices.', 'wporg' ) .
     68                '</p><p>' .
     69                __( 'Do not use this form for support requests, discussions, spam, bug reports, complaints, or self-promotion. Entries of this nature will be deleted.', 'wporg' ) .
     70                '</p><p>' .
     71                __( 'You can enter text and code. Use the php, js, or inline code buttons to wrap code snippets.', 'wporg' ) .
     72                '</p><p class="user-notes-are-gpl">' .
     73                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' ) .
     74                '</p>',
     75            'label_submit'        => __( 'Add Note', 'wporg' ),
     76            'must_log_in'         => '<p>' . sprintf( __( 'You must <a href="%s">log in</a> before being able to contribute a note.', 'wporg' ), 'https://wordpress.org/support/bb-login.php' ) . '</p>',
     77            'title_reply'         =>  '', //'Add Example'
     78        ) ); ?>
    7579
    7680    <?php endif; ?>
    7781
     82    <?php if ( ! \DevHub\is_parsed_post_type() && comments_open() ) : ?>
     83        <p id="add-user-note" style="display:none;"><a href=""><?php _e( 'Leave a reply', 'wporg' ); ?></a></p>
     84
     85        <?php comment_form(); ?>
     86    <?php endif; ?>
     87
    7888</div><!-- #comments -->
Note: See TracChangeset for help on using the changeset viewer.