Changeset 1136
- Timestamp:
- 01/13/2015 07:33:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/formatting.php
r1091 r1136 24 24 add_filter( 'the_excerpt', array( __CLASS__, 'lowercase_P_dangit_just_once' ) ); 25 25 add_filter( 'the_content', array( __CLASS__, 'make_doclink_clickable' ), 10, 5 ); 26 27 add_filter( 'the_excerpt', array( __CLASS__, 'remove_inline_internal' ) ); 28 add_filter( 'the_content', array( __CLASS__, 'remove_inline_internal' ) ); 26 29 } 27 30 … … 42 45 43 46 return $excerpt; 47 } 48 49 /** 50 * Prevents display of the inline use of {@internal}} as it is not meant to be shown. 51 * 52 * @param string $content The post content. 53 * @param null|string $post_type Optional. The post type. Default null. 54 * @return string 55 */ 56 public static function remove_inline_internal( $content, $post_type = null ) { 57 // Only attempt a change for a parsed post type with an @internal reference in the text. 58 if ( DevHub\is_parsed_post_type( $post_type ) && false !== strpos( $content, '{@internal ' ) ) { 59 $content = preg_replace( '/\{@internal (.+)\}\}/', '', $content ); 60 } 61 62 return $content; 44 63 } 45 64
Note: See TracChangeset
for help on using the changeset viewer.