Changeset 26557
- Timestamp:
- 12/03/2013 05:07:31 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r26487 r26557 1238 1238 function balanceTags( $text, $force = false ) { 1239 1239 if ( $force || get_option('use_balanceTags') == 1 ) { 1240 /** 1241 * Filter the list of delimiters to be used before tags are balanced. 1242 * 1243 * @since 3.8.0 1244 * 1245 * @param array $delimiters An array of delimiters, e.g '<!--more.*?-->', '<!--nextpage-->'. 1246 */ 1247 $balance_tags_delimiters = apply_filters( 'balance_tags_delimiters', array( '<!--more.*?-->', '<!--nextpage-->' ) ); 1248 // Capture lets PREG_SPLIT_DELIM_CAPTURE return the delimiters 1249 $delimiters_regex = '/(' . implode( '|', $balance_tags_delimiters ) . ')/'; 1250 $parts = preg_split( $delimiters_regex, $text, -1, PREG_SPLIT_DELIM_CAPTURE ); 1251 return implode( '', array_map( 'force_balance_tags', $parts ) ); 1252 } 1253 1254 return $text; 1240 return force_balance_tags( $text ); 1241 } else { 1242 return $text; 1243 } 1255 1244 } 1256 1245
Note: See TracChangeset
for help on using the changeset viewer.