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

init() public static method

Register shortcode macro and handler
Since: 1.3.0
public static init ( ) : void
return void
    public static function init()
    {
        add_shortcode(static::SHORTCODE_TAG, array(__CLASS__, 'shortcodeHandler'));
        // pass a Periscope profile URL through the Periscope On Air shortcode handler
        wp_embed_register_handler(self::SHORTCODE_TAG, static::PERISCOPE_PROFILE_URL_REGEX, array(__CLASS__, 'linkHandler'), 1);
        // Shortcode UI, if supported
        add_action('register_shortcode_ui', array(__CLASS__, 'shortcodeUI'), 5, 0);
    }