|
Server : LiteSpeed System : Linux srv104790275 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64 User : dewac4139 ( 1077) PHP Version : 8.0.30 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /home/dewa95.com/public_html/wp-content/themes/mabar88/inc/core/ |
Upload File : |
<?php
/**
* Sidebar Manager functions
*
* @package Astra
* @author Astra
* @copyright Copyright (c) 2020, Astra
* @link https://wpastra.com/
* @since Astra 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Site Sidebar
*/
if ( ! function_exists( 'astra_page_layout' ) ) {
/**
* Site Sidebar
*
* Default 'right sidebar' for overall site.
*/
function astra_page_layout() {
if ( is_singular() ) {
// If post meta value is empty,
// Then get the POST_TYPE sidebar.
$layout = astra_get_option_meta( 'site-sidebar-layout', '', true );
if ( empty( $layout ) ) {
$post_type = get_post_type();
if ( 'post' === $post_type || 'page' === $post_type || 'product' === $post_type ) {
$layout = astra_get_option( 'single-' . get_post_type() . '-sidebar-layout' );
}
if ( 'default' == $layout || empty( $layout ) ) {
// Get the global sidebar value.
// NOTE: Here not used `true` in the below function call.
$layout = astra_get_option( 'site-sidebar-layout' );
}
}
} else {
if ( is_search() ) {
// Check only post type archive option value.
$layout = astra_get_option( 'archive-post-sidebar-layout' );
if ( 'default' == $layout || empty( $layout ) ) {
// Get the global sidebar value.
// NOTE: Here not used `true` in the below function call.
$layout = astra_get_option( 'site-sidebar-layout' );
}
} else {
$post_type = get_post_type();
$layout = '';
if ( 'post' === $post_type ) {
$layout = astra_get_option( 'archive-' . get_post_type() . '-sidebar-layout' );
}
if ( 'default' == $layout || empty( $layout ) ) {
// Get the global sidebar value.
// NOTE: Here not used `true` in the below function call.
$layout = astra_get_option( 'site-sidebar-layout' );
}
}
}
return apply_filters( 'astra_page_layout', $layout );
}
}