src/View/Parsers/ShortcodeParser.php
public function register($shortcode, $callback)
    {
        if (is_callable($callback)) {
            $this->shortcodes[$shortcode] = $callback;
        } else {
            throw new InvalidArgumentException("Callback is not callable");
        }
        return $this;
    }
public function register($shortcode, $callback)
    {
        if (is_callable($callback)) {
            $this->shortcodes[$shortcode] = $callback;
        } else {
            throw new InvalidArgumentException("Callback is not callable");
        }
        return $this;
    }
public function register ( $ shortcode , $ callback ) { if ( is_callable ( $ callback ) ) { $ this -> shortcodes [ $ shortcode ] = $ callback ; } else { throw new InvalidArgumentException ( "Callback is not callable" ) ; } return $ this ; }
Register a shortcode, and attach it to a PHP callback.

The callback for a shortcode will have the following arguments passed to it:
- Any parameters attached to the shortcode as an associative array (keys are lower-case).
- Any content enclosed within the shortcode (if it is an enclosing shortcode). Note that any content within
this will not have been parsed, and can optionally be fed back into the parser.
- The {@link ShortcodeParser} instance used to parse the content.
- The shortcode tag name that was matched within the parsed content.
- An associative array of extra information about the shortcode being parsed.

@param string $shortcode The shortcode tag to map to the callback - normally in lowercase_underscore format.
@param callback $callback The callback to replace the shortcode with.
@return $this
Register a shortcode and attach it to a PHP callback .