Making WordPress.org


Ignore:
Timestamp:
06/29/2014 08:41:47 AM (10 years ago)
Author:
coffee2code
Message:

Code Reference: add ability for users to submit code examples (via comments). See #180

Viewable by all, but temporarily only submittable by members of the site.

File:
1 edited

Legend:

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

    r554 r724  
    2323<div id="comments" class="comments-area">
    2424
    25     <?php // You can start editing here -- including this comment! ?>
    26 
    2725    <?php if ( have_comments() ) : ?>
    28         <h2 class="comments-title">
    29             <?php
    30                 printf( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'wporg' ),
    31                     number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
    32             ?>
    33         </h2>
    34 
    3526        <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
    3627        <nav id="comment-nav-above" class="comment-navigation" role="navigation">
     
    6354    <?php endif; // have_comments() ?>
    6455
    65     <?php
    66         // If comments are closed and there are comments, let's leave a little note, shall we?
    67         if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
    68     ?>
    69         <p class="no-comments"><?php _e( 'Comments are closed.', 'wporg' ); ?></p>
    70     <?php endif; ?>
     56    <p id="add-example" style="display:none;"><a href=""><?php _e( 'Have an example to add?', 'wporg' ); ?></a></p>
    7157
    72     <?php comment_form(); ?>
     58    <?php comment_form( array(
     59        'comment_field'       => '<p class="comment-form-comment"><label for="comment">' . _x( 'Add Example', 'noun', 'wporg' ) . '</label> <textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
     60        'comment_notes_after' => '<p class="examples-are-gpl">' .
     61            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' ) .
     62            '</p><p>' .
     63            __( 'The entirety of your submission is considered a code example. Any included non-code text should be formatted as code comments.', 'wporg' ) .
     64            '</p>',
     65        'label_submit'        => __( 'Add Example', 'wporg' ),
     66        'must_log_in'         => '<p>' . sprintf( __( 'You must <a href="%s">log in</a> before being able to submit an example.', 'wporg' ), 'https://wordpress.org/support/bb-login.php' ) . '</p>',
     67        'title_reply'         =>  '', //'Add Example'
     68    ) ); ?>
    7369
    7470</div><!-- #comments -->
Note: See TracChangeset for help on using the changeset viewer.