Files
edukarsa/inc/admin-menu.php
T

915 lines
90 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Modul Pengaturan Menu Admin, Toolbar, dan Settings API EduKarsa
*/
defined( 'ABSPATH' ) || exit;
function edukarsa_admin_menu() {
add_menu_page(
'EduKarsa',
'EduKarsa',
'manage_options',
'edukarsa_settings',
'edukarsa_settings_page_html',
'dashicons-welcome-learn-more',
2
);
add_submenu_page( 'edukarsa_settings', edukarsa_t( 'Pengaturan Utama', 'Main Settings' ), edukarsa_t( '⚙️ Pengaturan Utama', '⚙️ Main Settings' ), 'manage_options', 'edukarsa_settings', 'edukarsa_settings_page_html' );
add_submenu_page( 'edukarsa_settings', edukarsa_t( 'Semua Slider', 'All Sliders' ), edukarsa_t( '🌟 Slider Banner', '🌟 Slider Banners' ), 'manage_options', 'edit.php?post_type=slider' );
add_submenu_page( 'edukarsa_settings', edukarsa_t( 'Semua Program', 'All Programs' ), edukarsa_t( '📚 Program Kami', '📚 Our Programs' ), 'manage_options', 'edit.php?post_type=program' );
add_submenu_page( 'edukarsa_settings', edukarsa_t( 'Semua Keunggulan', 'All Advantages' ), edukarsa_t( '⭐ Keunggulan', '⭐ Advantages' ), 'manage_options', 'edit.php?post_type=keunggulan' );
add_submenu_page( 'edukarsa_settings', edukarsa_t( 'Semua Milestone', 'All Milestones' ), edukarsa_t( '🏆 Milestone', '🏆 Milestones' ), 'manage_options', 'edit.php?post_type=milestone' );
add_submenu_page( 'edukarsa_settings', edukarsa_t( 'Semua FAQ', 'All FAQs' ), edukarsa_t( '❓ Tanya Jawab (FAQ)', '❓ FAQs' ), 'manage_options', 'edit.php?post_type=faq' );
add_submenu_page( 'edukarsa_settings', edukarsa_t( 'Tentang & Donasi', 'About & Donate' ), edukarsa_t( '☕ Donasi & Info', '☕ Donate & Info' ), 'manage_options', 'edukarsa_about', 'edukarsa_about_page_html' );
}
add_action( 'admin_menu', 'edukarsa_admin_menu' );
function edukarsa_admin_bar_shortcut( $wp_admin_bar ) {
if ( ! current_user_can( 'manage_options' ) ) return;
$wp_admin_bar->add_node( array(
'id' => 'edukarsa-topbar-menu',
'title' => '<span class="ab-icon dashicons dashicons-welcome-learn-more" style="top:2px;"></span><span class="ab-label">EduKarsa</span>',
'href' => admin_url( 'admin.php?page=edukarsa_settings' ),
) );
$wp_admin_bar->add_node( array( 'id' => 'edukarsa-sub-settings', 'parent' => 'edukarsa-topbar-menu', 'title' => edukarsa_t( '⚙️ Pengaturan Utama', '⚙️ Main Settings' ), 'href' => admin_url( 'admin.php?page=edukarsa_settings' ) ) );
$wp_admin_bar->add_node( array( 'id' => 'edukarsa-sub-slider', 'parent' => 'edukarsa-topbar-menu', 'title' => edukarsa_t( '🌟 Slider Banner', '🌟 Slider Banners' ), 'href' => admin_url( 'edit.php?post_type=slider' ) ) );
$wp_admin_bar->add_node( array( 'id' => 'edukarsa-sub-program', 'parent' => 'edukarsa-topbar-menu', 'title' => edukarsa_t( '📚 Program Kami', '📚 Our Programs' ), 'href' => admin_url( 'edit.php?post_type=program' ) ) );
$wp_admin_bar->add_node( array( 'id' => 'edukarsa-sub-keunggulan', 'parent' => 'edukarsa-topbar-menu', 'title' => edukarsa_t( '⭐ Keunggulan', '⭐ Advantages' ), 'href' => admin_url( 'edit.php?post_type=keunggulan' ) ) );
$wp_admin_bar->add_node( array( 'id' => 'edukarsa-sub-milestone', 'parent' => 'edukarsa-topbar-menu', 'title' => edukarsa_t( '🏆 Milestone', '🏆 Milestones' ), 'href' => admin_url( 'edit.php?post_type=milestone' ) ) );
$wp_admin_bar->add_node( array( 'id' => 'edukarsa-sub-faq', 'parent' => 'edukarsa-topbar-menu', 'title' => edukarsa_t( '❓ Tanya Jawab (FAQ)', '❓ FAQs' ), 'href' => admin_url( 'edit.php?post_type=faq' ) ) );
$wp_admin_bar->add_node( array( 'id' => 'edukarsa-sub-about', 'parent' => 'edukarsa-topbar-menu', 'title' => edukarsa_t( '☕ Donasi & Info', '☕ Donate & Info' ), 'href' => admin_url( 'admin.php?page=edukarsa_about' ) ) );
}
add_action( 'admin_bar_menu', 'edukarsa_admin_bar_shortcut', 80 );
// SANITASI CHECKBOX (BOOLEAN ENFORCEMENT)
function edukarsa_sanitize_checkbox( $val ) {
return ( ! empty( $val ) && ( $val === 1 || $val === '1' || $val === true ) ) ? 1 : 0;
}
// REGISTRASI SELURUH PENGATURAN DENGAN SANITASI KETAT
function edukarsa_register_settings() {
// 1. Toggles & Checkboxes
$checkboxes = array(
'edukarsa_tampil_bilingual', 'edukarsa_lang_en', 'edukarsa_lang_ar', 'edukarsa_lang_zh', 'edukarsa_lang_ja',
'edukarsa_tampil_accessibility', 'edukarsa_tampil_slider', 'edukarsa_tampil_stats', 'edukarsa_tampil_about',
'edukarsa_tampil_milestone', 'edukarsa_tampil_program', 'edukarsa_tampil_video', 'edukarsa_tampil_keunggulan',
'edukarsa_tampil_cta', 'edukarsa_tampil_faq', 'edukarsa_tampil_news', 'edukarsa_sidebar_tampil_search',
'edukarsa_sidebar_tampil_cta', 'edukarsa_sidebar_tampil_html', 'edukarsa_sidebar_tampil_recent',
'edukarsa_sidebar_tampil_cats', 'edukarsa_tampil_fb', 'edukarsa_tampil_ig', 'edukarsa_tampil_yt',
'edukarsa_tampil_tiktok', 'edukarsa_tampil_x'
);
foreach ( $checkboxes as $cb ) {
register_setting( 'edukarsa_settings_group', $cb, array( 'sanitize_callback' => 'edukarsa_sanitize_checkbox' ) );
}
// 2. Colors
$colors = array( 'edukarsa_primary_color', 'edukarsa_secondary_color', 'edukarsa_heading_color', 'edukarsa_mid_bg_color' );
foreach ( $colors as $col ) {
register_setting( 'edukarsa_settings_group', $col, array( 'sanitize_callback' => 'sanitize_hex_color' ) );
}
// 3. URLs
$urls = array(
'edukarsa_header_logo', 'edukarsa_foto_kepsek', 'edukarsa_link_about', 'edukarsa_mid_bg_image',
'edukarsa_video1_thumb', 'edukarsa_video1_url', 'edukarsa_video2_thumb', 'edukarsa_video2_url',
'edukarsa_cta_bg', 'edukarsa_cta_btn_url', 'edukarsa_sidebar_cta_btn_url', 'edukarsa_sidebar_banner_img',
'edukarsa_sidebar_banner_url', 'edukarsa_footer_logo', 'edukarsa_footer_fb', 'edukarsa_footer_ig',
'edukarsa_footer_yt', 'edukarsa_footer_tiktok', 'edukarsa_footer_x'
);
foreach ( $urls as $url ) {
register_setting( 'edukarsa_settings_group', $url, array( 'sanitize_callback' => 'esc_url_raw' ) );
}
// 4. Numbers & Integers
register_setting( 'edukarsa_settings_group', 'edukarsa_sidebar_recent_count', array( 'sanitize_callback' => 'absint' ) );
// 5. Emails
register_setting( 'edukarsa_settings_group', 'edukarsa_footer_email', array( 'sanitize_callback' => 'sanitize_email' ) );
// 6. Safe HTML Textareas
$safe_html = array(
'edukarsa_teks_sambutan', 'edukarsa_sidebar_html_content', 'edukarsa_footer_alamat',
'edukarsa_footer_jam', 'edukarsa_footer_desc'
);
foreach ( $safe_html as $html ) {
register_setting( 'edukarsa_settings_group', $html, array( 'sanitize_callback' => 'wp_kses_post' ) );
}
// 7. General Text Inputs
$text_inputs = array(
'edukarsa_font_choice', 'edukarsa_milestone_subtitle', 'edukarsa_milestone_title',
'edukarsa_program_subtitle', 'edukarsa_program_title', 'edukarsa_keunggulan_subtitle',
'edukarsa_keunggulan_title', 'edukarsa_faq_subtitle', 'edukarsa_faq_title', 'edukarsa_news_title',
'edukarsa_stat1_angka', 'edukarsa_stat1_label', 'edukarsa_stat1_desc', 'edukarsa_stat1_icon',
'edukarsa_stat2_angka', 'edukarsa_stat2_label', 'edukarsa_stat2_desc', 'edukarsa_stat2_icon',
'edukarsa_stat3_angka', 'edukarsa_stat3_label', 'edukarsa_stat3_desc', 'edukarsa_stat3_icon',
'edukarsa_nama_kepsek', 'edukarsa_subtitle_about', 'edukarsa_cta_title', 'edukarsa_cta_btn_teks',
'edukarsa_sidebar_cta_badge', 'edukarsa_sidebar_cta_title', 'edukarsa_sidebar_cta_desc',
'edukarsa_sidebar_cta_btn_text', 'edukarsa_sidebar_html_title', 'edukarsa_sidebar_recent_title',
'edukarsa_sidebar_cats_title', 'edukarsa_footer_telp', 'edukarsa_wa_btn_text',
'edukarsa_wa_default_msg', 'edukarsa_footer_copyright'
);
foreach ( $text_inputs as $txt ) {
register_setting( 'edukarsa_settings_group', $txt, array( 'sanitize_callback' => 'sanitize_text_field' ) );
}
}
add_action( 'admin_init', 'edukarsa_register_settings' );
function edukarsa_settings_page_html() {
if ( ! current_user_can( 'manage_options' ) ) return;
$font_current = get_option( 'edukarsa_font_choice', 'plus_jakarta_sans' );
$primary_color = get_option( 'edukarsa_primary_color', '#0b4a8e' );
$secondary_color = get_option( 'edukarsa_secondary_color', '#1a73e8' );
$heading_color = get_option( 'edukarsa_heading_color', '#0f172a' );
$active_lang = edukarsa_get_admin_lang();
?>
<style>
.edukarsa-admin-wrap { margin-top: 15px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.edukarsa-admin-layout { display: grid; grid-template-columns: 1fr 320px; gap: 25px; align-items: start; }
.edukarsa-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); margin-bottom: 16px; overflow: hidden; transition: border-color 0.2s ease; }
.edukarsa-card:hover { border-color: #cbd5e1; }
.edukarsa-card-header {
padding: 16px 22px;
background: #fafafa;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
user-select: none;
transition: background 0.2s ease;
}
.edukarsa-card-header:hover { background: #f1f5f9; }
.edukarsa-card-header h2 { margin: 0; font-size: 15px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 10px; }
.header-collapse-trigger { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #64748b; }
.collapse-icon { width: 22px; height: 22px; border-radius: 50%; background: #e2e8f0; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; transition: transform 0.25s ease, background 0.2s ease; color: #334155; }
.edukarsa-card.is-collapsed .collapse-icon { transform: rotate(-90deg); background: #f1f5f9; }
.edukarsa-card-body { padding: 22px; border-top: 1px solid #f1f5f9; }
.edukarsa-top-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.edukarsa-admin-lang-pills { display: inline-flex; background: #fff; border: 1px solid #cbd5e1; padding: 2px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.admin-lang-btn { display: inline-block; padding: 5px 12px; font-size: 12px; font-weight: 700; text-decoration: none; border-radius: 6px; color: #475569; }
.admin-lang-btn.active { background: #0b4a8e; color: #fff !important; }
.edukarsa-accordion-actions { display: flex; gap: 8px; }
.btn-acc-action { background: #f1f5f9; border: 1px solid #cbd5e1; padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; color: #475569; }
.btn-acc-action:hover { background: #e2e8f0; color: #0b4a8e; }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 12px; }
.switch-row-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 15px; }
.switch-label-wrap { display: flex; flex-direction: column; gap: 5px; }
.switch-label { font-weight: 700; font-size: 13px; color: #334155; display: inline-flex; align-items: center; gap: 6px; }
.cpt-shortcut-link { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #0b4a8e; text-decoration: none; background: #e0f2fe; padding: 2px 9px; border-radius: 12px; width: fit-content; transition: all 0.2s ease; border: 1px solid #bae6fd; }
.cpt-shortcut-link:hover { background: #0b4a8e; color: #ffffff !important; border-color: #0b4a8e; }
.tooltip-hint { position: relative; cursor: help; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #94a3b8; color: #fff; font-size: 10px; font-weight: 800; }
.tooltip-hint:hover { background: #0b4a8e; }
.tooltip-hint .tooltip-text { visibility: hidden; opacity: 0; position: absolute; bottom: 140%; left: 50%; transform: translateX(-50%); background-color: #0f172a; color: #ffffff; text-align: left; padding: 8px 12px; border-radius: 6px; font-size: 11px; font-weight: 500; line-height: 1.45; white-space: normal; width: 220px; z-index: 1000; box-shadow: 0 10px 25px rgba(0,0,0,0.2); transition: opacity 0.2s ease, visibility 0.2s ease; pointer-events: none; }
.tooltip-hint .tooltip-text::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: #0f172a transparent transparent transparent; }
.tooltip-hint:hover .tooltip-text { visibility: visible; opacity: 1; }
.edukarsa-switch { position: relative; display: inline-block; width: 42px; height: 22px; margin: 0; flex-shrink: 0; }
.edukarsa-switch input { opacity: 0; width: 0; height: 0; }
.slider-round { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .25s; border-radius: 22px; }
.slider-round:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .25s; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
input:checked + .slider-round { background-color: #0b4a8e; }
input:checked + .slider-round:before { transform: translateX(20px); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.form-field-group { margin-bottom: 15px; }
.form-field-group label { display: block; font-weight: 600; font-size: 13px; color: #475569; margin-bottom: 6px; }
.form-field-group input[type="text"], .form-field-group input[type="number"], .form-field-group textarea, .form-field-group select { width: 100%; border: 1px solid #cbd5e1; border-radius: 6px; padding: 8px 12px; font-size: 13px; box-sizing: border-box; }
.input-with-button { display: flex; gap: 8px; }
.input-with-button input { flex-grow: 1; }
.stats-config-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 15px; }
.stat-config-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px; }
.stat-config-box h4 { margin: 0 0 12px; font-size: 13px; color: #0b4a8e; font-weight: 700; border-bottom: 1px solid #e2e8f0; padding-bottom: 6px; }
.preset-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 10px; }
.preset-pill { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; cursor: pointer; transition: all .2s; }
.preset-pill:hover { border-color: #0b4a8e; transform: translateX(3px); }
.swatch-group { display: flex; border-radius: 20px; overflow: hidden; border: 1px solid rgba(0,0,0,0.1); }
.swatch-item { width: 18px; height: 18px; }
.preset-name { font-size: 12px; font-weight: 600; color: #334155; }
.edukarsa-admin-sidebar { position: sticky; top: 45px; }
.color-picker-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.color-picker-row input[type="color"] { border: none; width: 34px; height: 34px; border-radius: 6px; cursor: pointer; background: transparent; }
@media (max-width: 1100px) {
.edukarsa-admin-layout { grid-template-columns: 1fr; }
.edukarsa-admin-sidebar { position: static; }
.stats-config-grid { grid-template-columns: 1fr; }
}
</style>
<div class="wrap edukarsa-admin-wrap">
<div class="edukarsa-top-toolbar">
<h1 style="font-weight: 800; font-size: 24px; margin: 0;">
<?php echo esc_html( edukarsa_t( 'Pengaturan Tema EduKarsa', 'EduKarsa Theme Settings' ) ); ?>
</h1>
<div style="display: flex; align-items: center; gap: 12px;">
<span style="font-size: 12px; font-weight: 700; color: #64748b;"><?php echo esc_html( edukarsa_t( 'Bahasa Panel:', 'Panel Language:' ) ); ?></span>
<div class="edukarsa-admin-lang-pills">
<a href="<?php echo esc_url( add_query_arg( 'edukarsa_admin_lang', 'id' ) ); ?>" class="admin-lang-btn <?php echo ( $active_lang === 'id' ) ? 'active' : ''; ?>">🇮🇩 Indonesia</a>
<a href="<?php echo esc_url( add_query_arg( 'edukarsa_admin_lang', 'en' ) ); ?>" class="admin-lang-btn <?php echo ( $active_lang === 'en' ) ? 'active' : ''; ?>">🇬🇧 English</a>
</div>
</div>
</div>
<?php settings_errors(); ?>
<form action="options.php" method="post">
<?php settings_fields( 'edukarsa_settings_group' ); ?>
<div class="edukarsa-admin-layout">
<div class="edukarsa-admin-main">
<div class="edukarsa-top-toolbar" style="justify-content: flex-end; margin-bottom: 12px;">
<div class="edukarsa-accordion-actions">
<button type="button" class="btn-acc-action" id="acc-expand-all"><?php echo esc_html( edukarsa_t( '➕ Buka Semua', '➕ Expand All' ) ); ?></button>
<button type="button" class="btn-acc-action" id="acc-collapse-all"><?php echo esc_html( edukarsa_t( '➖ Tutup Semua', '➖ Collapse All' ) ); ?></button>
</div>
</div>
<!-- 1. Header, Logo, Slider & Bahasa -->
<div class="edukarsa-card">
<div class="edukarsa-card-header">
<h2><?php echo esc_html( edukarsa_t( '🏛️ 1. Header, Logo, Slider & Bahasa', '🏛️ 1. Header, Logo, Slider & Languages' ) ); ?></h2>
<div class="header-collapse-trigger"><span class="collapse-icon">▾</span></div>
</div>
<div class="edukarsa-card-body">
<div class="form-field-group">
<label><?php echo esc_html( edukarsa_t( 'Logo Website (Header)', 'Website Logo (Header)' ) ); ?></label>
<div class="input-with-button">
<input type="text" id="edukarsa_header_logo" name="edukarsa_header_logo" value="<?php echo esc_url(get_option('edukarsa_header_logo')); ?>" placeholder="https://...">
<button type="button" class="button btn-upload" data-target="#edukarsa_header_logo"><?php echo esc_html( edukarsa_t( 'Pilih Logo', 'Select Logo' ) ); ?></button>
</div>
</div>
<div class="switch-row" style="margin-top: 18px; background: #eef2ff; border-color: #c7d2fe;">
<div class="switch-label-wrap">
<div class="switch-label" style="color: #3730a3;">
<span><?php echo esc_html( edukarsa_t( '🌐 Fitur Bahasa Frontend (Penerjemah Instan)', '🌐 Frontend Multilingual (Instant Translator)' ) ); ?></span>
<span class="tooltip-hint">?<span class="tooltip-text"><?php echo esc_html( edukarsa_t( 'Menampilkan tombol pemilih bahasa di header pengunjung situs.', 'Shows language switcher buttons in the website frontend header.' ) ); ?></span></span>
</div>
<span style="font-size: 11px; color: #4338ca;"><?php echo esc_html( edukarsa_t( 'Bahasa Indonesia (ID) aktif sebagai bahasa utama. Pilih bahasa tambahan di bawah:', 'Indonesian (ID) is default. Select additional languages below:' ) ); ?></span>
</div>
<label class="edukarsa-switch">
<input type="checkbox" class="section-toggle" data-target="#lang-options-box" name="edukarsa_tampil_bilingual" value="1" <?php checked(1, get_option('edukarsa_tampil_bilingual', 1)); ?>>
<span class="slider-round"></span>
</label>
</div>
<div id="lang-options-box" style="background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 14px 18px; margin-bottom: 14px;">
<span style="font-weight: 700; font-size: 12px; color: #475569; display: block; margin-bottom: 10px;"><?php echo esc_html( edukarsa_t( 'Bahasa Tambahan yang Diaktifkan:', 'Additional Languages Enabled:' ) ); ?></span>
<div style="display: flex; gap: 20px; flex-wrap: wrap;">
<label style="font-size: 13px; font-weight: 600; color: #334155; cursor: pointer;">
<input type="checkbox" name="edukarsa_lang_en" value="1" <?php checked(1, get_option('edukarsa_lang_en', 1)); ?>> 🇬🇧 English (EN)
</label>
<label style="font-size: 13px; font-weight: 600; color: #334155; cursor: pointer;">
<input type="checkbox" name="edukarsa_lang_ar" value="1" <?php checked(1, get_option('edukarsa_lang_ar', 0)); ?>> 🇸🇦 العربية (AR)
</label>
<label style="font-size: 13px; font-weight: 600; color: #334155; cursor: pointer;">
<input type="checkbox" name="edukarsa_lang_zh" value="1" <?php checked(1, get_option('edukarsa_lang_zh', 0)); ?>> 🇨🇳 中文 (ZH)
</label>
<label style="font-size: 13px; font-weight: 600; color: #334155; cursor: pointer;">
<input type="checkbox" name="edukarsa_lang_ja" value="1" <?php checked(1, get_option('edukarsa_lang_ja', 0)); ?>> 🇯🇵 日本語 (JA)
</label>
</div>
</div>
<div class="switch-row" style="background: #f0fdf4; border-color: #bbf7d0;">
<div class="switch-label-wrap">
<div class="switch-label" style="color: #166534;">
<span><?php echo esc_html( edukarsa_t( '♿ Fitur Aksesibilitas Disabilitas (WCAG Toolbar & Suara)', '♿ Accessibility Toolbar & Screen Reader (WCAG)' ) ); ?></span>
<span class="tooltip-hint">?<span class="tooltip-text"><?php echo esc_html( edukarsa_t( 'Menampilkan toolbar ramah disabilitas (pembaca suara audio, kontras, monokrom, ukuran huruf, sorot tautan).', 'Shows accessibility tools (audio voice reader, contrast, monochrome, font sizing, link highlights).' ) ); ?></span></span>
</div>
<span style="font-size: 11px; color: #15803d;"><?php echo esc_html( edukarsa_t( 'Dilengkapi Web Speech Synthesizer bawaan untuk membacakan artikel bagi tunanetra.', 'Equipped with native Web Speech Synthesizer to read articles out loud.' ) ); ?></span>
</div>
<label class="edukarsa-switch">
<input type="checkbox" name="edukarsa_tampil_accessibility" value="1" <?php checked(1, get_option('edukarsa_tampil_accessibility', 1)); ?>>
<span class="slider-round"></span>
</label>
</div>
<div class="switch-row-inline" style="margin-top: 15px;">
<div class="switch-row">
<div class="switch-label-wrap">
<div class="switch-label"><span><?php echo esc_html( edukarsa_t( 'Tampilkan Slider Atas', 'Display Hero Slider' ) ); ?></span><span class="tooltip-hint">?<span class="tooltip-text"><?php echo esc_html( edukarsa_t( 'Gambar & tautan banner dikelola pada modul 🌟 Slider Banner.', 'Banners and URLs are managed in 🌟 Slider Banners post type.' ) ); ?></span></span></div>
<a href="<?php echo admin_url('edit.php?post_type=slider'); ?>" class="cpt-shortcut-link"><?php echo esc_html( edukarsa_t( 'Kelola Slider ↗', 'Manage Sliders ↗' ) ); ?></a>
</div>
<label class="edukarsa-switch">
<input type="checkbox" name="edukarsa_tampil_slider" value="1" <?php checked(1, get_option('edukarsa_tampil_slider', 1)); ?>>
<span class="slider-round"></span>
</label>
</div>
<div class="switch-row">
<div class="switch-label-wrap">
<div class="switch-label"><span><?php echo esc_html( edukarsa_t( 'Tampilkan 3 Kotak Statistik', 'Display 3 Stats Cards' ) ); ?></span><span class="tooltip-hint">?<span class="tooltip-text"><?php echo esc_html( edukarsa_t( 'Konfigurasi teks, angka capaian, dan ikon diatur pada formulir di bawah.', 'Configure texts, achievements, and icons in the form below.' ) ); ?></span></span></div>
<span style="font-size: 11px; color: #64748b;"><?php echo esc_html( edukarsa_t( 'Formulir Pengaturan Bawah ↓', 'Settings Form Below ↓' ) ); ?></span>
</div>
<label class="edukarsa-switch">
<input type="checkbox" class="section-toggle" data-target="#stats-settings-box" name="edukarsa_tampil_stats" value="1" <?php checked(1, get_option('edukarsa_tampil_stats', 1)); ?>>
<span class="slider-round"></span>
</label>
</div>
</div>
<div id="stats-settings-box">
<div class="stats-config-grid">
<?php for($i=1; $i<=3; $i++) : ?>
<div class="stat-config-box">
<h4><?php echo esc_html( edukarsa_t( 'Statistik ' . $i, 'Statistic ' . $i ) ); ?></h4>
<div class="form-field-group">
<label><?php echo esc_html( edukarsa_t( 'Ikon / Gambar', 'Icon / Image' ) ); ?></label>
<div class="input-with-button">
<input type="text" id="stat<?php echo $i; ?>_icon" name="edukarsa_stat<?php echo $i; ?>_icon" value="<?php echo esc_url(get_option('edukarsa_stat'.$i.'_icon')); ?>" placeholder="URL">
<button type="button" class="button btn-upload" data-target="#stat<?php echo $i; ?>_icon">Up</button>
</div>
</div>
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Angka / Capaian', 'Number / Value' ) ); ?></label><input type="text" name="edukarsa_stat<?php echo $i; ?>_angka" value="<?php echo esc_attr(get_option('edukarsa_stat'.$i.'_angka')); ?>" placeholder="98%"></div>
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Judul Statistik', 'Statistic Title' ) ); ?></label><input type="text" name="edukarsa_stat<?php echo $i; ?>_label" value="<?php echo esc_attr(get_option('edukarsa_stat'.$i.'_label')); ?>" placeholder="Akreditasi A"></div>
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Deskripsi Ringkas', 'Brief Description' ) ); ?></label><textarea name="edukarsa_stat<?php echo $i; ?>_desc" rows="2"><?php echo esc_textarea(get_option('edukarsa_stat'.$i.'_desc')); ?></textarea></div>
</div>
<?php endfor; ?>
</div>
</div>
</div>
</div>
<!-- 2. Tentang Kami -->
<div class="edukarsa-card">
<div class="edukarsa-card-header">
<h2><?php echo esc_html( edukarsa_t( '👤 2. Sambutan & Profil Pimpinan', '👤 2. Welcome & Leader Profile' ) ); ?></h2>
<div class="header-collapse-trigger"><span class="collapse-icon">▾</span></div>
</div>
<div class="edukarsa-card-body">
<div class="switch-row" style="margin-bottom: 15px;">
<span class="switch-label"><?php echo esc_html( edukarsa_t( 'Aktifkan Seksi Sambutan', 'Enable Welcome Section' ) ); ?></span>
<label class="edukarsa-switch">
<input type="checkbox" class="section-toggle" data-target="#about-settings-box" name="edukarsa_tampil_about" value="1" <?php checked(1, get_option('edukarsa_tampil_about', 1)); ?>>
<span class="slider-round"></span>
</label>
</div>
<div id="about-settings-box">
<div class="form-grid-2">
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Foto Pimpinan (Portrait 3:4)', 'Leader Photo (Portrait 3:4)' ) ); ?></label><div class="input-with-button"><input type="text" id="edukarsa_foto_kepsek" name="edukarsa_foto_kepsek" value="<?php echo esc_url(get_option('edukarsa_foto_kepsek')); ?>"><button type="button" class="button btn-upload" data-target="#edukarsa_foto_kepsek"><?php echo esc_html( edukarsa_t( 'Pilih', 'Select' ) ); ?></button></div></div>
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Nama Lengkap & Gelar', 'Full Name & Degree' ) ); ?></label><input type="text" name="edukarsa_nama_kepsek" value="<?php echo esc_attr(get_option('edukarsa_nama_kepsek')); ?>"></div>
</div>
<div class="form-grid-2">
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Sub-Judul (cth: Rektor / Kepala Sekolah)', 'Sub-Title (e.g. Rector / Principal)' ) ); ?></label><input type="text" name="edukarsa_subtitle_about" value="<?php echo esc_attr(get_option('edukarsa_subtitle_about')); ?>"></div>
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Tautan Detail (URL Profil)', 'Detail Link (Profile URL)' ) ); ?></label><input type="text" name="edukarsa_link_about" value="<?php echo esc_attr(get_option('edukarsa_link_about')); ?>"></div>
</div>
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Teks Sambutan', 'Speech / Welcome Message' ) ); ?></label><textarea name="edukarsa_teks_sambutan" rows="4"><?php echo esc_textarea(get_option('edukarsa_teks_sambutan')); ?></textarea></div>
</div>
</div>
</div>
<!-- 3. Program, Milestones, & Keunggulan -->
<div class="edukarsa-card">
<div class="edukarsa-card-header">
<h2><?php echo esc_html( edukarsa_t( '⭐ 3. Program, Milestones, & Keunggulan', '⭐ 3. Programs, Milestones, & Advantages' ) ); ?></h2>
<div class="header-collapse-trigger"><span class="collapse-icon">▾</span></div>
</div>
<div class="edukarsa-card-body">
<div class="switch-row-inline">
<div class="switch-row">
<div class="switch-label-wrap"><div class="switch-label"><span><?php echo esc_html( edukarsa_t( 'Seksi Milestone', 'Milestones Section' ) ); ?></span><span class="tooltip-hint">?<span class="tooltip-text"><?php echo esc_html( edukarsa_t( 'Data capaian diisi melalui menu 🏆 Milestone di sidebar.', 'Milestone numbers are managed in 🏆 Milestones menu.' ) ); ?></span></span></div><a href="<?php echo admin_url('edit.php?post_type=milestone'); ?>" class="cpt-shortcut-link"><?php echo esc_html( edukarsa_t( 'Kelola Milestone ↗', 'Manage Milestones ↗' ) ); ?></a></div>
<label class="edukarsa-switch"><input type="checkbox" name="edukarsa_tampil_milestone" value="1" <?php checked(1, get_option('edukarsa_tampil_milestone', 1)); ?>><span class="slider-round"></span></label>
</div>
<div class="switch-row">
<div class="switch-label-wrap"><div class="switch-label"><span><?php echo esc_html( edukarsa_t( 'Seksi Program', 'Programs Section' ) ); ?></span><span class="tooltip-hint">?<span class="tooltip-text"><?php echo esc_html( edukarsa_t( 'Daftar program kurikulum dikelola pada menu 📚 Program Kami.', 'Curriculums and majors are managed in 📚 Our Programs menu.' ) ); ?></span></span></div><a href="<?php echo admin_url('edit.php?post_type=program'); ?>" class="cpt-shortcut-link"><?php echo esc_html( edukarsa_t( 'Kelola Program ↗', 'Manage Programs ↗' ) ); ?></a></div>
<label class="edukarsa-switch"><input type="checkbox" name="edukarsa_tampil_program" value="1" <?php checked(1, get_option('edukarsa_tampil_program', 1)); ?>><span class="slider-round"></span></label>
</div>
<div class="switch-row">
<div class="switch-label-wrap"><div class="switch-label"><span><?php echo esc_html( edukarsa_t( 'Seksi Keunggulan', 'Advantages Section' ) ); ?></span><span class="tooltip-hint">?<span class="tooltip-text"><?php echo esc_html( edukarsa_t( 'Poin keunggulan dikelola pada menu ⭐ Keunggulan.', 'Institutional advantages are managed in ⭐ Advantages menu.' ) ); ?></span></span></div><a href="<?php echo admin_url('edit.php?post_type=keunggulan'); ?>" class="cpt-shortcut-link"><?php echo esc_html( edukarsa_t( 'Kelola Keunggulan ↗', 'Manage Advantages ↗' ) ); ?></a></div>
<label class="edukarsa-switch"><input type="checkbox" name="edukarsa_tampil_keunggulan" value="1" <?php checked(1, get_option('edukarsa_tampil_keunggulan', 1)); ?>><span class="slider-round"></span></label>
</div>
</div>
<div style="border-top: 1px solid #e2e8f0; margin-top: 20px; padding-top: 15px;">
<h4 style="margin: 0 0 10px; font-size: 13px; color: #0b4a8e;"><?php echo esc_html( edukarsa_t( '🏆 Label Tampilan: Seksi Milestone', '🏆 Display Labels: Milestone Section' ) ); ?></h4>
<div class="form-grid-2">
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Subtitle / Badge Teks', 'Subtitle / Badge Text' ) ); ?></label><input type="text" name="edukarsa_milestone_subtitle" value="<?php echo esc_attr(get_option('edukarsa_milestone_subtitle', 'REKAM JEJAK')); ?>"></div>
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Judul Seksi (Heading)', 'Section Title (Heading)' ) ); ?></label><input type="text" name="edukarsa_milestone_title" value="<?php echo esc_attr(get_option('edukarsa_milestone_title', 'Milestone & Prestasi')); ?>"></div>
</div>
</div>
<div style="border-top: 1px solid #e2e8f0; margin-top: 15px; padding-top: 15px;">
<h4 style="margin: 0 0 10px; font-size: 13px; color: #0b4a8e;"><?php echo esc_html( edukarsa_t( '📚 Label Tampilan: Seksi Program', '📚 Display Labels: Program Section' ) ); ?></h4>
<div class="form-grid-2">
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Subtitle / Badge Teks', 'Subtitle / Badge Text' ) ); ?></label><input type="text" name="edukarsa_program_subtitle" value="<?php echo esc_attr(get_option('edukarsa_program_subtitle', 'AKADEMIK & KARAKTER')); ?>"></div>
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Judul Seksi (Heading)', 'Section Title (Heading)' ) ); ?></label><input type="text" name="edukarsa_program_title" value="<?php echo esc_attr(get_option('edukarsa_program_title', 'Our Program')); ?>"></div>
</div>
</div>
<div style="border-top: 1px solid #e2e8f0; margin-top: 15px; padding-top: 15px;">
<h4 style="margin: 0 0 10px; font-size: 13px; color: #0b4a8e;"><?php echo esc_html( edukarsa_t( '⭐ Label Tampilan: Seksi Keunggulan', '⭐ Display Labels: Advantages Section' ) ); ?></h4>
<div class="form-grid-2">
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Subtitle / Badge Teks', 'Subtitle / Badge Text' ) ); ?></label><input type="text" name="edukarsa_keunggulan_subtitle" value="<?php echo esc_attr(get_option('edukarsa_keunggulan_subtitle', 'WHY CHOOSE US')); ?>"></div>
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Judul Seksi (Heading)', 'Section Title (Heading)' ) ); ?></label><input type="text" name="edukarsa_keunggulan_title" value="<?php echo esc_attr(get_option('edukarsa_keunggulan_title', 'Keunggulan Program')); ?>"></div>
</div>
</div>
</div>
</div>
<!-- 4. Video & Parallax Area -->
<div class="edukarsa-card">
<div class="edukarsa-card-header">
<h2><?php echo esc_html( edukarsa_t( '🎬 4. Video & Parallax (Area Tengah)', '🎬 4. Video & Parallax (Mid Section)' ) ); ?></h2>
<div class="header-collapse-trigger"><span class="collapse-icon">▾</span></div>
</div>
<div class="edukarsa-card-body">
<div class="switch-row" style="margin-bottom: 15px;">
<span class="switch-label"><?php echo esc_html( edukarsa_t( 'Aktifkan Seksi Video', 'Enable Video Section' ) ); ?></span>
<label class="edukarsa-switch">
<input type="checkbox" class="section-toggle" data-target="#video-settings-box" name="edukarsa_tampil_video" value="1" <?php checked(1, get_option('edukarsa_tampil_video', 1)); ?>>
<span class="slider-round"></span>
</label>
</div>
<div id="video-settings-box">
<div class="form-grid-2">
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Gambar Latar Parallax', 'Parallax Background Image' ) ); ?></label><div class="input-with-button"><input type="text" id="mid_bg_image" name="edukarsa_mid_bg_image" value="<?php echo esc_url(get_option('edukarsa_mid_bg_image')); ?>"><button type="button" class="button btn-upload" data-target="#mid_bg_image"><?php echo esc_html( edukarsa_t( 'Pilih', 'Select' ) ); ?></button></div></div>
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Warna Overlay Parallax', 'Parallax Overlay Color' ) ); ?></label><div style="display:flex; align-items:center; gap:10px;"><input type="color" name="edukarsa_mid_bg_color" value="<?php echo esc_attr(get_option('edukarsa_mid_bg_color', '#0b4a8e')); ?>"><code><?php echo esc_html(get_option('edukarsa_mid_bg_color', '#0b4a8e')); ?></code></div></div>
</div>
<div class="form-grid-2">
<div class="stat-config-box">
<h4>Video 1</h4>
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Thumbnail Video 1', 'Video 1 Thumbnail' ) ); ?></label><div class="input-with-button"><input type="text" id="vid1_thumb" name="edukarsa_video1_thumb" value="<?php echo esc_url(get_option('edukarsa_video1_thumb')); ?>"><button type="button" class="button btn-upload" data-target="#vid1_thumb">Up</button></div></div>
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'URL Video 1', 'Video 1 URL' ) ); ?></label><input type="text" name="edukarsa_video1_url" value="<?php echo esc_attr(get_option('edukarsa_video1_url')); ?>" placeholder="https://youtube.com/watch?v=..."></div>
</div>
<div class="stat-config-box">
<h4>Video 2</h4>
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Thumbnail Video 2', 'Video 2 Thumbnail' ) ); ?></label><div class="input-with-button"><input type="text" id="vid2_thumb" name="edukarsa_video2_thumb" value="<?php echo esc_url(get_option('edukarsa_video2_thumb')); ?>"><button type="button" class="button btn-upload" data-target="#vid2_thumb">Up</button></div></div>
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'URL Video 2', 'Video 2 URL' ) ); ?></label><input type="text" name="edukarsa_video2_url" value="<?php echo esc_attr(get_option('edukarsa_video2_url')); ?>" placeholder="https://youtube.com/watch?v=..."></div>
</div>
</div>
</div>
</div>
</div>
<!-- 5. CTA, FAQ & Berita -->
<div class="edukarsa-card">
<div class="edukarsa-card-header">
<h2><?php echo esc_html( edukarsa_t( '📢 5. CTA Pendaftaran, FAQ & Berita', '📢 5. Registration CTA, FAQs & News' ) ); ?></h2>
<div class="header-collapse-trigger"><span class="collapse-icon">▾</span></div>
</div>
<div class="edukarsa-card-body">
<div class="switch-row-inline">
<div class="switch-row">
<div class="switch-label-wrap"><span class="switch-label"><?php echo esc_html( edukarsa_t( 'Tampilkan CTA Banner', 'Display CTA Banner' ) ); ?></span><span style="font-size: 11px; color: #64748b;"><?php echo esc_html( edukarsa_t( 'Pengaturan Khusus PPDB', 'Admission CTA Settings' ) ); ?></span></div>
<label class="edukarsa-switch"><input type="checkbox" class="section-toggle" data-target="#cta-settings-box" name="edukarsa_tampil_cta" value="1" <?php checked(1, get_option('edukarsa_tampil_cta', 1)); ?>><span class="slider-round"></span></label>
</div>
<div class="switch-row">
<div class="switch-label-wrap">
<div class="switch-label">
<span><?php echo esc_html( edukarsa_t( 'Tampilkan Seksi FAQ', 'Display FAQ Section' ) ); ?></span>
<span class="tooltip-hint">?<span class="tooltip-text"><?php echo esc_html( edukarsa_t( 'Jika dinonaktifkan, seksi FAQ disembunyikan dari beranda. Seluruh item FAQ tetap tersimpan aman.', 'If disabled, FAQ is hidden on homepage. All items remain safe in database.' ) ); ?></span></span>
</div>
<a href="<?php echo admin_url('edit.php?post_type=faq'); ?>" class="cpt-shortcut-link"><?php echo esc_html( edukarsa_t( 'Kelola Data FAQ ↗', 'Manage FAQs ↗' ) ); ?></a>
</div>
<label class="edukarsa-switch"><input type="checkbox" class="section-toggle" data-target="#faq-settings-box" name="edukarsa_tampil_faq" value="1" <?php checked(1, get_option('edukarsa_tampil_faq', 1)); ?>><span class="slider-round"></span></label>
</div>
<div class="switch-row">
<div class="switch-label-wrap"><div class="switch-label"><span><?php echo esc_html( edukarsa_t( 'Tampilkan Berita Kampus', 'Display Campus News' ) ); ?></span><span class="tooltip-hint">?<span class="tooltip-text"><?php echo esc_html( edukarsa_t( 'Berita otomatis diambil dari menu Pos bawaan.', 'Posts are loaded automatically from standard Posts menu.' ) ); ?></span></span></div><a href="<?php echo admin_url('edit.php'); ?>" class="cpt-shortcut-link"><?php echo esc_html( edukarsa_t( 'Kelola Berita ↗', 'Manage Posts ↗' ) ); ?></a></div>
<label class="edukarsa-switch"><input type="checkbox" name="edukarsa_tampil_news" value="1" <?php checked(1, get_option('edukarsa_tampil_news', 1)); ?>><span class="slider-round"></span></label>
</div>
</div>
<div id="cta-settings-box" class="stat-config-box" style="margin-bottom: 20px;">
<h4><?php echo esc_html( edukarsa_t( 'Konfigurasi CTA PPDB / PMB', 'Admission CTA Configuration' ) ); ?></h4>
<div class="form-grid-2">
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Gambar Latar CTA', 'CTA Background Image' ) ); ?></label><div class="input-with-button"><input type="text" id="cta_bg" name="edukarsa_cta_bg" value="<?php echo esc_url(get_option('edukarsa_cta_bg')); ?>"><button type="button" class="button btn-upload" data-target="#cta_bg">Up</button></div></div>
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Teks Tombol CTA', 'CTA Button Text' ) ); ?></label><input type="text" name="edukarsa_cta_btn_teks" value="<?php echo esc_attr(get_option('edukarsa_cta_btn_teks', 'Daftar Sekarang')); ?>"></div>
</div>
<div class="form-grid-2">
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Judul Ajakan CTA', 'CTA Main Headline' ) ); ?></label><input type="text" name="edukarsa_cta_title" value="<?php echo esc_attr(get_option('edukarsa_cta_title')); ?>"></div>
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Tautan Tombol CTA', 'CTA Button URL' ) ); ?></label><input type="text" name="edukarsa_cta_btn_url" value="<?php echo esc_attr(get_option('edukarsa_cta_btn_url')); ?>"></div>
</div>
</div>
<div id="faq-settings-box" class="stat-config-box" style="margin-bottom: 20px;">
<h4><?php echo esc_html( edukarsa_t( 'Label Tampilan Seksi FAQ (Tanya Jawab)', 'Display Labels: FAQ Section' ) ); ?></h4>
<div class="form-grid-2">
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Subtitle / Badge FAQ', 'Subtitle / Badge Text' ) ); ?></label><input type="text" name="edukarsa_faq_subtitle" value="<?php echo esc_attr(get_option('edukarsa_faq_subtitle', 'FAQ')); ?>" placeholder="FAQ"></div>
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Judul Seksi FAQ', 'Section Title (Heading)' ) ); ?></label><input type="text" name="edukarsa_faq_title" value="<?php echo esc_attr(get_option('edukarsa_faq_title', 'Pertanyaan Umum')); ?>" placeholder="Pertanyaan Umum"></div>
</div>
</div>
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Judul Seksi Berita', 'News Section Title' ) ); ?></label><input type="text" name="edukarsa_news_title" value="<?php echo esc_attr(get_option('edukarsa_news_title', 'News & Update')); ?>"></div>
</div>
</div>
<!-- 6. Kustomisasi Sidebar -->
<div class="edukarsa-card">
<div class="edukarsa-card-header">
<h2><?php echo esc_html( edukarsa_t( '📑 6. Pengaturan Sidebar (Artikel & Halaman)', '📑 6. Sidebar Settings (Posts & Pages)' ) ); ?></h2>
<div class="header-collapse-trigger"><span class="collapse-icon">▾</span></div>
</div>
<div class="edukarsa-card-body">
<p style="font-size: 13px; color: #64748b; margin-top:0; margin-bottom: 15px;">
<?php echo esc_html( edukarsa_t( 'Kelola komponen sidebar artikel dan halaman statis secara native tanpa menu Widget WordPress.', 'Manage post and page sidebar components natively without WordPress Widgets menu.' ) ); ?>
</p>
<div class="switch-row-inline">
<div class="switch-row">
<span class="switch-label"><?php echo esc_html( edukarsa_t( 'Kotak Pencarian Cepat', 'Quick Search Bar' ) ); ?></span>
<label class="edukarsa-switch">
<input type="checkbox" name="edukarsa_sidebar_tampil_search" value="1" <?php checked(1, get_option('edukarsa_sidebar_tampil_search', 1)); ?>>
<span class="slider-round"></span>
</label>
</div>
<div class="switch-row">
<span class="switch-label"><?php echo esc_html( edukarsa_t( 'Mini CTA Pendaftaran', 'Admission Mini CTA' ) ); ?></span>
<label class="edukarsa-switch">
<input type="checkbox" class="section-toggle" data-target="#sidebar-cta-box" name="edukarsa_sidebar_tampil_cta" value="1" <?php checked(1, get_option('edukarsa_sidebar_tampil_cta', 1)); ?>>
<span class="slider-round"></span>
</label>
</div>
</div>
<div id="sidebar-cta-box" class="stat-config-box" style="margin-bottom: 15px;">
<h4><?php echo esc_html( edukarsa_t( 'Konfigurasi Mini CTA Sidebar', 'Sidebar Mini CTA Configuration' ) ); ?></h4>
<div class="form-grid-2">
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Badge Judul CTA', 'CTA Badge Title' ) ); ?></label><input type="text" name="edukarsa_sidebar_cta_badge" value="<?php echo esc_attr(get_option('edukarsa_sidebar_cta_badge', 'Penerimaan Siswa/Mhs')); ?>"></div>
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Judul Ajakan', 'Main Headline' ) ); ?></label><input type="text" name="edukarsa_sidebar_cta_title" value="<?php echo esc_attr(get_option('edukarsa_sidebar_cta_title', 'Siap Berprestasi Bersama Kami?')); ?>"></div>
</div>
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Deskripsi Singkat', 'Brief Description' ) ); ?></label><textarea name="edukarsa_sidebar_cta_desc" rows="2"><?php echo esc_textarea(get_option('edukarsa_sidebar_cta_desc', 'Daftarkan diri Anda sekarang dan raih peluang beasiswa unggulan.')); ?></textarea></div>
<div class="form-grid-2">
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Teks Tombol', 'Button Text' ) ); ?></label><input type="text" name="edukarsa_sidebar_cta_btn_text" value="<?php echo esc_attr(get_option('edukarsa_sidebar_cta_btn_text', 'Daftar Sekarang')); ?>"></div>
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Tautan URL Tombol', 'Button Link URL' ) ); ?></label><input type="text" name="edukarsa_sidebar_cta_btn_url" value="<?php echo esc_attr(get_option('edukarsa_sidebar_cta_btn_url', '#')); ?>"></div>
</div>
</div>
<div class="switch-row" style="background: #fdf4ff; border-color: #f5d0fe;">
<div class="switch-label-wrap">
<div class="switch-label" style="color: #86198f;">
<span><?php echo esc_html( edukarsa_t( '🧩 Box HTML Kustom Sidebar', '🧩 Sidebar Custom HTML Box' ) ); ?></span>
<span class="tooltip-hint">?<span class="tooltip-text"><?php echo esc_html( edukarsa_t( 'Pasang kode HTML bebas seperti embed Google Maps, video profil, widget eksternal, atau teks bebas.', 'Insert arbitrary HTML such as Google Maps iframe, external widgets, or raw text.' ) ); ?></span></span>
</div>
<span style="font-size: 11px; color: #a21caf;"><?php echo esc_html( edukarsa_t( 'Menambahkan area kustomisasi tanpa batas pada sidebar.', 'Provides unlimited customization area on the sidebar.' ) ); ?></span>
</div>
<label class="edukarsa-switch">
<input type="checkbox" class="section-toggle" data-target="#sidebar-html-box" name="edukarsa_sidebar_tampil_html" value="1" <?php checked(1, get_option('edukarsa_sidebar_tampil_html', 0)); ?>>
<span class="slider-round"></span>
</label>
</div>
<div id="sidebar-html-box" class="stat-config-box" style="margin-bottom: 15px;">
<h4><?php echo esc_html( edukarsa_t( 'Konfigurasi Box HTML Kustom', 'Custom HTML Configuration' ) ); ?></h4>
<div class="form-field-group">
<label><?php echo esc_html( edukarsa_t( 'Judul Box (Opsional)', 'Box Title (Optional)' ) ); ?></label>
<input type="text" name="edukarsa_sidebar_html_title" value="<?php echo esc_attr(get_option('edukarsa_sidebar_html_title', 'Informasi Tambahan')); ?>">
</div>
<div class="form-field-group" style="margin-bottom:0;">
<label><?php echo esc_html( edukarsa_t( 'Isi Kode HTML / Teks Bebas', 'HTML Code / Free Text Content' ) ); ?></label>
<textarea name="edukarsa_sidebar_html_content" rows="6" style="font-family: monospace; font-size: 12px;"><?php echo esc_textarea(get_option('edukarsa_sidebar_html_content')); ?></textarea>
</div>
</div>
<div class="switch-row-inline">
<div class="switch-row">
<span class="switch-label"><?php echo esc_html( edukarsa_t( 'Daftar Berita Terbaru', 'Recent Posts List' ) ); ?></span>
<label class="edukarsa-switch">
<input type="checkbox" class="section-toggle" data-target="#sidebar-recent-box" name="edukarsa_sidebar_tampil_recent" value="1" <?php checked(1, get_option('edukarsa_sidebar_tampil_recent', 1)); ?>>
<span class="slider-round"></span>
</label>
</div>
<div class="switch-row">
<span class="switch-label"><?php echo esc_html( edukarsa_t( 'Daftar Kategori Berita', 'Categories List' ) ); ?></span>
<label class="edukarsa-switch">
<input type="checkbox" class="section-toggle" data-target="#sidebar-cats-box" name="edukarsa_sidebar_tampil_cats" value="1" <?php checked(1, get_option('edukarsa_sidebar_tampil_cats', 1)); ?>>
<span class="slider-round"></span>
</label>
</div>
</div>
<div id="sidebar-recent-box" class="form-grid-2" style="background:#f8fafc; padding:15px; border:1px solid #e2e8f0; border-radius:8px; margin-bottom:15px;">
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Judul Seksi Berita Terkini', 'Recent Posts Title' ) ); ?></label><input type="text" name="edukarsa_sidebar_recent_title" value="<?php echo esc_attr(get_option('edukarsa_sidebar_recent_title', 'Warta Terkini')); ?>"></div>
<div class="form-field-group" style="margin-bottom:0;"><label><?php echo esc_html( edukarsa_t( 'Jumlah Pos Ditampilkan', 'Number of Posts to Show' ) ); ?></label><input type="number" name="edukarsa_sidebar_recent_count" value="<?php echo esc_attr(get_option('edukarsa_sidebar_recent_count', 5)); ?>" min="1" max="10"></div>
</div>
<div id="sidebar-cats-box" class="form-field-group" style="background:#f8fafc; padding:15px; border:1px solid #e2e8f0; border-radius:8px; margin-bottom:15px;">
<label><?php echo esc_html( edukarsa_t( 'Judul Seksi Kategori', 'Categories Section Title' ) ); ?></label>
<input type="text" name="edukarsa_sidebar_cats_title" value="<?php echo esc_attr(get_option('edukarsa_sidebar_cats_title', 'Kategori Pilihan')); ?>">
</div>
<div class="form-grid-2">
<div class="form-field-group">
<label><?php echo esc_html( edukarsa_t( 'Banner Poster Sidebar (Opsional)', 'Sidebar Banner Poster (Optional)' ) ); ?></label>
<div class="input-with-button">
<input type="text" id="edukarsa_sidebar_banner_img" name="edukarsa_sidebar_banner_img" value="<?php echo esc_url(get_option('edukarsa_sidebar_banner_img')); ?>" placeholder="https://...">
<button type="button" class="button btn-upload" data-target="#edukarsa_sidebar_banner_img"><?php echo esc_html( edukarsa_t( 'Pilih', 'Select' ) ); ?></button>
</div>
</div>
<div class="form-field-group">
<label><?php echo esc_html( edukarsa_t( 'Tautan Klik Banner Poster', 'Banner Poster Target URL' ) ); ?></label>
<input type="text" name="edukarsa_sidebar_banner_url" value="<?php echo esc_attr(get_option('edukarsa_sidebar_banner_url')); ?>" placeholder="https://...">
</div>
</div>
</div>
</div>
<!-- 7. Footer, Kontak & WhatsApp -->
<div class="edukarsa-card">
<div class="edukarsa-card-header">
<h2><?php echo esc_html( edukarsa_t( '📞 7. Footer, Kontak & Tombol WhatsApp', '📞 7. Footer, Contacts & WhatsApp Button' ) ); ?></h2>
<div class="header-collapse-trigger"><span class="collapse-icon">▾</span></div>
</div>
<div class="edukarsa-card-body">
<div style="background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 16px 20px; margin-bottom: 20px;">
<h4 style="margin: 0 0 12px; font-size: 13px; color: #166534;"><?php echo esc_html( edukarsa_t( '💬 Kustomisasi Tombol WhatsApp Melayang', '💬 Floating WhatsApp Button Customization' ) ); ?></h4>
<div class="form-grid-2">
<div class="form-field-group" style="margin-bottom: 0;">
<label><?php echo esc_html( edukarsa_t( 'Label / Tulisan Tombol', 'Button Label / Text' ) ); ?></label>
<input type="text" name="edukarsa_wa_btn_text" value="<?php echo esc_attr(get_option('edukarsa_wa_btn_text', 'Tanya PMB')); ?>">
</div>
<div class="form-field-group" style="margin-bottom: 0;">
<label><?php echo esc_html( edukarsa_t( 'Template Pesan Awal Otomatis', 'Automatic Initial Message Template' ) ); ?></label>
<input type="text" name="edukarsa_wa_default_msg" value="<?php echo esc_attr(get_option('edukarsa_wa_default_msg', 'Halo Admin EduKarsa, saya ingin bertanya informasi lebih lanjut.')); ?>">
</div>
</div>
</div>
<div class="form-grid-2">
<div class="form-field-group">
<label><?php echo esc_html( edukarsa_t( 'Logo Footer (Opsional)', 'Footer Logo (Optional)' ) ); ?></label>
<div class="input-with-button">
<input type="text" id="edukarsa_footer_logo" name="edukarsa_footer_logo" value="<?php echo esc_url(get_option('edukarsa_footer_logo')); ?>" placeholder="https://...">
<button type="button" class="button btn-upload" data-target="#edukarsa_footer_logo"><?php echo esc_html( edukarsa_t( 'Pilih', 'Select' ) ); ?></button>
</div>
</div>
<div class="form-field-group">
<label><?php echo esc_html( edukarsa_t( 'Jam Operasional / Layanan (Multi-baris)', 'Operating / Office Hours (Multi-line)' ) ); ?></label>
<textarea name="edukarsa_footer_jam" rows="3"><?php echo esc_textarea(get_option('edukarsa_footer_jam', "Senin – Jumat: 08.00 – 16.00 WIB\nSabtu: 08.00 – 12.00 WIB")); ?></textarea>
</div>
</div>
<div class="form-field-group">
<label><?php echo esc_html( edukarsa_t( 'Deskripsi Singkat Kampus / Visi Ringkas', 'Short Campus Description / Vision' ) ); ?></label>
<textarea name="edukarsa_footer_desc" rows="3"><?php echo esc_textarea(get_option('edukarsa_footer_desc', 'Institusi pendidikan terakreditasi unggul yang berdedikasi mencetak generasi berkarakter cerdas, kompetitif, dan berintegritas.')); ?></textarea>
</div>
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Alamat Lengkap Institusi', 'Full Institutional Address' ) ); ?></label><textarea name="edukarsa_footer_alamat" rows="2"><?php echo esc_textarea(get_option('edukarsa_footer_alamat')); ?></textarea></div>
<div class="form-grid-2">
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Nomor Telepon / WhatsApp Layanan', 'Phone / WhatsApp Hotline' ) ); ?></label><input type="text" name="edukarsa_footer_telp" value="<?php echo esc_attr(get_option('edukarsa_footer_telp')); ?>" placeholder="+62 ..."></div>
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Alamat Email Resmi', 'Official Email Address' ) ); ?></label><input type="text" name="edukarsa_footer_email" value="<?php echo esc_attr(get_option('edukarsa_footer_email')); ?>" placeholder="[email protected]"></div>
</div>
<div class="form-field-group"><label><?php echo esc_html( edukarsa_t( 'Teks Hak Cipta (Copyright Bar)', 'Copyright Bar Text' ) ); ?></label><input type="text" name="edukarsa_footer_copyright" value="<?php echo esc_attr(get_option('edukarsa_footer_copyright', 'EduKarsa University. All Rights Reserved.')); ?>"></div>
<h4 style="margin: 25px 0 12px; font-size:14px; color:#0b4a8e; border-bottom:1px solid #e2e8f0; padding-bottom:8px;"><?php echo esc_html( edukarsa_t( 'Jaringan Media Sosial Resmi', 'Official Social Media Channels' ) ); ?></h4>
<div class="switch-row"><span class="switch-label">Facebook</span><div style="display:flex; align-items:center; gap:12px; width:70%;"><input type="text" name="edukarsa_footer_fb" value="<?php echo esc_attr(get_option('edukarsa_footer_fb')); ?>" placeholder="https://facebook.com/..." style="flex-grow:1; border:1px solid #cbd5e1; border-radius:6px; padding:6px 10px;"><label class="edukarsa-switch"><input type="checkbox" name="edukarsa_tampil_fb" value="1" <?php checked(1, get_option('edukarsa_tampil_fb', 1)); ?>><span class="slider-round"></span></label></div></div>
<div class="switch-row"><span class="switch-label">Instagram</span><div style="display:flex; align-items:center; gap:12px; width:70%;"><input type="text" name="edukarsa_footer_ig" value="<?php echo esc_attr(get_option('edukarsa_footer_ig')); ?>" placeholder="https://instagram.com/..." style="flex-grow:1; border:1px solid #cbd5e1; border-radius:6px; padding:6px 10px;"><label class="edukarsa-switch"><input type="checkbox" name="edukarsa_tampil_ig" value="1" <?php checked(1, get_option('edukarsa_tampil_ig', 1)); ?>><span class="slider-round"></span></label></div></div>
<div class="switch-row"><span class="switch-label">YouTube</span><div style="display:flex; align-items:center; gap:12px; width:70%;"><input type="text" name="edukarsa_footer_yt" value="<?php echo esc_attr(get_option('edukarsa_footer_yt')); ?>" placeholder="https://youtube.com/..." style="flex-grow:1; border:1px solid #cbd5e1; border-radius:6px; padding:6px 10px;"><label class="edukarsa-switch"><input type="checkbox" name="edukarsa_tampil_yt" value="1" <?php checked(1, get_option('edukarsa_tampil_yt', 1)); ?>><span class="slider-round"></span></label></div></div>
<div class="switch-row"><span class="switch-label">TikTok</span><div style="display:flex; align-items:center; gap:12px; width:70%;"><input type="text" name="edukarsa_footer_tiktok" value="<?php echo esc_attr(get_option('edukarsa_footer_tiktok')); ?>" placeholder="https://tiktok.com/@..." style="flex-grow:1; border:1px solid #cbd5e1; border-radius:6px; padding:6px 10px;"><label class="edukarsa-switch"><input type="checkbox" name="edukarsa_tampil_tiktok" value="1" <?php checked(1, get_option('edukarsa_tampil_tiktok', 0)); ?>><span class="slider-round"></span></label></div></div>
<div class="switch-row"><span class="switch-label">X (Twitter)</span><div style="display:flex; align-items:center; gap:12px; width:70%;"><input type="text" name="edukarsa_footer_x" value="<?php echo esc_attr(get_option('edukarsa_footer_x')); ?>" placeholder="https://x.com/..." style="flex-grow:1; border:1px solid #cbd5e1; border-radius:6px; padding:6px 10px;"><label class="edukarsa-switch"><input type="checkbox" name="edukarsa_tampil_x" value="1" <?php checked(1, get_option('edukarsa_tampil_x', 0)); ?>><span class="slider-round"></span></label></div></div>
</div>
</div>
</div>
<!-- KOLOM KANAN (SIDEBAR ACTION PANEL STICKY) -->
<div class="edukarsa-admin-sidebar">
<div class="edukarsa-card">
<div class="edukarsa-card-header" style="cursor:default;">
<h2><?php echo esc_html( edukarsa_t( '💾 Publikasi', '💾 Publication' ) ); ?></h2>
</div>
<div class="edukarsa-card-body text-center" style="padding:18px;">
<p style="font-size:12px; color:#64748b; margin-top:0; margin-bottom:15px;"><?php echo esc_html( edukarsa_t( 'Simpan seluruh konfigurasi tema EduKarsa.', 'Save all EduKarsa theme configurations.' ) ); ?></p>
<?php submit_button( edukarsa_t( 'Simpan Pengaturan', 'Save Settings' ), 'primary large', 'submit', false, array('style'=>'width:100%; border-radius:6px; font-weight:700; padding:10px;') ); ?>
</div>
</div>
<div class="edukarsa-card">
<div class="edukarsa-card-header" style="cursor:default;">
<h2><?php echo esc_html( edukarsa_t( '🔤 Tipografi Font', '🔤 Font Typography' ) ); ?></h2>
</div>
<div class="edukarsa-card-body">
<div class="form-field-group" style="margin-bottom:0;">
<label><?php echo esc_html( edukarsa_t( 'Pilihan Font Utama', 'Main Font Choice' ) ); ?></label>
<select name="edukarsa_font_choice" id="edukarsa_font_choice" style="width:100%; padding:8px; border-radius:6px;">
<option value="plus_jakarta_sans" <?php selected( 'plus_jakarta_sans', $font_current ); ?>>Plus Jakarta Sans (<?php echo esc_html( edukarsa_t( 'Rekomendasi', 'Recommended' ) ); ?>)</option>
<option value="inter" <?php selected( 'inter', $font_current ); ?>>Inter (Modern UI)</option>
<option value="poppins" <?php selected( 'poppins', $font_current ); ?>>Poppins (<?php echo esc_html( edukarsa_t( 'Geometris', 'Geometric' ) ); ?>)</option>
<option value="roboto" <?php selected( 'roboto', $font_current ); ?>>Roboto (<?php echo esc_html( edukarsa_t( 'Klasik', 'Classic' ) ); ?>)</option>
<option value="system" <?php selected( 'system', $font_current ); ?>>System Native (<?php echo esc_html( edukarsa_t( 'Super Cepat', 'Ultra Fast' ) ); ?>)</option>
</select>
</div>
</div>
</div>
<div class="edukarsa-card">
<div class="edukarsa-card-header" style="cursor:default;">
<h2><?php echo esc_html( edukarsa_t( '🎨 Skema Warna', '🎨 Color Scheme' ) ); ?></h2>
</div>
<div class="edukarsa-card-body">
<label style="font-weight:700; font-size:12px; color:#64748b; text-transform:uppercase; letter-spacing:0.5px; display:block; margin-bottom:10px;"><?php echo esc_html( edukarsa_t( 'Pilih Preset Instan', 'Choose Instant Preset' ) ); ?></label>
<div class="preset-grid">
<div class="preset-pill" data-p="#0b4a8e" data-s="#1a73e8" data-h="#0f172a"><div class="swatch-group"><span class="swatch-item" style="background:#0b4a8e;"></span><span class="swatch-item" style="background:#1a73e8;"></span></div><span class="preset-name">Classic Navy (Default)</span></div>
<div class="preset-pill" data-p="#065f46" data-s="#10b981" data-h="#064e3b"><div class="swatch-group"><span class="swatch-item" style="background:#065f46;"></span><span class="swatch-item" style="background:#10b981;"></span></div><span class="preset-name">Islamic Emerald Green</span></div>
<div class="preset-pill" data-p="#881337" data-s="#e11d48" data-h="#4c0519"><div class="swatch-group"><span class="swatch-item" style="background:#881337;"></span><span class="swatch-item" style="background:#e11d48;"></span></div><span class="preset-name">Prestige Maroon</span></div>
<div class="preset-pill" data-p="#0f766e" data-s="#06b6d4" data-h="#134e4a"><div class="swatch-group"><span class="swatch-item" style="background:#0f766e;"></span><span class="swatch-item" style="background:#06b6d4;"></span></div><span class="preset-name">Techno Teal</span></div>
<div class="preset-pill" data-p="#581c87" data-s="#8b5cf6" data-h="#3b0764"><div class="swatch-group"><span class="swatch-item" style="background:#581c87;"></span><span class="swatch-item" style="background:#8b5cf6;"></span></div><span class="preset-name">Royal Violet</span></div>
<div class="preset-pill" data-p="#b45309" data-s="#f59e0b" data-h="#78350f"><div class="swatch-group"><span class="swatch-item" style="background:#b45309;"></span><span class="swatch-item" style="background:#f59e0b;"></span></div><span class="preset-name">Autumn Gold</span></div>
</div>
<hr style="margin:20px 0; border:none; border-top:1px solid #f1f5f9;">
<label style="font-weight:700; font-size:12px; color:#64748b; text-transform:uppercase; letter-spacing:0.5px; display:block; margin-bottom:12px;"><?php echo esc_html( edukarsa_t( 'Sesuaikan Manual', 'Custom Colors' ) ); ?></label>
<div class="color-picker-row"><span style="font-size:13px; font-weight:600;"><?php echo esc_html( edukarsa_t( 'Warna Primer', 'Primary Color' ) ); ?></span><div style="display:flex; align-items:center; gap:8px;"><input type="color" id="primary_picker" name="edukarsa_primary_color" value="<?php echo esc_attr( $primary_color ); ?>"><code id="primary_code"><?php echo esc_html( $primary_color ); ?></code></div></div>
<div class="color-picker-row"><span style="font-size:13px; font-weight:600;"><?php echo esc_html( edukarsa_t( 'Warna Aksen', 'Accent Color' ) ); ?></span><div style="display:flex; align-items:center; gap:8px;"><input type="color" id="secondary_picker" name="edukarsa_secondary_color" value="<?php echo esc_attr( $secondary_color ); ?>"><code id="secondary_code"><?php echo esc_html( $secondary_color ); ?></code></div></div>
<div class="color-picker-row"><span style="font-size:13px; font-weight:600;"><?php echo esc_html( edukarsa_t( 'Warna Judul', 'Heading Color' ) ); ?></span><div style="display:flex; align-items:center; gap:8px;"><input type="color" id="heading_picker" name="edukarsa_heading_color" value="<?php echo esc_attr( $heading_color ); ?>"><code id="heading_code"><?php echo esc_html( $heading_color ); ?></code></div></div>
</div>
</div>
</div>
</div>
</form>
</div>
<script>
jQuery(document).ready(function($){
$('.edukarsa-admin-main .edukarsa-card').each(function(index){
if (index > 0) {
$(this).addClass('is-collapsed');
$(this).find('.edukarsa-card-body').hide();
}
});
$('.edukarsa-admin-main .edukarsa-card-header').on('click', function(e){
if ($(e.target).closest('.edukarsa-switch, input, a, button').length) {
return;
}
var $card = $(this).closest('.edukarsa-card');
var $body = $card.find('.edukarsa-card-body');
$card.toggleClass('is-collapsed');
$body.stop().slideToggle(250);
});
$('#acc-expand-all').click(function(){
$('.edukarsa-admin-main .edukarsa-card').removeClass('is-collapsed');
$('.edukarsa-admin-main .edukarsa-card-body').stop().slideDown(250);
});
$('#acc-collapse-all').click(function(){
$('.edukarsa-admin-main .edukarsa-card').addClass('is-collapsed');
$('.edukarsa-admin-main .edukarsa-card-body').stop().slideUp(250);
});
function syncToggles() {
$('.section-toggle').each(function(){
var target = $(this).data('target');
if ($(this).is(':checked')) { $(target).slideDown(200); } else { $(target).slideUp(200); }
});
}
$('.section-toggle').change(syncToggles);
syncToggles();
$('.preset-pill').click(function(){
var p = $(this).data('p'), s = $(this).data('s'), h = $(this).data('h');
$('#primary_picker').val(p); $('#primary_code').text(p);
$('#secondary_picker').val(s); $('#secondary_code').text(s);
$('#heading_picker').val(h); $('#heading_code').text(h);
$('.preset-pill').css('border-color', '#e2e8f0');
$(this).css('border-color', '#0b4a8e');
});
$('#primary_picker').on('input change', function(){ $('#primary_code').text($(this).val()); });
$('#secondary_picker').on('input change', function(){ $('#secondary_code').text($(this).val()); });
$('#heading_picker').on('input change', function(){ $('#heading_code').text($(this).val()); });
var mediaUploader;
$('.btn-upload').click(function(e) {
e.preventDefault();
var targetInput = $(this).data('target');
if (mediaUploader) { mediaUploader.targetInput = targetInput; mediaUploader.open(); return; }
mediaUploader = wp.media.frames.file_frame = wp.media({ title: 'Upload Image', button: { text: 'Use Media' }, multiple: false });
mediaUploader.targetInput = targetInput;
mediaUploader.on('select', function() {
var attachment = mediaUploader.state().get('selection').first().toJSON();
$(mediaUploader.targetInput).val(attachment.url);
});
mediaUploader.open();
});
});
</script>
<?php
}
function edukarsa_about_page_html() {
if ( ! current_user_can( 'manage_options' ) ) return;
?>
<div class="wrap edukarsa-admin-wrap" style="max-width: 1000px; margin-top: 20px;">
<div style="background: linear-gradient(135deg, #0f2b5c 0%, #1a73e8 100%); color: #ffffff; padding: 45px 40px; border-radius: 16px; box-shadow: 0 15px 35px rgba(15,43,92,0.18); margin-bottom: 30px; position: relative; overflow: hidden;">
<div style="position: absolute; top: -20px; right: -20px; font-size: 140px; opacity: 0.08; font-weight: 900; user-select: none;">🎓</div>
<span style="display: inline-block; background: rgba(255,255,255,0.2); padding: 4px 14px; border-radius: 20px; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 15px;"><?php echo esc_html( edukarsa_t( 'WordPress Theme Khusus Sekolah & Kampus', 'Dedicated WordPress Theme for Schools & Universities' ) ); ?></span>
<h1 style="color: #ffffff; font-size: 32px; font-weight: 800; margin: 0 0 12px; line-height: 1.2;">EduKarsa Theme</h1>
<p style="font-size: 15px; color: rgba(255,255,255,0.9); line-height: 1.7; max-width: 680px; margin: 0 0 25px;">
<?php echo esc_html( edukarsa_t( 'Tema WordPress profesional 100% Native dan Zero Plugin yang dirancang secara khusus untuk memberikan performa ultra cepat, keamanan tingkat tinggi, ramah disabilitas (WCAG), dan siap pakai untuk kebutuhan akreditasi institusi pendidikan.', 'A 100% Native and Zero Plugin professional WordPress theme designed specifically for ultra-fast performance, high-grade security, WCAG accessibility, and international educational standards.' ) ); ?>
</p>
<div style="display: flex; gap: 12px; flex-wrap: wrap;">
<a href="https://apps.masbudi.my.id/edukarsa" target="_blank" rel="noopener" class="button" style="background: #ffffff; color: #0f2b5c; font-weight: 800; padding: 6px 20px; height: auto; border-radius: 50px; border: none; box-shadow: 0 4px 12px rgba(0,0,0,0.15);">
🌐 https://apps.masbudi.my.id/ &raquo;
</a>
<a href="https://donate.masbudi.my.id/edukarsa" target="_blank" rel="noopener" class="button" style="background: #f59e0b; color: #ffffff; font-weight: 800; padding: 6px 20px; height: auto; border-radius: 50px; border: none; box-shadow: 0 4px 12px rgba(0,0,0,0.15);">
☕ https://donate.masbudi.my.id &raquo;
</a>
</div>
</div>
<div style="display: grid; grid-template-columns: 1.4fr 1fr; gap: 25px; align-items: start;">
<div>
<div style="background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.04); margin-bottom: 25px;">
<div style="display: flex; align-items: center; gap: 12px; margin-bottom: 15px;">
<span style="font-size: 32px;">☕</span>
<div>
<h3 style="margin: 0; font-size: 18px; color: #0f172a; font-weight: 800;"><?php echo esc_html( edukarsa_t( 'Dukung Keberlanjutan Tema EduKarsa', 'Support EduKarsa Theme Sustainability' ) ); ?></h3>
<span style="font-size: 12px; color: #64748b;"><?php echo esc_html( edukarsa_t( 'Kontribusi Anda menjaga tema ini tetap gratis, aman, dan terus berkembang.', 'Your contribution keeps this theme free, secure, and actively developed.' ) ); ?></span>
</div>
</div>
<p style="font-size: 14px; color: #334155; line-height: 1.75; margin-bottom: 18px;">
<?php echo wp_kses_post( edukarsa_t( 'Tema <strong>EduKarsa</strong> dibangun dengan komitmen <em>Zero Plugin</em> untuk memastikan situs institusi pendidikan Anda terbebas dari lisensi berbayar bulanan, terbebas dari celah keamanan plugin pihak ketiga, dan memiliki kecepatan akses maksimal bagi siswa maupun wali murid.', 'The <strong>EduKarsa</strong> theme is built with a <em>Zero Plugin</em> standard to ensure your educational site is free from monthly plugin fees, third-party security vulnerabilities, and maintains maximum access speed for students and parents.' ) ); ?>
</p>
<div style="background: #fef3c7; border-left: 4px solid #f59e0b; padding: 14px 16px; border-radius: 4px; margin-bottom: 22px;">
<p style="margin: 0; font-size: 13px; color: #92400e; line-height: 1.6;">
<strong><?php echo esc_html( edukarsa_t( 'Mari Berkolaborasi:', 'Let us Collaborate:' ) ); ?></strong> <?php echo esc_html( edukarsa_t( 'Jika tema ini membantu institusi Anda menghemat biaya pengembangan, Anda dapat menyisihkan donasi sukarela untuk mendukung riset dan pemeliharaan fitur berkelanjutan.', 'If this theme helps your institution save development costs, voluntary donations are greatly appreciated to support continuous research and maintenance.' ) ); ?>
</p>
</div>
<a href="https://donate.masbudi.my.id/edukarsa" target="_blank" rel="noopener" style="display: block; text-align: center; background: linear-gradient(135deg, #f59e0b, #d97706); color: #ffffff; text-decoration: none; padding: 14px 25px; border-radius: 50px; font-weight: 800; font-size: 15px; box-shadow: 0 8px 20px rgba(217,119,6,0.3);">
💖 <?php echo esc_html( edukarsa_t( 'Salurkan Donasi Melalui', 'Support & Donate via' ) ); ?> https://donate.masbudi.my.id &raquo;
</a>
</div>
<div style="background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.04);">
<h4 style="margin: 0 0 15px; font-size: 15px; color: #0f172a; font-weight: 800;"><?php echo esc_html( edukarsa_t( '⚡ Keunggulan Arsitektur EduKarsa', '⚡ EduKarsa Architectural Highlights' ) ); ?></h4>
<ul style="margin: 0; padding-left: 18px; font-size: 13px; color: #475569; line-height: 1.9;">
<li><strong>100% Native WordPress</strong>: <?php echo esc_html( edukarsa_t( 'Mengandalkan Settings API dan Native CPT tanpa plugin pihak ketiga.', 'Built on core Settings API and Native CPTs with zero external plugins.' ) ); ?></li>
<li><strong>WCAG 2.1 Accessibility</strong>: <?php echo esc_html( edukarsa_t( 'Dilengkapi Web Speech Synthesizer (Audio Baca), Kontras Tinggi, dan Monokrom.', 'Equipped with Web Speech Synthesizer (Audio Screen Reader), High Contrast, and Monochrome.' ) ); ?></li>
<li><strong>Multilingual Ready</strong>: <?php echo esc_html( edukarsa_t( 'Dukungan translasi instan otomatis (ID, EN, AR, ZH, JA) dan dasbor bilingual.', 'Instant frontend translation (ID, EN, AR, ZH, JA) and bilingual admin dashboard.' ) ); ?></li>
<li><strong>Structured Schema JSON-LD</strong>: <?php echo esc_html( edukarsa_t( 'Metadata otomatis untuk memaksimalkan peringkat Google Search & Google News.', 'Automatic rich snippets metadata for Google Search and Google News rankings.' ) ); ?></li>
</ul>
</div>
</div>
<div>
<div style="background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.04); margin-bottom: 25px;">
<div style="text-align: center; margin-bottom: 20px;">
<div style="width: 75px; height: 75px; border-radius: 50%; background: #0f2b5c; color: #ffffff; font-size: 32px; font-weight: 900; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; box-shadow: 0 8px 20px rgba(15,43,92,0.2);">
MB
</div>
<h3 style="margin: 0 0 4px; font-size: 18px; font-weight: 800; color: #0f172a;">Mas Budi Kusuma</h3>
<span style="font-size: 12px; color: #1a73e8; font-weight: 700; background: #e0f2fe; padding: 2px 10px; border-radius: 12px;">Full-Stack & DevOps Engineer</span>
</div>
<div style="border-top: 1px solid #f1f5f9; padding-top: 15px; font-size: 13px; color: #334155; line-height: 1.8;">
<div style="margin-bottom: 10px;">
<span style="display: block; font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase;"><?php echo esc_html( edukarsa_t( 'Portal Aplikasi', 'Application Portal' ) ); ?></span>
<a href="https://apps.masbudi.my.id/edukarsa" target="_blank" rel="noopener" style="font-weight: 700; color: #0f2b5c; text-decoration: none;">https://apps.masbudi.my.id/</a>
</div>
<div style="margin-bottom: 10px;">
<span style="display: block; font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase;"><?php echo esc_html( edukarsa_t( 'Portal Donasi', 'Donation Portal' ) ); ?></span>
<a href="https://donate.masbudi.my.id/edukarsa" target="_blank" rel="noopener" style="font-weight: 700; color: #d97706; text-decoration: none;">https://donate.masbudi.my.id</a>
</div>
<div style="margin-bottom: 15px;">
<span style="display: block; font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase;"><?php echo esc_html( edukarsa_t( 'Email Developer', 'Developer Email' ) ); ?></span>
<a href="mailto:[email protected]" style="font-weight: 700; color: #0f2b5c; text-decoration: none;">[email protected]</a>
</div>
</div>
<a href="mailto:[email protected]?subject=EduKarsa%20Theme%20Inquiry" class="button" style="width: 100%; text-align: center; border-radius: 6px; padding: 6px 0; font-weight: 700; color: #0f2b5c; border-color: #cbd5e1;">
✉️ <?php echo esc_html( edukarsa_t( 'Kirim Pesan ke Developer', 'Contact Developer' ) ); ?>
</a>
</div>
<div style="text-align: center; font-size: 12px; color: #94a3b8;">
<p style="margin: 0;">EduKarsa Theme &bull; v1.1.4</p>
<p style="margin: 4px 0 0;">Developed by <strong>masbudi.my.id</strong></p>
</div>
</div>
</div>
</div>
<?php
}
// Menyuntikkan sub-menu Galeri ke dalam menu utama EduKarsa
add_action('admin_menu', function() {
// Deteksi parent slug (edukarsa_main_menu atau edukarsa_settings)
$parent = menu_page_url('edukarsa_main_menu', false) ? 'edukarsa_main_menu' : 'edukarsa_settings';
add_submenu_page( $parent, 'Semua Galeri', '📸 Galeri Fasilitas', 'manage_options', 'edit.php?post_type=galeri' );
add_submenu_page( $parent, 'Kategori Galeri', '📂 Kategori Galeri', 'manage_options', 'edit-tags.php?taxonomy=kategori_galeri&post_type=galeri' );
}, 100);