Twitter\WordPress\Shortcodes\Follow::init PHP Method

init() public static method

Register shortcode macro and handler
Since: 1.0.0
public static init ( ) : void
return void
    public static function init()
    {
        $classname = get_called_class();
        add_shortcode(static::SHORTCODE_TAG, array($classname, 'shortcodeHandler'));
        // convert a URL into the shortcode equivalent
        wp_embed_register_handler(static::SHORTCODE_TAG, static::URL_REGEX, array($classname, 'linkHandler'), 1);
        // Shortcode UI, if supported
        add_action('register_shortcode_ui', array($classname, 'shortcodeUI'), 5, 0);
    }