tag = $tag; $this->view = $view; } /** * Registers the shortcode. * * @since 1.0.0 */ public function register() { add_shortcode( $this->tag, [ $this->view, 'parse' ] ); } /** * Registers the Shortcode UI setup for the shortcode. * * @since 1.0.0 * * @param array $args Shortcode UI args. */ public function register_ui( $args ) { if ( function_exists( 'shortcode_ui_register_for_shortcode' ) ) { shortcode_ui_register_for_shortcode( $this->tag, $args ); } } }