Update from Git Manager GUI

This commit is contained in:
2026-03-30 20:42:44 +02:00
parent 85d12e832d
commit e417f31c99
3 changed files with 303 additions and 87 deletions

View File

@@ -110,26 +110,39 @@ function mm_assistant_query() {
$player_name = mm_extract_player_name( $q );
foreach ( $active as $intent => $score ) {
// Ban-Intent dominant → Regeln nicht zusätzlich auslösen
if ( $intent === 'rules' && isset( $intents['ban_check'] ) && $intents['ban_check'] >= 25 ) {
continue;
// Wenn Discord-Intent erkannt wurde, NUR diesen ausführen
if (isset($active['discord'])) {
$result = mm_handle_intent('discord', $q, $q_lc, $player_name, $bot);
if ($result) {
$parts[] = $result;
}
} elseif (isset($active['team'])) {
$result = mm_handle_intent('team', $q, $q_lc, $player_name, $bot);
if ($result) {
$parts[] = $result;
}
} else {
foreach ( $active as $intent => $score ) {
// Ban-Intent dominant → Regeln nicht zusätzlich auslösen
if ( $intent === 'rules' && isset( $intents['ban_check'] ) && $intents['ban_check'] >= 25 ) {
continue;
}
// Ban-Intent dominant → Shop/Ticket/Forum nicht zusätzlich auslösen
if ( in_array( $intent, array( 'shop', 'ticket', 'forum' ), true )
&& isset( $intents['ban_check'] ) && $intents['ban_check'] >= 40 ) {
continue;
}
// Player-History dominant → Server-Status nicht zusätzlich auslösen
if ( $intent === 'server_status'
&& isset( $intents['player_history'] ) && $intents['player_history'] >= 15 ) {
continue;
}
$result = mm_handle_intent( $intent, $q, $q_lc, $player_name, $bot );
if ( $result ) {
$parts[] = $result;
}
}
}
// Ban-Intent dominant → Shop/Ticket/Forum nicht zusätzlich auslösen
if ( in_array( $intent, array( 'shop', 'ticket', 'forum' ), true )
&& isset( $intents['ban_check'] ) && $intents['ban_check'] >= 40 ) {
continue;
}
// Player-History dominant → Server-Status nicht zusätzlich auslösen
if ( $intent === 'server_status'
&& isset( $intents['player_history'] ) && $intents['player_history'] >= 15 ) {
continue;
}
$result = mm_handle_intent( $intent, $q, $q_lc, $player_name, $bot );
if ( $result ) {
$parts[] = $result;
}
}
if ( empty( $parts ) ) {
$parts[] = mm_fallback_response( $bot );
@@ -163,7 +176,19 @@ function mm_score_intents( $q_lc, $q_raw ) {
'forum' => 0,
'gallery' => 0,
'faq' => 0,
'discord' => 0,
'team' => 0,
];
// Team
foreach ([
'team', 'teammitglieder', 'admins', 'moderatoren', 'wer ist im team', 'wer sind die admins', 'wer sind die moderatoren', 'serverteam', 'staff', 'supporter', 'admin', 'mod', 'leitung', 'server leitung', 'wer ist staff', 'wer ist admin', 'wer ist mod'
] as $kw) {
if (strpos($q_lc, $kw) !== false) $scores['team'] += 20;
}
// Discord
foreach (['discord', 'dc', 'discord link', 'discord einladung', 'discord server', 'discord invite'] as $kw) {
if (strpos($q_lc, $kw) !== false) $scores['discord'] += 20;
}
// Server-Status
foreach ( ['ip', 'adresse', 'join', 'einloggen', 'verbinden', 'server ip',
@@ -250,9 +275,12 @@ function mm_score_intents( $q_lc, $q_raw ) {
$scores['gallery'] += 20;
}
// FAQ
foreach ( ['faq', 'häufige frage', 'frequently', 'oft gefragt'] as $kw ) {
if ( strpos( $q_lc, $kw ) !== false ) $scores['faq'] += 10;
// FAQ: Mehr Keywords und höheres Scoring, damit typische Fragen wie "Wie ...?", "Was ...?", "Wieso ...?", "Erklärung ..." erkannt werden
foreach ([
'faq', 'häufige frage', 'frequently', 'oft gefragt',
'wie ', 'was ', 'wieso ', 'wo ', 'wer ', 'hilfe', 'erklärung', 'funktioniert', 'bedeutet', 'nutzen', 'benutzen', 'erkläre', 'erklärt', 'erfahre', 'erfahren', 'frage', 'fragen', 'hilfe', 'problem', 'tipp', 'tipps', 'anleitung', 'erläutere', 'erläutert', 'erläutern', 'erläutere', 'erläutert', 'erläutern', 'beschreibe', 'beschreibt', 'beschreiben', 'beschreibe', 'beschreibt', 'beschreiben', 'wie kann', 'wie mache', 'wie mache ich', 'wie funktioniert', 'wie nutze', 'wie benutze', 'wie setze', 'wie entferne', 'wie öffne', 'wie melde', 'wie erreiche', 'wie akzeptiere', 'wie fordere', 'wie wechsle', 'wie sehe', 'wie teleportiere', 'wie sende', 'wie setze ich', 'wie entferne ich', 'wie öffne ich', 'wie melde ich', 'wie erreiche ich', 'wie akzeptiere ich', 'wie fordere ich', 'wie wechsle ich', 'wie sehe ich', 'wie teleportiere ich', 'wie sende ich'
] as $kw) {
if ( strpos( $q_lc, $kw ) !== false ) $scores['faq'] += 18;
}
return $scores;
@@ -274,8 +302,87 @@ function mm_handle_intent( $intent, $q, $q_lc, $player_name, $bot ) {
case 'forum': return mm_intent_forum( $q );
case 'gallery': return mm_intent_gallery( $bot, $q_lc );
case 'faq': return mm_intent_faq( $q );
case 'discord': return mm_intent_discord( $bot );
case 'team': return mm_intent_team();
}
}
// ============================================================
// INTENT: TEAM
// ============================================================
function mm_intent_team() {
$query = new WP_Query( array(
'post_type' => 'team_member',
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC',
) );
if ( ! $query->have_posts() ) {
return [
'source' => 'team',
'title' => '👥 Team',
'content' => 'Es wurden noch keine Teammitglieder eingetragen.',
];
}
$html = '<div style="background:#fff;border-radius:14px;padding:20px 18px 12px 18px;box-shadow:0 2px 12px rgba(0,0,0,0.07);max-width:440px;margin:0 auto;">';
$html .= '<div style="font-size:1.3em;font-weight:700;margin-bottom:18px;color:#2563eb;letter-spacing:0.5px;">👥 Team</div>';
while ( $query->have_posts() ) {
$query->the_post();
$name = get_the_title();
$rank = get_post_meta( get_the_ID(), '_team_member_rank', true );
$uuid = get_post_meta( get_the_ID(), '_team_member_uuid', true );
$img = get_the_post_thumbnail_url( get_the_ID(), 'medium' );
$desc = get_the_excerpt();
$avatar = '';
if ( $uuid ) {
$avatar = 'https://visage.surgeplay.com/bust/' . esc_attr( $uuid ) . '.png';
} elseif ( $img ) {
$avatar = $img;
}
$html .= '<div style="display:flex;align-items:center;gap:18px;margin-bottom:22px;padding:14px 0;border-bottom:1px solid #e5e7eb;">';
if ( $avatar ) {
$html .= '<img src="' . esc_url( $avatar ) . '" alt="' . esc_attr( $name ) . '" style="width:64px;height:64px;border-radius:12px;background:#f1f5f9;box-shadow:0 1px 6px rgba(0,0,0,0.08);object-fit:cover;">';
} else {
$html .= '<div style="width:64px;height:64px;border-radius:12px;background:#e5e7eb;display:flex;align-items:center;justify-content:center;font-size:2em;color:#888;">' . esc_html( mb_substr( $name, 0, 1 ) ) . '</div>';
}
$html .= '<div>';
$html .= '<div style="font-size:1.18em;font-weight:700;color:#23272e;line-height:1.2;">' . esc_html( $name ) . '</div>';
if ( $rank ) {
$html .= '<div style="font-size:1.07em;color:#1d4ed8;font-weight:600;margin-top:2px;">' . esc_html( $rank ) . '</div>';
}
if ( $desc ) {
$html .= '<div style="font-size:1em;color:#444;opacity:.97;max-width:340px;margin-top:2px;">' . esc_html( $desc ) . '</div>';
}
$html .= '</div>';
$html .= '</div>';
}
$html .= '</div>';
wp_reset_postdata();
return [
'source' => 'team',
'title' => '👥 Team',
'content' => $html,
];
}
// ============================================================
// INTENT: DISCORD
// ============================================================
function mm_intent_discord( $bot ) {
$discord = $bot['link_discord'] ?? '';
if ( ! empty( $discord ) ) {
return [
'source' => 'discord',
'title' => '💬 Discord',
'content' => 'Hier ist der Discord-Einladungslink:<br><a href="' . esc_url( $discord ) . '" target="_blank">' . esc_html( $discord ) . '</a>',
];
} else {
return [
'source' => 'discord',
'title' => '💬 Discord',
'content' => 'Es wurde kein Discord-Link im Backend hinterlegt.',
];
}
return null;
}
// ============================================================
@@ -1889,17 +1996,21 @@ function mm_intent_faq( $q ) {
if ( empty( $results ) ) return null;
$html = [];
$html = '<div style="background:#fff;border-radius:12px;padding:16px 14px 10px 14px;box-shadow:0 2px 8px rgba(0,0,0,0.04);max-width:480px;margin:0 auto;">';
foreach ( $results as $post ) {
$excerpt = get_the_excerpt( $post->ID );
$html[] = '❓ <b>' . esc_html( $post->post_title ) . '</b>'
. ( $excerpt ? '<br>' . wp_trim_words( $excerpt, 40, '…' ) : '' );
$title = esc_html( $post->post_title );
$content = apply_filters( 'the_content', $post->post_content );
$html .= '<div style="margin-bottom:18px;padding-bottom:10px;border-bottom:1px solid #e5e7eb;">';
$html .= '<div style="font-size:1.08em;font-weight:600;color:#23272e;margin-bottom:4px;">' . $title . '</div>';
$html .= '<div style="font-size:1em;color:#444;opacity:.97;line-height:1.6;">' . $content . '</div>';
$html .= '</div>';
}
$html .= '</div>';
return [
'source' => 'faq',
'title' => 'FAQ',
'content' => implode( '<br><br>', $html ),
'title' => 'FAQ',
'content' => $html,
];
}

View File

@@ -1,4 +1,10 @@
<?php
// BUG-FIX: Das 'assistant_position' Setting wurde hier in einem eigenen
// customize_register-Hook registriert, BEVOR customizer.php die Section
// 'assistant_settings' anlegt. Das führte dazu, dass das Control keiner
// sichtbaren Section zugeordnet war.
// Die Registrierung wurde in inc/customizer.php verschoben (direkt nach
// den anderen assistant_*-Controls). Dieser Hook-Block kann daher entfallen.
/**
* Assistant Widget Virtueller Support-Assistent
*
@@ -36,13 +42,14 @@ if ( file_exists( $mm_ajax_file ) ) {
// =========================================================================
add_action( 'admin_menu', function () {
// Dashicon für Chatbot verwenden (z.B. dashicons-format-chat)
add_menu_page(
'Bot Setup',
'Bot Setup',
'manage_options',
'bot-setup',
'mm_render_bot_admin',
'dashicons-robot',
'dashicons-format-chat',
65
);
} );
@@ -88,6 +95,30 @@ function mm_bot_sanitize_settings( $input ) {
// 2. ADMIN-SEITE
// =========================================================================
// BUG-FIX: Funktion außerhalb von mm_render_bot_admin() definieren.
// Innerhalb einer Funktion definierte benannte Funktionen erzeugen einen
// Fatal Error "Cannot redeclare", wenn die äußere Funktion jemals ein
// zweites Mal ausgeführt wird (z.B. durch AJAX, REST, bestimmte Plugins).
if ( ! function_exists( 'mm_find_page_by_shortcode' ) ) :
function mm_find_page_by_shortcode( $shortcodes ) {
global $wpdb;
$conditions = [];
foreach ( (array) $shortcodes as $sc ) {
$conditions[] = $wpdb->prepare( 'post_content LIKE %s', '%[' . $wpdb->esc_like( $sc ) . '%' );
}
if ( empty( $conditions ) ) return '';
$where = implode( ' OR ', $conditions );
$page = $wpdb->get_row(
"SELECT ID FROM {$wpdb->posts}
WHERE post_status = 'publish'
AND post_type IN ('page','post')
AND ({$where})
LIMIT 1"
);
return $page ? get_permalink( $page->ID ) : '';
}
endif;
function mm_render_bot_admin() {
$data = get_option( 'mm_bot_data', [] );
?>
@@ -166,25 +197,6 @@ function mm_render_bot_admin() {
</p>
<?php
// ── Auto-Detect: Seiten mit bekannten Shortcodes suchen ──────────────
function mm_find_page_by_shortcode( $shortcodes ) {
global $wpdb;
$conditions = [];
foreach ( (array) $shortcodes as $sc ) {
$conditions[] = $wpdb->prepare( 'post_content LIKE %s', '%[' . $wpdb->esc_like( $sc ) . '%' );
}
if ( empty( $conditions ) ) return '';
$where = implode( ' OR ', $conditions );
$page = $wpdb->get_row(
"SELECT ID FROM {$wpdb->posts}
WHERE post_status = 'publish'
AND post_type IN ('page','post')
AND ({$where})
LIMIT 1"
);
return $page ? get_permalink( $page->ID ) : '';
}
$autodetect = [
'url_wiki' => mm_find_page_by_shortcode( ['wmw_wiki', 'wmw_search', 'wmw_article'] ),
'url_rules' => mm_find_page_by_shortcode( ['mrp_rules', 'mc_rules', 'multi_rules'] ),
@@ -390,8 +402,17 @@ add_action( 'wp_enqueue_scripts', function () {
add_action( 'wp_footer', 'mm_bot_render_widget', 50 );
function mm_bot_render_widget() {
$data = get_option( 'mm_bot_data', [] );
$uuid = sanitize_text_field( trim( get_theme_mod( 'assistant_minecraft_uuid', 'Steve' ) ) );
// Sichtbarkeit prüfen: Assistent nur anzeigen, wenn im Customizer aktiviert
// BUG-FIX: Early return MUSS als erstes kommen, bevor andere Variablen gelesen werden.
if ( ! get_theme_mod( 'assistant_enabled', false ) ) {
return;
}
$data = get_option( 'mm_bot_data', [] );
$uuid = sanitize_text_field( trim( get_theme_mod( 'assistant_minecraft_uuid', 'Steve' ) ) );
// BUG-FIX: $avatar_view muss VOR $body_offset definiert werden.
$avatar_view = get_theme_mod( 'assistant_avatar_view', 'head' );
// Offset für Chat-Fenster, wenn Ganzkörper-Avatar aktiv ist
$body_offset = ( $avatar_view === 'body' ) ? 'margin-right: 60px;' : '';
$name = ! empty( $data['bot_name'] ) ? esc_html( $data['bot_name'] ) : 'Viper-Bot';
$welcome = ! empty( $data['welcome'] ) ? $data['welcome'] : 'Hallo! Wie kann ich dir helfen? 👋';
$nonce = wp_create_nonce( 'mm_bot_nonce' );
@@ -454,17 +475,29 @@ function mm_bot_render_widget() {
}
?>
<div id="mm-bot-root">
<?php
$assistant_position = get_theme_mod( 'assistant_position', 'bottom_right' );
$pos_class = 'mm-bot-pos-' . esc_attr( $assistant_position );
?>
<div id="mm-bot-root" class="<?php echo $pos_class; ?>">
<!-- Chat-Fenster -->
<div id="mm-bot-chat" style="display:none;" aria-label="Assistent" role="dialog">
<div id="mm-bot-chat" style="display:none;<?php echo $body_offset; ?>" aria-label="Assistent" role="dialog">
<!-- Header -->
<div class="mm-bot-header">
<div class="mm-bot-status" title="Online"></div>
<img class="mm-bot-avatar-small"
src="https://mc-heads.net/avatar/<?php echo esc_attr( $uuid ); ?>/32"
alt="<?php echo $name; ?>">
<?php
// Avatar-URL je nach Ansicht
if ($avatar_view === 'body') {
$avatar_url = 'https://mc-heads.net/body/' . rawurlencode($uuid) . '/32';
} elseif ($avatar_view === '3dhead') {
$avatar_url = 'https://visage.surgeplay.com/head/48/' . rawurlencode($uuid);
} else {
$avatar_url = 'https://mc-heads.net/avatar/' . rawurlencode($uuid) . '/32';
}
?>
<img class="mm-bot-avatar-small" src="<?php echo esc_url($avatar_url); ?>" alt="<?php echo $name; ?>">
<span class="mm-bot-title"><?php echo $name; ?></span>
<button id="mm-bot-close" aria-label="Schließen">&times;</button>
</div>
@@ -501,9 +534,27 @@ function mm_bot_render_widget() {
</div>
<!-- Launcher-Button -->
<button id="mm-bot-launcher" type="button" aria-label="Assistenten öffnen" title="<?php echo $name; ?>">
<img src="https://mc-heads.net/avatar/<?php echo esc_attr( $uuid ); ?>/60"
alt="<?php echo $name; ?>">
<button id="mm-bot-launcher" type="button" aria-label="Assistenten öffnen" title="<?php echo $name; ?>" style="background:transparent;border:none;box-shadow:none;width:auto;height:auto;padding:0;display:flex;align-items:center;justify-content:center;overflow:visible;">
<?php
// Launcher-Avatar-URL je nach Ansicht (größer)
if ($avatar_view === 'body') {
$launcher_url = 'https://mc-heads.net/body/' . rawurlencode($uuid) . '/144';
$img_style = 'width:72px;height:144px;object-fit:contain;';
if ($assistant_position === 'bottom_right' || $assistant_position === 'top_right') {
$img_style .= 'transform:scaleX(-1);';
}
} elseif ($avatar_view === '3dhead') {
$launcher_url = 'https://visage.surgeplay.com/head/80/' . rawurlencode($uuid);
$img_style = 'width:60px;height:60px;object-fit:cover;';
if ($assistant_position === 'bottom_left' || $assistant_position === 'top_left') {
$img_style .= 'transform:scaleX(-1);';
}
} else {
$launcher_url = 'https://mc-heads.net/avatar/' . rawurlencode($uuid) . '/60';
$img_style = 'width:60px;height:60px;object-fit:cover;';
}
?>
<img src="<?php echo esc_url($launcher_url); ?>" alt="<?php echo $name; ?>" style="<?php echo $img_style; ?>border-radius:8px;background:none;box-shadow:none;">
</button>
</div>
@@ -615,35 +666,43 @@ function mm_bot_render_widget() {
/* ── Wrapper ── */
#mm-bot-root {
position: fixed;
bottom: 30px;
right: 30px;
z-index: 999999;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
/* Positionsklassen */
#mm-bot-root.mm-bot-pos-bottom_right { bottom: 30px; right: 100px; }
#mm-bot-root.mm-bot-pos-bottom_left { bottom: 90px; left: 30px; }
#mm-bot-root.mm-bot-pos-top_right { top: 30px; right: 30px; }
#mm-bot-root.mm-bot-pos-top_left { top: 30px; left: 30px; }
/* Chat-Fenster dynamisch positionieren */
#mm-bot-root.mm-bot-pos-bottom_right #mm-bot-chat { bottom: 78px; right: 0; left: auto; top: auto; }
#mm-bot-root.mm-bot-pos-bottom_left #mm-bot-chat { bottom: 78px; left: 0; right: auto; top: auto; }
#mm-bot-root.mm-bot-pos-top_right #mm-bot-chat { top: 78px; right: 0; left: auto; bottom: auto; }
#mm-bot-root.mm-bot-pos-top_left #mm-bot-chat { top: 78px; left: 0; right: auto; bottom: auto; }
/* ── Launcher ── */
#mm-bot-launcher {
background: #0099ff;
border: none;
border-radius: 50%;
width: 62px;
height: 62px;
cursor: pointer;
box-shadow: 0 4px 16px rgba(0,153,255,.45);
transition: transform .25s, box-shadow .25s;
background: transparent !important;
border: none !important;
box-shadow: none !important;
width: auto !important;
height: auto !important;
padding: 0 !important;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
#mm-bot-launcher:hover {
transform: scale(1.1);
box-shadow: 0 6px 22px rgba(0,153,255,.6);
overflow: visible;
border-radius: 0 !important;
cursor: pointer;
transition: none;
}
#mm-bot-launcher img {
width: 44px;
height: 44px;
border-radius: 4px;
width: 60px;
height: 60px;
border-radius: 8px;
background: none !important;
box-shadow: none !important;
}
/* ── Chat-Fenster ── */

View File

@@ -103,29 +103,75 @@ function minecraft_modern_customize_register( $wp_customize ) {
// =========================================================================
// 9. Virtueller Assistent
// =========================================================================
// BUG-FIX: add_section() muss VOR add_setting()/add_control() stehen.
// Vorher war add_setting/add_control für 'assistant_avatar_view' aufgerufen
// bevor die Section 'assistant_settings' überhaupt registriert war.
$wp_customize->add_section( 'assistant_settings', array(
'title' => __('Virtueller Assistent', 'minecraft-modern-theme'),
'priority' => 80,
'description' => __('Steuert den virtuellen Assistenten im Frontend. Avatar basiert auf Minecraft-UUID.', 'minecraft-modern-theme'),
'title' => __( 'Virtueller Assistent', 'minecraft-modern-theme' ),
'priority' => 80,
'description' => __( 'Steuert den virtuellen Assistenten im Frontend. Avatar basiert auf Minecraft-UUID.', 'minecraft-modern-theme' ),
) );
$wp_customize->add_setting( 'assistant_enabled', array(
'default' => false,
'default' => false,
'sanitize_callback' => 'wp_validate_boolean',
) );
$wp_customize->add_control( 'assistant_enabled', array(
'label' => __('Virtuellen Assistenten aktivieren', 'minecraft-modern-theme'),
'label' => __( 'Virtuellen Assistenten aktivieren', 'minecraft-modern-theme' ),
'section' => 'assistant_settings',
'type' => 'checkbox',
'type' => 'checkbox',
) );
$wp_customize->add_setting( 'assistant_minecraft_uuid', array(
'default' => '',
'default' => '',
'sanitize_callback' => 'sanitize_text_field',
) );
$wp_customize->add_control( 'assistant_minecraft_uuid', array(
'label' => __('Minecraft UUID für Avatar', 'minecraft-modern-theme'),
'label' => __( 'Minecraft UUID für Avatar', 'minecraft-modern-theme' ),
'section' => 'assistant_settings',
'type' => 'text',
'description' => __( 'Gib die Minecraft-UUID für den Avatar des Assistenten ein.', 'minecraft-modern-theme' ),
) );
$wp_customize->add_setting( 'assistant_avatar_view', array(
'default' => 'head',
'sanitize_callback' => function ( $v ) {
return in_array( $v, array( 'head', 'body', '3dhead' ), true ) ? $v : 'head';
},
) );
$wp_customize->add_control( 'assistant_avatar_view', array(
'label' => __( 'Avatar-Ansicht', 'minecraft-modern-theme' ),
'section' => 'assistant_settings',
'type' => 'select',
'choices' => array(
'head' => __( 'Kopf', 'minecraft-modern-theme' ),
'body' => __( 'Ganzkörper', 'minecraft-modern-theme' ),
'3dhead' => __( '3D Kopf', 'minecraft-modern-theme' ),
),
'description' => __( 'Wähle, wie der Minecraft-Avatar im Assistenten angezeigt wird.', 'minecraft-modern-theme' ),
) );
// BUG-FIX: assistant_position war in assistant-widget.php in einem eigenen
// customize_register-Hook registriert also BEVOR diese Section existierte.
// Jetzt korrekt hier innerhalb von minecraft_modern_customize_register().
$wp_customize->add_setting( 'assistant_position', array(
'default' => 'bottom_right',
'transport' => 'refresh',
'sanitize_callback' => function ( $v ) {
$allowed = array( 'bottom_right', 'bottom_left', 'top_right', 'top_left' );
return in_array( $v, $allowed, true ) ? $v : 'bottom_right';
},
) );
$wp_customize->add_control( 'assistant_position', array(
'label' => __( 'Position des Assistenten', 'minecraft-modern-theme' ),
'section' => 'assistant_settings',
'type' => 'text',
'description' => __('Gib die Minecraft-UUID für den Avatar des Assistenten ein.', 'minecraft-modern-theme'),
'type' => 'select',
'choices' => array(
'bottom_right' => __( 'Unten rechts', 'minecraft-modern-theme' ),
'bottom_left' => __( 'Unten links', 'minecraft-modern-theme' ),
'top_right' => __( 'Oben rechts', 'minecraft-modern-theme' ),
'top_left' => __( 'Oben links', 'minecraft-modern-theme' ),
),
) );
// =========================================================================