Making WordPress.org


Ignore:
Timestamp:
12/19/2014 09:57:26 PM (11 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Reintroduce Explanations, with editorial flow.

  • Add explanations as an associated post type
  • Add metabox to create, unpublish, and link to edit explanation for a parsed post type
  • Add template tags: get_explanation() and get_explanation_field()
  • Re-enable display of Explanations on the frontend

props DrewAPicture.
fixes #786.

File:
1 edited

Legend:

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

    r1053 r1057  
    4646
    4747    <?php
    48     $explanation = '';
     48    $explanation = get_explanation_field( 'post_content', get_the_ID() );
    4949    if ( $explanation ) :
    5050        ?>
     
    5252        <section class="explanation">
    5353            <h2><?php _e( 'Explanation', 'wporg' ); ?></h2>
    54             <?php the_content(); ?>
     54            <?php echo apply_filters( 'the_content', apply_filters( 'get_the_content', $explanation ) ); ?>
    5555        </section>
    5656    <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.