Ticket #26927: 26927.2.patch
File 26927.2.patch, 1.3 KB (added by , 11 years ago) |
---|
-
src/wp-includes/shortcodes.php
286 286 /** 287 287 * Retrieve all attributes from the shortcodes tag. 288 288 * 289 * The attributes list has the attribute name as the key and the value of the290 * attribute as the value in the key/value pair. This allows for easier291 * retrieval of the attributes, since all attributes have to be known.289 * Attributes are returned in key=value pairs as name=value, or index=value 290 * if no name is supplied. If no attributes are passed in the shortcode, 291 * an empty string will instead be returned. 292 292 * 293 293 * @since 2.5.0 294 294 * 295 295 * @param string $text 296 * @return array List of attributes and their value. 296 * @return array|string Array of attributes and their values, empty string 297 * if no attributes were passed. 297 298 */ 298 299 function shortcode_parse_atts($text) { 299 300 $atts = array(); … … 307 308 $atts[strtolower($m[3])] = stripcslashes($m[4]); 308 309 elseif (!empty($m[5])) 309 310 $atts[strtolower($m[5])] = stripcslashes($m[6]); 310 elseif (isset($m[7]) andstrlen($m[7]))311 elseif (isset($m[7]) && strlen($m[7])) 311 312 $atts[] = stripcslashes($m[7]); 312 313 elseif (isset($m[8])) 313 314 $atts[] = stripcslashes($m[8]);