chore: complete M1.1 runtime QA and release packaging
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* Sidebar — dynamic_sidebar with graceful empty state.
|
||||
*
|
||||
* @package XShop
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
$sidebarId = $args['id'] ?? 'sidebar-main';
|
||||
if (!is_active_sidebar($sidebarId)) {
|
||||
// Allow filtering to suppress empty state.
|
||||
if (apply_filters('xshop_sidebar_show_empty', false, $sidebarId)) {
|
||||
echo '<aside class="xshop-layout__sidebar" aria-label="' . esc_attr__('Sidebar', 'xshop') . '"><p class="xshop-text-muted">' . esc_html__('No widgets added.', 'xshop') . '</p></aside>';
|
||||
}
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<aside class="xshop-layout__sidebar" aria-label="<?php esc_attr_e('Sidebar', 'xshop'); ?>">
|
||||
<?php dynamic_sidebar($sidebarId); ?>
|
||||
</aside>
|
||||
Reference in New Issue
Block a user