Changeset 3796
- Timestamp:
- 08/09/2016 10:52:06 PM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/formatting.php
r3785 r3796 22 22 */ 23 23 public static function do_init() { 24 // NOTE: This filtering is temporarily disabled and then restored in 25 // reference/template-explanation.php 26 add_filter( 'the_content', array( __CLASS__, 'fix_unintended_markdown' ), 1 ); 27 24 28 add_filter( 'the_excerpt', array( __CLASS__, 'lowercase_P_dangit_just_once' ) ); 25 29 add_filter( 'the_content', array( __CLASS__, 'make_doclink_clickable' ), 10, 5 ); … … 34 38 35 39 add_filter( 'devhub-format-description', array( __CLASS__, 'fix_param_hash_formatting' ), 9 ); 36 add_action( 'the_content', array( __CLASS__, 'fix_unintended_markdown' ) );37 40 38 41 add_filter( 'devhub-function-return-type', array( __CLASS__, 'autolink_references' ) ); … … 205 208 public static function fix_unintended_markdown( $content, $post_type = null ) { 206 209 // Only apply to parsed content that have the em tag. 207 if ( DevHub\is_parsed_post_type( $post_type ) 208 && false !== strpos( $content, '<em>' ) 209 && false === strpos( $content, '<p>' ) 210 ) { 210 if ( DevHub\is_parsed_post_type( $post_type ) && false !== strpos( $content, '<em>' ) ) { 211 211 $content = preg_replace_callback( 212 212 '/([^\s])<em>(.+)<\/em>/', -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
r3753 r3796 1328 1328 } 1329 1329 1330 $post_field = get_post_field( $field, $explanation, $context ); 1331 1332 return apply_filters( 'the_content', apply_filters( 'get_the_content', $post_field ) ); 1330 return get_post_field( $field, $explanation, $context ); 1333 1331 } 1334 1332 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/reference/template-explanation.php
r3660 r3796 17 17 <?php 18 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 ); 19 20 echo apply_filters( 'the_content', apply_filters( 'get_the_content', $explanation ) ); 21 add_filter( 'the_content', array( 'DevHub_Formatting', 'fix_unintended_markdown' ), 1 ); 20 22 ?> 21 23 </section>
Note: See TracChangeset
for help on using the changeset viewer.