fix(layout): restore sidebar after viewport switch
This commit is contained in:
1 parent
483313e396
commit
6b72fdcf10
2 files changed
+3
-7
No files matched your search
@@ -140,9 +140,9 @@ if (!function_exists('aksrt_is_show_sidebar_filter')):
|
|||||||
* Core sidebar visibility decision (Zibll zib_is_show_sidebar_filter parity).
|
* Core sidebar visibility decision (Zibll zib_is_show_sidebar_filter parity).
|
||||||
*/
|
*/
|
||||||
function aksrt_is_show_sidebar_filter(): bool {
|
function aksrt_is_show_sidebar_filter(): bool {
|
||||||
if (function_exists('wp_is_mobile') && wp_is_mobile()) {
|
// Keep the sidebar in the document for every request. wp_is_mobile() is
|
||||||
return false;
|
// 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();
|
$cfg = aksrt_get_sidebar_config_safe();
|
||||||
if (empty($cfg['enabled'])) {
|
if (empty($cfg['enabled'])) {
|
||||||
|
|||||||
@@ -11,10 +11,6 @@
|
|||||||
|
|
||||||
defined('ABSPATH') || exit;
|
defined('ABSPATH') || exit;
|
||||||
|
|
||||||
if (wp_is_mobile()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sidebar_id = function_exists('aksrt_resolve_sidebar_id')
|
$sidebar_id = function_exists('aksrt_resolve_sidebar_id')
|
||||||
? aksrt_resolve_sidebar_id()
|
? aksrt_resolve_sidebar_id()
|
||||||
: 'home_sidebar';
|
: 'home_sidebar';
|
||||||
|
|||||||
Reference in new issue
Block a user