fix(theme-check): perbaiki kapitalisasi WordPress, dimensi screenshot 1200x900, dan kompresi aset gambar
This commit is contained in:
+17
-29
@@ -1,25 +1,19 @@
|
||||
<?php defined( 'ABSPATH' ) || exit; ?>
|
||||
<?php
|
||||
/**
|
||||
* Template Sidebar Native EduKarsa
|
||||
* Dikelola 100% dari Dashboard EduKarsa (Bebas Menu Widget WP)
|
||||
*/
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
?>
|
||||
<aside id="secondary" class="edukarsa-custom-sidebar">
|
||||
|
||||
<!-- 1. Pencarian Cepat Native -->
|
||||
<aside id="secondary" class="edukarsa-custom-sidebar" aria-label="<?php esc_attr_e( 'Sidebar Utama', 'edukarsa' ); ?>">
|
||||
<?php if ( is_active_sidebar( 'sidebar-utama' ) ) : ?>
|
||||
<div class="sidebar-dynamic-widgets">
|
||||
<?php dynamic_sidebar( 'sidebar-utama' ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( get_option( 'edukarsa_sidebar_tampil_search', 1 ) == 1 ) : ?>
|
||||
<div class="card-style sidebar-widget">
|
||||
<form role="search" method="get" class="sidebar-search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||
<div class="sidebar-search-wrapper">
|
||||
<input type="search" class="sidebar-search-input" placeholder="Cari warta / informasi..." value="<?php echo get_search_query(); ?>" name="s" required>
|
||||
<button type="submit" class="sidebar-search-btn" aria-label="Cari">🔍</button>
|
||||
</div>
|
||||
</form>
|
||||
<?php get_search_form(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- 2. Mini Banner CTA Pendaftaran / PMB -->
|
||||
<?php if ( get_option( 'edukarsa_sidebar_tampil_cta', 1 ) == 1 ) : ?>
|
||||
<div class="card-style sidebar-widget sidebar-cta-box text-center">
|
||||
<span class="sidebar-cta-badge"><?php echo esc_html( get_option( 'edukarsa_sidebar_cta_badge', 'Penerimaan Siswa/Mhs' ) ); ?></span>
|
||||
@@ -33,9 +27,8 @@
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- 3. BOX HTML KUSTOM NATIVE (Maps, Widget Luar, Teks Tambahan) -->
|
||||
<?php
|
||||
if ( get_option( 'edukarsa_sidebar_tampil_html', 0 ) == 1 ) :
|
||||
<?php
|
||||
if ( get_option( 'edukarsa_sidebar_tampil_html', 0 ) == 1 ) :
|
||||
$html_content = get_option( 'edukarsa_sidebar_html_content' );
|
||||
if ( ! empty( $html_content ) ) :
|
||||
$html_title = get_option( 'edukarsa_sidebar_html_title' );
|
||||
@@ -48,12 +41,11 @@
|
||||
<?php echo do_shortcode( wp_specialchars_decode( $html_content ) ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
endif;
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
|
||||
<!-- 4. Berita Terkini Dinamis -->
|
||||
<?php if ( get_option( 'edukarsa_sidebar_tampil_recent', 1 ) == 1 ) : ?>
|
||||
<div class="card-style sidebar-widget">
|
||||
<h3 class="sidebar-widget-title"><?php echo esc_html( get_option( 'edukarsa_sidebar_recent_title', 'Warta Terkini' ) ); ?></h3>
|
||||
@@ -65,7 +57,6 @@
|
||||
'posts_per_page' => $count,
|
||||
'post__not_in' => array( get_the_ID() )
|
||||
) );
|
||||
|
||||
if ( $recent_query->have_posts() ) :
|
||||
while ( $recent_query->have_posts() ) : $recent_query->the_post();
|
||||
?>
|
||||
@@ -76,7 +67,7 @@
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<div class="sidebar-recent-info">
|
||||
<span class="sidebar-recent-date">📅 <?php echo get_the_date( 'd M Y' ); ?></span>
|
||||
<span class="sidebar-recent-date">📅 <?php echo get_the_date( 'd M Y' ); ?></span>
|
||||
<h4 class="sidebar-recent-title">
|
||||
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
|
||||
</h4>
|
||||
@@ -86,14 +77,13 @@
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
else :
|
||||
echo '<p style="font-size:13px; color:var(--text-muted); margin:0;">Belum ada artikel lainnya.</p>';
|
||||
echo '<p style="font-size:13px; color:var(--text-muted); margin:0;">' . esc_html__( 'Belum ada artikel lainnya.', 'edukarsa' ) . '</p>';
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- 5. Daftar Kategori Pilihan -->
|
||||
<?php if ( get_option( 'edukarsa_sidebar_tampil_cats', 1 ) == 1 ) : ?>
|
||||
<div class="card-style sidebar-widget">
|
||||
<h3 class="sidebar-widget-title"><?php echo esc_html( get_option( 'edukarsa_sidebar_cats_title', 'Kategori Pilihan' ) ); ?></h3>
|
||||
@@ -113,17 +103,15 @@
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- 6. Banner Poster Sidebar -->
|
||||
<?php
|
||||
<?php
|
||||
$banner_img = get_option( 'edukarsa_sidebar_banner_img' );
|
||||
if ( ! empty( $banner_img ) ) :
|
||||
$banner_url = get_option( 'edukarsa_sidebar_banner_url', '#' );
|
||||
?>
|
||||
<div class="card-style sidebar-widget sidebar-banner-box" style="padding: 10px; overflow: hidden;">
|
||||
<a href="<?php echo esc_url( $banner_url ); ?>" target="_blank" rel="noopener">
|
||||
<img src="<?php echo esc_url( $banner_img ); ?>" alt="Banner Pengumuman" style="width: 100%; height: auto; border-radius: 8px; display: block;">
|
||||
<img src="<?php echo esc_url( $banner_img ); ?>" alt="<?php esc_attr_e( 'Banner Pengumuman', 'edukarsa' ); ?>" style="width: 100%; height: auto; border-radius: 8px; display: block;">
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user