'', 'class' => '', ), $atts ); // Get button text from attribute or use default. if ( ! empty( $atts['text'] ) ) { $button_text = $atts['text']; } else { $button_text = __( 'Cookie Preferences', 'wpconsent-cookies-banner-privacy-suite' ); } // Build class string. $classes = array( 'wpconsent-open-preferences', 'button' ); if ( ! empty( $atts['class'] ) ) { // Split by spaces to handle multiple classes. $custom_classes = explode( ' ', $atts['class'] ); foreach ( $custom_classes as $custom_class ) { $sanitized = sanitize_html_class( $custom_class ); if ( ! empty( $sanitized ) ) { $classes[] = $sanitized; } } } $class_string = implode( ' ', $classes ); // Build the button output. $output = ''; return $output; }