Making WordPress.org


Ignore:
Timestamp:
07/29/2014 06:57:54 PM (11 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-wp-parser-hook.php

    r724 r768  
    8484        */ ?>
    8585
    86         <?php if ( have_comments() || ( comments_open() && is_user_member_of_blog() ) ) : ?>
     86        <?php if ( comments_open() || '0' != get_comments_number() ) : ?>
    8787        <hr/>
    8888        <section class="examples">
    8989            <h2><?php _e( 'Examples', 'wporg' ); ?></h2>
    90             <?php get_template_part( 'code-example' ); ?>
     90            <?php comments_template(); /* TODO: add '/examples.php' */ ?>
    9191        </section>
    9292        <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.