Making WordPress.org


Ignore:
Timestamp:
07/29/2014 06:57:54 PM (12 years ago)
Author:
coffee2code
Message:

Code Reference: fix so that approved examples are publicly viewable

  • Make examples publicly viewable, if present
  • Hook 'comments_open' to only enable submitting examples by site members
  • Add hook 'wporg_devhub-can_user_post_example' to allow overriding default post commenting status
  • Temporarily disable any non-example commenting
  • Rename wporg_developer_comment() to more appropriate wporg_developer_example()
  • Remove unnecessary code-example template
File:
1 edited

Legend:

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

    r724 r768  
    4040                 * See wporg_developer_comment() in inc/template-tags.php for more.
    4141                 */
    42                 wp_list_comments( array( 'callback' => 'wporg_developer_comment' ) );
     42                wp_list_comments( array( 'callback' => 'wporg_developer_example' ) );
    4343            ?>
    4444        </ol><!-- .comment-list -->
     
    5353
    5454    <?php endif; // have_comments() ?>
     55
     56    <?php if ( DevHub\can_user_post_example( false, get_the_ID() ) ) : ?>
    5557
    5658    <p id="add-example" style="display:none;"><a href=""><?php _e( 'Have an example to add?', 'wporg' ); ?></a></p>
     
    6870    ) ); ?>
    6971
     72    <?php endif; ?>
     73
    7074</div><!-- #comments -->
Note: See TracChangeset for help on using the changeset viewer.