renderer = $renderer; } public function register(): void { add_shortcode( 'mowl_form', array( $this, 'render' ) ); } /** @param array|string $atts */ public function render( $atts ): string { $atts = shortcode_atts( array( 'tags' => '', 'fields' => '', 'button' => '', 'success' => '', 'pending' => '', 'doi' => '', 'consent' => '', 'consent_text' => '', 'redirect' => '', ), is_array( $atts ) ? $atts : array(), 'mowl_form' ); return $this->renderer->render( $atts, 'shortcode' ); } }