Making WordPress.org


Ignore:
Timestamp:
12/19/2014 09:57:26 PM (10 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-wp-parser-hook.php

    r1053 r1057  
    4444
    4545        <?php
    46         $explanation = '';
     46        $explanation = get_explanation_field( 'post_content', get_the_ID() );
    4747        if ( $explanation ) :
    4848            ?>
     
    5050            <section class="explanation">
    5151                <h2><?php _e( 'Explanation', 'wporg' ); ?></h2>
    52                 <?php the_content(); ?>
     52                <?php echo apply_filters( 'the_content', apply_filters( 'get_the_content', $explanation ) ); ?>
    5353            </section>
    5454        <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.