feat(customizer): tambahkan input kustomisasi judul dan badge frontend untuk seksi milestone, program, dan keunggulan
This commit is contained in:
+66
-25
@@ -117,8 +117,11 @@ function edukarsa_register_settings() {
|
||||
// Header Logo
|
||||
'edukarsa_header_logo',
|
||||
|
||||
// Custom Teks
|
||||
'edukarsa_keunggulan_subtitle', 'edukarsa_keunggulan_title', 'edukarsa_news_title',
|
||||
// Custom Teks Headings Frontend (Milestone, Program, Keunggulan, News)
|
||||
'edukarsa_milestone_subtitle', 'edukarsa_milestone_title',
|
||||
'edukarsa_program_subtitle', 'edukarsa_program_title',
|
||||
'edukarsa_keunggulan_subtitle', 'edukarsa_keunggulan_title',
|
||||
'edukarsa_news_title',
|
||||
|
||||
// Stats Fields
|
||||
'edukarsa_stat1_angka', 'edukarsa_stat1_label', 'edukarsa_stat1_desc', 'edukarsa_stat1_icon',
|
||||
@@ -148,7 +151,7 @@ function edukarsa_register_settings() {
|
||||
}
|
||||
add_action( 'admin_init', 'edukarsa_register_settings' );
|
||||
|
||||
// 4. HALAMAN PENGATURAN DENGAN DESAIN 2-KOLOM
|
||||
// 4. HALAMAN PENGATURAN
|
||||
function edukarsa_settings_page_html() {
|
||||
if ( ! current_user_can( 'manage_options' ) ) return;
|
||||
$font_current = get_option( 'edukarsa_font_choice', 'plus_jakarta_sans' );
|
||||
@@ -277,7 +280,7 @@ function edukarsa_settings_page_html() {
|
||||
<div class="switch-label-wrap">
|
||||
<div class="switch-label">
|
||||
<span>Tampilkan Slider Atas</span>
|
||||
<span class="tooltip-hint">?<span class="tooltip-text">Gambar & URL link banner dikelola pada modul 🌟 Slider Banner.</span></span>
|
||||
<span class="tooltip-hint">?<span class="tooltip-text">Gambar & tautan banner dikelola pada modul 🌟 Slider Banner.</span></span>
|
||||
</div>
|
||||
<a href="<?php echo admin_url('edit.php?post_type=slider'); ?>" class="cpt-shortcut-link">Kelola Slider ↗</a>
|
||||
</div>
|
||||
@@ -290,9 +293,9 @@ function edukarsa_settings_page_html() {
|
||||
<div class="switch-label-wrap">
|
||||
<div class="switch-label">
|
||||
<span>Tampilkan 3 Kotak Statistik</span>
|
||||
<span class="tooltip-hint">?<span class="tooltip-text">Konfigurasi teks, angka capaian, dan ikon diatur langsung pada form di bawah.</span></span>
|
||||
<span class="tooltip-hint">?<span class="tooltip-text">Konfigurasi teks, angka capaian, dan ikon diatur langsung pada formulir di bawah.</span></span>
|
||||
</div>
|
||||
<span style="font-size: 11px; color: #64748b;">Form Pengaturan Bawah ↓</span>
|
||||
<span style="font-size: 11px; color: #64748b;">Formulir Pengaturan Bawah ↓</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)); ?>>
|
||||
@@ -372,20 +375,20 @@ function edukarsa_settings_page_html() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 3. Program, Milestone & Keunggulan (DENGAN TOOLTIP & SHORTCUT) -->
|
||||
<!-- 3. Program, Milestone & Keunggulan (KATA-KATA FRONTEND BISA DIKOSTUM) -->
|
||||
<div class="edukarsa-card">
|
||||
<div class="edukarsa-card-header">
|
||||
<h2>⭐ 3. Program, Milestones, & Keunggulan</h2>
|
||||
</div>
|
||||
<div class="edukarsa-card-body">
|
||||
|
||||
<!-- Baris Switch Toggle & Shortcut Sidebar CPT -->
|
||||
<div class="switch-row-inline">
|
||||
|
||||
<!-- Milestone Switch & Shortcut -->
|
||||
<div class="switch-row">
|
||||
<div class="switch-label-wrap">
|
||||
<div class="switch-label">
|
||||
<span>Tampilkan 4 Milestone</span>
|
||||
<span class="tooltip-hint">?<span class="tooltip-text">Data angka prestasi & capaian diisi melalui menu 🏆 Milestone di sidebar admin.</span></span>
|
||||
<span>Seksi Milestone</span>
|
||||
<span class="tooltip-hint">?<span class="tooltip-text">Data angka prestasi diisi melalui menu 🏆 Milestone di sidebar admin.</span></span>
|
||||
</div>
|
||||
<a href="<?php echo admin_url('edit.php?post_type=milestone'); ?>" class="cpt-shortcut-link">Kelola Milestone ↗</a>
|
||||
</div>
|
||||
@@ -395,11 +398,10 @@ function edukarsa_settings_page_html() {
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Program Switch & Shortcut -->
|
||||
<div class="switch-row">
|
||||
<div class="switch-label-wrap">
|
||||
<div class="switch-label">
|
||||
<span>Tampilkan Program (3 Grid)</span>
|
||||
<span>Seksi Program</span>
|
||||
<span class="tooltip-hint">?<span class="tooltip-text">Daftar jurusan & program kurikulum dikelola melalui menu 📚 Program Kami di sidebar admin.</span></span>
|
||||
</div>
|
||||
<a href="<?php echo admin_url('edit.php?post_type=program'); ?>" class="cpt-shortcut-link">Kelola Program ↗</a>
|
||||
@@ -410,12 +412,11 @@ function edukarsa_settings_page_html() {
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Keunggulan Switch & Shortcut -->
|
||||
<div class="switch-row">
|
||||
<div class="switch-label-wrap">
|
||||
<div class="switch-label">
|
||||
<span>Tampilkan Keunggulan (9 Grid)</span>
|
||||
<span class="tooltip-hint">?<span class="tooltip-text">9 butir keunggulan institusi dikelola melalui menu ⭐ Keunggulan di sidebar admin.</span></span>
|
||||
<span>Seksi Keunggulan</span>
|
||||
<span class="tooltip-hint">?<span class="tooltip-text">Butir keunggulan institusi dikelola melalui menu ⭐ Keunggulan di sidebar admin.</span></span>
|
||||
</div>
|
||||
<a href="<?php echo admin_url('edit.php?post_type=keunggulan'); ?>" class="cpt-shortcut-link">Kelola Keunggulan ↗</a>
|
||||
</div>
|
||||
@@ -424,19 +425,59 @@ function edukarsa_settings_page_html() {
|
||||
<span class="slider-round"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-grid-2" style="margin-top: 15px;">
|
||||
<div class="form-field-group">
|
||||
<label>Subtitle Keunggulan</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">
|
||||
<label>Judul Seksi Keunggulan</label>
|
||||
<input type="text" name="edukarsa_keunggulan_title" value="<?php echo esc_attr(get_option('edukarsa_keunggulan_title', 'Keunggulan Program')); ?>">
|
||||
<!-- Opsi Custom Teks Frontend: Milestone -->
|
||||
<div style="border-top: 1px solid #e2e8f0; margin-top: 20px; padding-top: 15px;">
|
||||
<h4 style="margin: 0 0 10px; font-size: 13px; color: #0b4a8e; display: flex; align-items: center; gap: 6px;">
|
||||
🏆 Label Tampilan: Seksi Milestone
|
||||
</h4>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-field-group" style="margin-bottom: 0;">
|
||||
<label>Subtitle / Badge Teks</label>
|
||||
<input type="text" name="edukarsa_milestone_subtitle" value="<?php echo esc_attr(get_option('edukarsa_milestone_subtitle', 'REKAM JEJAK')); ?>" placeholder="cth: REKAM JEJAK / CAPAIAN KAMI">
|
||||
</div>
|
||||
<div class="form-field-group" style="margin-bottom: 0;">
|
||||
<label>Judul Seksi (Heading)</label>
|
||||
<input type="text" name="edukarsa_milestone_title" value="<?php echo esc_attr(get_option('edukarsa_milestone_title', 'Milestone & Prestasi')); ?>" placeholder="cth: Milestone & Prestasi (Kosongkan jika tanpa judul)">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Opsi Custom Teks Frontend: Program -->
|
||||
<div style="border-top: 1px solid #e2e8f0; margin-top: 15px; padding-top: 15px;">
|
||||
<h4 style="margin: 0 0 10px; font-size: 13px; color: #0b4a8e; display: flex; align-items: center; gap: 6px;">
|
||||
📚 Label Tampilan: Seksi Program
|
||||
</h4>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-field-group" style="margin-bottom: 0;">
|
||||
<label>Subtitle / Badge Teks</label>
|
||||
<input type="text" name="edukarsa_program_subtitle" value="<?php echo esc_attr(get_option('edukarsa_program_subtitle', 'AKADEMIK & KARAKTER')); ?>" placeholder="cth: AKADEMIK & KARAKTER / JURUSAN PILIHAN">
|
||||
</div>
|
||||
<div class="form-field-group" style="margin-bottom: 0;">
|
||||
<label>Judul Seksi (Heading)</label>
|
||||
<input type="text" name="edukarsa_program_title" value="<?php echo esc_attr(get_option('edukarsa_program_title', 'Our Program')); ?>" placeholder="cth: Program Unggulan / Program Studi">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Opsi Custom Teks Frontend: Keunggulan -->
|
||||
<div style="border-top: 1px solid #e2e8f0; margin-top: 15px; padding-top: 15px;">
|
||||
<h4 style="margin: 0 0 10px; font-size: 13px; color: #0b4a8e; display: flex; align-items: center; gap: 6px;">
|
||||
⭐ Label Tampilan: Seksi Keunggulan
|
||||
</h4>
|
||||
<div class="form-grid-2">
|
||||
<div class="form-field-group" style="margin-bottom: 0;">
|
||||
<label>Subtitle / Badge Teks</label>
|
||||
<input type="text" name="edukarsa_keunggulan_subtitle" value="<?php echo esc_attr(get_option('edukarsa_keunggulan_subtitle', 'WHY CHOOSE US')); ?>" placeholder="cth: WHY CHOOSE US / ALASAN MEMILIH KAMI">
|
||||
</div>
|
||||
<div class="form-field-group" style="margin-bottom: 0;">
|
||||
<label>Judul Seksi (Heading)</label>
|
||||
<input type="text" name="edukarsa_keunggulan_title" value="<?php echo esc_attr(get_option('edukarsa_keunggulan_title', 'Keunggulan Program')); ?>" placeholder="cth: Keunggulan Sekolah / Fasilitas Terbaik">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user