Wählen Sie eine Hintergrundfarbe. Diese wird automatisch mit 50% Transparenz im Frontend angezeigt.
"; } // 4. Render-Funktionen für die Styling-Felder function mrp_tab_title_font_size_render() { $options = get_option('mrp_settings'); $font_size = isset($options['tab_title_font_size']) ? $options['tab_title_font_size'] : '15'; echo " px"; } function mrp_tab_title_font_color_render() { $options = get_option('mrp_settings'); $font_color = isset($options['tab_title_font_color']) ? $options['tab_title_font_color'] : '#2c3e50'; echo ""; } function mrp_rule_title_font_size_render() { $options = get_option('mrp_settings'); $font_size = isset($options['rule_title_font_size']) ? $options['rule_title_font_size'] : '16'; echo " px"; } function mrp_rule_title_font_color_render() { $options = get_option('mrp_settings'); $font_color = isset($options['rule_title_font_color']) ? $options['rule_title_font_color'] : '#2c3e50'; echo ""; } function mrp_rule_content_font_size_render() { $options = get_option('mrp_settings'); $font_size = isset($options['rule_content_font_size']) ? $options['rule_content_font_size'] : '15'; echo " px"; } function mrp_rule_content_font_color_render() { $options = get_option('mrp_settings'); $font_color = isset($options['rule_content_font_color']) ? $options['rule_content_font_color'] : '#6c757d'; echo ""; } // NEU: Hilfsfunktion zur Umwandlung von Hex zu RGBA if (!function_exists('hex_to_rgba')) { function hex_to_rgba($hex, $alpha) { $hex = str_replace("#", "", $hex); if (strlen($hex) == 3) { $r = hexdec(substr($hex, 0, 1).substr($hex, 0, 1)); $g = hexdec(substr($hex, 1, 1).substr($hex, 1, 1)); $b = hexdec(substr($hex, 2, 1).substr($hex, 2, 1)); } else { $r = hexdec(substr($hex, 0, 2)); $g = hexdec(substr($hex, 2, 2)); $b = hexdec(substr($hex, 4, 2)); } return "rgba({$r}, {$g}, {$b}, {$alpha})"; } } // 5. HTML für die Einstellungsseite function mrp_options_page_html() { if (!current_user_can('manage_options')) return; // Lade Einstellungen für die Live-Vorschau $options = get_option('mrp_settings'); // Lade jQuery UI Sortable, falls Drag-and-Drop aktiv ist $enable_drag_drop = isset($options['enable_drag_drop']) ? $options['enable_drag_drop'] : '1'; if ($enable_drag_drop === '1') { wp_enqueue_script('jquery-ui-sortable'); } ?>Für diesen Tab wurden noch keine Regeln erstellt.