public function parseShortCodeTag($matches)
    {
        // allow [[foo]] syntax for escaping a tag
        if ($matches[1] == '[' && $matches[6] == ']') {
            return substr($matches[0], 1, -1);
        }

        $tag        = $matches[2];
        $attributes = $this->parseShortCodeAttributes($matches[3]);

        if (isset($matches[5])) {
            // enclosing tag - extra parameter
            return $matches[1] . call_user_func(
                $this->shortCodesTags[$tag],
                $attributes,
                $matches[5],
                $tag,
                $this
            ) . $matches[6];
        } else {
            // self-closing tag
            return $matches[1] . call_user_func(
                $this->shortCodesTags[$tag],
                $attributes,
                null,
                $tag,
                $this
            ) . $matches[6];
        }
    }
public function parseShortCodeTag($matches)
    {
        // allow [[foo]] syntax for escaping a tag
        if ($matches[1] == '[' && $matches[6] == ']') {
            return substr($matches[0], 1, -1);
        }

        $tag        = $matches[2];
        $attributes = $this->parseShortCodeAttributes($matches[3]);

        if (isset($matches[5])) {
            // enclosing tag - extra parameter
            return $matches[1] . call_user_func(
                $this->shortCodesTags[$tag],
                $attributes,
                $matches[5],
                $tag,
                $this
            ) . $matches[6];
        } else {
            // self-closing tag
            return $matches[1] . call_user_func(
                $this->shortCodesTags[$tag],
                $attributes,
                null,
                $tag,
                $this
            ) . $matches[6];
        }
    }
public function parseShortCodeTag ( $ matches ) { // allow [[foo]] syntax for escaping a tag if ( $ matches [ 1 ] == '[' && $ matches [ 6 ] == ']' ) { return substr ( $ matches [ 0 ] , 1 , - 1 ) ; } $ tag = $ matches [ 2 ] ; $ attributes = $ this -> parseShortCodeAttributes ( $ matches [ 3 ] ) ; if ( isset ( $ matches [ 5 ] ) ) { // enclosing tag - extra parameter return $ matches [ 1 ] . call_user_func ( $ this -> shortCodesTags [ $ tag ] , $ attributes , $ matches [ 5 ] , $ tag , $ this ) . $ matches [ 6 ] ; } else { // self-closing tag return $ matches [ 1 ] . call_user_func ( $ this -> shortCodesTags [ $ tag ] , $ attributes , null , $ tag , $ this ) . $ matches [ 6 ] ; } }
Parse short code tag

@param array $matches

@return string
Parse short code tag