-
+
Regeln für diesen Tab
$rule) : ?>
-
+
-
-
+
+
@@ -310,16 +311,16 @@ function mrp_options_page_html() {
-
+
-
Hier können Sie Ihre Einstellungen und Regeln exportieren, um sie zu sichern oder auf einer anderen Seite zu importieren.
+
-
+
-
+
-
+
@@ -328,66 +329,30 @@ function mrp_options_page_html() {
-
-
-
Keine Regeln wurden im Backend konfiguriert.';
- }
+ if (empty($tabs) && !$show_welcome_tab) { return '
' . esc_html__('Keine Regeln wurden im Backend konfiguriert.', 'multi-rules') . '
'; }
- // Frontend-Script und Style registrieren
wp_enqueue_style('mrp-frontend-style', plugin_dir_url(__FILE__) . 'style.css', array(), '8.0');
wp_enqueue_script('mrp-frontend-script', plugin_dir_url(__FILE__) . 'script.js', array('jquery'), '8.0', true);
- // Daten an das Frontend-Script übergeben
- wp_localize_script('mrp-frontend-script', 'mrp_frontend_vars', [
- 'enable_animations' => $enable_animations,
- ]);
+ wp_localize_script('mrp-frontend-script', 'mrp_frontend_vars', [ 'enable_animations' => $enable_animations ]);
- // Beginne die Ausgabepufferung
ob_start();
- // NEU: Datum der letzten Aktualisierung abrufen und formatieren, NUR wenn die Option aktiv ist
$last_updated_html = '';
if ($show_last_updated && isset($options['last_updated']) && is_numeric($options['last_updated'])) {
$last_updated_timestamp = $options['last_updated'];
- // Verwendet das im WordPress-Backend eingestellte Datumsformat
- $formatted_date = date_i18n(get_option('date_format'), $last_updated_timestamp);
- $last_updated_html = '
Zuletzt aktualisiert am: ' . esc_html($formatted_date) . '
';
+ $date_format = sanitize_text_field( get_option('date_format') );
+ $formatted_date = date_i18n( $date_format, $last_updated_timestamp );
+ /* translators: %s: Formatted date. */
+ $last_updated_html = '
' . sprintf(esc_html__('Zuletzt aktualisiert am: %s', 'multi-rules'), esc_html($formatted_date)) . '
';
}
?>
Willkommen';
- $is_first_tab = false;
- }
-
- // Benutzerdefinierte Tabs hinzufügen
- if (!empty($tabs)) {
- foreach ($tabs as $index => $tab) {
- $active_class = $is_first_tab ? 'active' : '';
- $nav_buttons_html .= '';
- $is_first_tab = false;
- }
- }
-
- // Alle Buttons auf einmal ausgeben
- echo $nav_buttons_html;
+ if ($show_welcome_tab) { $nav_buttons_html .= ''; $is_first_tab = false; }
+ if (!empty($tabs)) { foreach ($tabs as $index => $tab) { $active_class = $is_first_tab ? 'active' : ''; $nav_buttons_html .= ''; $is_first_tab = false; } }
+ echo wp_kses_post($nav_buttons_html);
?>
-
+
$tab): ?>
-
+
-
Für diesen Tab wurden noch keine Regeln erstellt.
+
-
+