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/content-reference.php

    r725 r768  
    141141    <?php endif; ?>
    142142
    143     <?php if ( have_comments() || ( comments_open() && is_user_member_of_blog() ) ) : ?>
     143    <?php if ( comments_open() || '0' != get_comments_number() ) : ?>
    144144    <hr/>
    145145    <section class="examples">
    146146        <h2><?php _e( 'Examples', 'wporg' ); ?></h2>
    147         <?php get_template_part( 'code-example' ); ?>
     147        <?php comments_template(); /* TODO: add '/examples.php' */ ?>
    148148    </section>
    149149    <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.