fix(layout): restore sidebar after viewport switch

This commit is contained in:
2026-08-14 22:06:33 +08:00
parent 483313e396
commit 6b72fdcf10
2 changed files with 3 additions and 7 deletions
+3 -3
View File
@@ -140,9 +140,9 @@ if (!function_exists('aksrt_is_show_sidebar_filter')):
* Core sidebar visibility decision (Zibll zib_is_show_sidebar_filter parity).
*/
function aksrt_is_show_sidebar_filter(): bool {
if (function_exists('wp_is_mobile') && wp_is_mobile()) {
return false;
}
// Keep the sidebar in the document for every request. wp_is_mobile() is
// User-Agent based, so it cannot track a browser viewport changing after
// the response is rendered. Responsive CSS controls narrow-screen hiding.
$cfg = aksrt_get_sidebar_config_safe();
if (empty($cfg['enabled'])) {
-4
View File
@@ -11,10 +11,6 @@
defined('ABSPATH') || exit;
if (wp_is_mobile()) {
return;
}
$sidebar_id = function_exists('aksrt_resolve_sidebar_id')
? aksrt_resolve_sidebar_id()
: 'home_sidebar';