Make WordPress Core

Ticket #26927: 26927.patch

File 26927.patch, 1.2 KB (added by TobiasBg, 11 years ago)

Fix inline docs, as fixing the function's return value is not really feasible

  • src/wp-includes/shortcodes.php

    diff --git src/wp-includes/shortcodes.php src/wp-includes/shortcodes.php
    index 0b2b732..cc48e88 100644
    function do_shortcode_tag( $m ) { 
    289289 * The attributes list has the attribute name as the key and the value of the
    290290 * attribute as the value in the key/value pair. This allows for easier
    291291 * retrieval of the attributes, since all attributes have to be known.
     292 * Attributes not in key=value notation will be added to the list with a numerical key.
     293 * If no attributes are passed in the shortcode, an empty string will be returned.
    292294 *
    293295 * @since 2.5.0
    294296 *
    295297 * @param string $text
    296  * @return array List of attributes and their value.
     298 * @return array|string Array of attributes and their values, empty string if no attributes were passed.
    297299 */
    298300function shortcode_parse_atts($text) {
    299301        $atts = array();
    function shortcode_parse_atts($text) { 
    307309                                $atts[strtolower($m[3])] = stripcslashes($m[4]);
    308310                        elseif (!empty($m[5]))
    309311                                $atts[strtolower($m[5])] = stripcslashes($m[6]);
    310                         elseif (isset($m[7]) and strlen($m[7]))
     312                        elseif (isset($m[7]) && strlen($m[7]))
    311313                                $atts[] = stripcslashes($m[7]);
    312314                        elseif (isset($m[8]))
    313315                                $atts[] = stripcslashes($m[8]);