Changeset 6911
- Timestamp:
- 02/19/2008 06:52:30 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/shortcodes.php
r6801 r6911 98 98 function shortcode_parse_atts($text) { 99 99 $atts = array(); 100 $pattern = '/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$) /';100 $pattern = '/(\w+)\s*=\s*"([^"]*)"(?:\s|$)|(\w+)\s*=\s*\'([^\']*)\'(?:\s|$)|(\w+)\s*=\s*([^\s\'"]+)(?:\s|$)|"([^"]*)"(?:\s|$)|(\S+)(?:\s|$)/'; 101 101 if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) { 102 102 foreach ($match as $m) { … … 107 107 elseif (!empty($m[5])) 108 108 $atts[strtolower($m[5])] = stripcslashes($m[6]); 109 elseif (isset($m[7]) and strlen($m[7])) 110 $atts[] = stripcslashes($m[7]); 111 elseif (isset($m[8])) 112 $atts[] = stripcslashes($m[8]); 109 113 } 110 114 }
Note: See TracChangeset
for help on using the changeset viewer.