Changeset 6259 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/reference/template-explanation.php
- Timestamp:
- 12/11/2017 08:57:30 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/reference/template-explanation.php
r6258 r6259 9 9 namespace DevHub; 10 10 11 if ( $explanation = get_explanation_ field( 'post_content',get_the_ID() ) ) :11 if ( $explanation = get_explanation_content( get_the_ID() ) ) : 12 12 ?> 13 13 <hr /> … … 15 15 <h2><?php _e( 'More Information', 'wporg' ); ?></h2> 16 16 17 <?php 18 // Output the explanation. Passed through 'the_content' on retrieval, thus no escaping. 19 remove_filter( 'the_content', array( 'DevHub_Formatting', 'fix_unintended_markdown' ), 1 ); 20 global $post; 21 $orig = $post; 22 $post = get_explanation( get_the_ID() ); 23 echo apply_filters( 'the_content', apply_filters( 'get_the_content', $explanation ) ); 24 $post = $orig; 25 add_filter( 'the_content', array( 'DevHub_Formatting', 'fix_unintended_markdown' ), 1 ); 26 ?> 17 <?php echo $explanation; // Already escaped. ?> 27 18 </section> 28 19 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.