|string $atts Attributes; WordPress passes an empty string without attributes. */ public static function render( array|string $atts ): string { $atts = shortcode_atts( array( 'list' => '', 'view' => '', 'name' => 'no', 'title' => '', 'button' => '', ), is_array( $atts ) ? $atts : array(), self::TAG ); return Renderer::render( array( 'list' => sanitize_key( (string) $atts['list'] ), 'view' => sanitize_key( (string) $atts['view'] ), 'name' => in_array( strtolower( (string) $atts['name'] ), array( '1', 'yes', 'true', 'on' ), true ), 'title' => sanitize_text_field( (string) $atts['title'] ), 'button' => sanitize_text_field( (string) $atts['button'] ), ) ); } }