Changeset 7816 for branches/2.5/wp-includes/shortcodes.php
- Timestamp:
- 04/25/2008 12:46:17 AM (18 years ago)
- File:
-
- 1 edited
-
branches/2.5/wp-includes/shortcodes.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/wp-includes/shortcodes.php
r7811 r7816 73 73 return $content; 74 74 75 $pattern = get_shortcode_regex(); 76 return preg_replace_callback('/'.$pattern.'/s', 'do_shortcode_tag', $content); 77 } 78 79 function get_shortcode_regex() { 80 global $shortcode_tags; 75 81 $tagnames = array_keys($shortcode_tags); 76 82 $tagregexp = join( '|', array_map('preg_quote', $tagnames) ); 77 83 78 $pattern = '/\[('.$tagregexp.')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\1\])?/s'; 79 80 return preg_replace_callback($pattern, 'do_shortcode_tag', $content); 84 return '\[('.$tagregexp.')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\1\])?'; 81 85 } 82 86
Note: See TracChangeset
for help on using the changeset viewer.