Changeset 2942 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
- Timestamp:
- 04/12/2016 09:43:39 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
r2941 r2942 1147 1147 $summary = str_replace( array( '<!--', '-->' ), array( '<code><!--', '--></code>' ), $summary ); 1148 1148 1149 // Fix standalone HTML tags that were not backticked. 1150 // e.g. https://developer.wordpress.org/reference/hooks/comment_form/ 1151 if ( false !== strpos( $summary, '<' ) ) { 1152 $summary = preg_replace_callback( 1153 '/(\s)(<[^ >]+>)(\s)/', 1154 function ( $matches ) { return $matches[1] . '<code>' . htmlentities( $matches[2] ) . '</code>' . $matches[3]; }, 1155 $summary 1156 ); 1157 } 1158 1149 1159 $summary = apply_filters( 'the_excerpt', apply_filters( 'get_the_excerpt', $summary ) ); 1150 1160 }
Note: See TracChangeset
for help on using the changeset viewer.