| Server IP : 213.186.33.4 / Your IP : 216.73.216.222 Web Server : Apache System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : karinebmkh ( 644538) PHP Version : 8.4.22 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/karinebmkh/www2/wp-content/themes/glaza/includes/ |
Upload File : |
<?php
/**
* @param bool $display_default
*
* @return array
* sidebar name
*/
if ( ! function_exists( 'glaza_config_sidebar_name' ) ) {
function glaza_config_sidebar_name( $display_default = false ) {
$sidebar_data = array();
$custom_sidebars = get_option( 'glaza_data_sidebars', null );
if ( true === $display_default ) {
$sidebar_data['default'] = esc_html__( 'Default from Theme Options', 'glaza' );
};
$sidebar_data['glaza_sidebar_default'] = esc_html__( 'Default Sidebar', 'glaza' );
if ( ! empty( $custom_sidebars ) && is_array( $custom_sidebars ) ) {
foreach ( $custom_sidebars as $sidebar ) {
$sidebar_data[ $sidebar['id'] ] = $sidebar['name'];
};
};
return $sidebar_data;
}
}
/**
* @param bool $default
*
* @return array
* sidebar position
*/
if ( ! function_exists( 'glaza_config_sidebar_position' ) ) {
function glaza_config_sidebar_position( $default = true ) {
if ( ! is_admin() ) {
return false;
}
$sidebar = array(
'none' => array(
'alt' => 'none sidebar',
'img' => get_theme_file_uri( '/assets/images/sidebar-none.png' ),
'title' => esc_html__( 'None', 'glaza' )
),
'left' => array(
'alt' => 'left sidebar',
'img' => get_theme_file_uri( '/assets/images/sidebar-left.png' ),
'title' => esc_html__( 'Left', 'glaza' )
),
'right' => array(
'alt' => 'right sidebar',
'img' => get_theme_file_uri( '/assets/images/sidebar-right.png' ),
'title' => esc_html__( 'Right', 'glaza' )
)
);
if ( true === $default ) {
$sidebar['default'] = array(
'alt' => 'Default',
'img' => get_theme_file_uri( '/assets/images/sidebar-default.png' ),
'title' => esc_html__( 'Default', 'glaza' )
);
};
return $sidebar;
}
}
/**
* @return array|bool
* single post layout
*/
if ( ! function_exists( 'glaza_config_single_post_layout' ) ) {
function glaza_config_single_post_layout() {
if ( ! is_admin() ) {
return false;
}
return array(
'1' => array(
'alt' => 'layout 1',
'img' => get_theme_file_uri( '/assets/images/single-1.png' ),
'title' => esc_html__( 'Style 1', 'glaza' )
),
'2' => array(
'alt' => 'layout 2',
'img' => get_theme_file_uri( '/assets/images/single-2.png' ),
'title' => esc_html__( 'Style 2', 'glaza' ),
),
'3' => array(
'alt' => 'layout 3',
'img' => get_theme_file_uri( '/assets/images/single-3.png' ),
'title' => esc_html__( 'Style 3', 'glaza' ),
),
'4' => array(
'alt' => 'layout 4',
'img' => get_theme_file_uri( '/assets/images/single-4.png' ),
'title' => esc_html__( 'Style 4', 'glaza' ),
),
'5' => array(
'alt' => 'layout 5',
'img' => get_theme_file_uri( '/assets/images/single-5.png' ),
'title' => esc_html__( 'Style 5', 'glaza' ),
),
'6' => array(
'alt' => 'layout 6',
'img' => get_theme_file_uri( '/assets/images/single-6.png' ),
'title' => esc_html__( 'No Featured', 'glaza' ),
)
);
}
}
/**
* @return array|bool
* blog layout
*/
if ( ! function_exists( 'glaza_config_blog_layout' ) ) {
function glaza_config_blog_layout() {
if ( ! is_admin() ) {
return false;
}
return array(
'classic' => array(
'alt' => 'layout classic',
'img' => get_theme_file_uri( '/assets/images/blog-classic.png' ),
'title' => esc_html__( 'Classic', 'glaza' )
),
'classic-2' => array(
'alt' => 'layout classic 2',
'img' => get_theme_file_uri( '/assets/images/blog-classic.png' ),
'title' => esc_html__( 'Classic (without sidebar)', 'glaza' )
),
'list' => array(
'alt' => 'layout list',
'img' => get_theme_file_uri( '/assets/images/blog-list.png' ),
'title' => esc_html__( 'List', 'glaza' )
),
'grid-1' => array(
'alt' => 'layout grid',
'img' => get_theme_file_uri( '/assets/images/blog-grid-1.png' ),
'title' => esc_html__( 'Grid 1', 'glaza' )
),
'grid-2' => array(
'alt' => 'layout grid',
'img' => get_theme_file_uri( '/assets/images/blog-grid-2.png' ),
'title' => esc_html__( 'Grid 2', 'glaza' )
)
);
}
}
/**
* @param bool $ajax
*
* @return array
* blog pagination
*/
if ( ! function_exists( 'glaza_config_blog_pagination' ) ) {
function glaza_config_blog_pagination( $ajax = true ) {
if ( ! is_admin() ) {
return false;
}
if ( true === $ajax ) {
$option = array(
'number' => esc_html__( 'Numeric', 'glaza' ),
'simple' => esc_html__( 'Simple', 'glaza' ),
'loadmore' => esc_html__( 'Load More', 'glaza' ),
'infinite' => esc_html__( 'Infinite Scroll', 'glaza' ),
);
} else {
$option = array(
'number' => esc_html__( 'Numeric', 'glaza' ),
'simple' => esc_html__( 'Simple', 'glaza' ),
);
}
return $option;
}
}
if ( ! function_exists( 'glaza_config_review_position' ) ) {
function glaza_config_review_position() {
if ( ! is_admin() ) {
return false;
}
return array(
'bottom' => array(
'alt' => 'bottom',
'img' => get_template_directory_uri() . '/assets/images/review-bottom.png',
'title' => esc_html__( 'Bottom Content', 'glaza' )
),
'top' => array(
'alt' => 'top',
'img' => get_template_directory_uri() . '/assets/images/review-top.png',
'title' => esc_html__( 'Top Content', 'glaza' )
)
);
}
}
/**
* @return array|bool
* text style config
*/
if ( ! function_exists( 'glaza_config_text_style' ) ) {
function glaza_config_text_style() {
if ( ! is_admin() ) {
return false;
}
return array(
'dark' => array(
'alt' => 'dark',
'img' => get_template_directory_uri() . '/assets/images/text-dark.png',
'title' => esc_html__( 'Dark', 'glaza' )
),
'light' => array(
'alt' => 'light',
'img' => get_template_directory_uri() . '/assets/images/text-light.png',
'title' => esc_html__( 'Light', 'glaza' )
),
);
}
}
/**
* @return array
* single layout
*/
if ( ! function_exists( 'glaza_config_meta_single_post_layout' ) ) {
function glaza_config_meta_single_post_layout() {
if ( ! is_admin() ) {
return false;
}
return array(
'default' => get_theme_file_uri( '/assets/images/default.png' ),
'1' => get_theme_file_uri( '/assets/images/single-1.png' ),
'2' => get_theme_file_uri( '/assets/images/single-2.png' ),
'3' => get_theme_file_uri( '/assets/images/single-3.png' ),
'4' => get_theme_file_uri( '/assets/images/single-4.png' ),
'5' => get_theme_file_uri( '/assets/images/single-5.png' ),
'6' => get_theme_file_uri( '/assets/images/single-6.png' ),
);
}
}
/**
* @return array|bool
* sidebar position
*/
if ( ! function_exists( 'glaza_config_meta_sidebar_position' ) ) {
function glaza_config_meta_sidebar_position() {
if ( ! is_admin() ) {
return false;
}
return array(
'default' => get_theme_file_uri( '/assets/images/sidebar-default.png' ),
'none' => get_theme_file_uri( '/assets/images/sidebar-none.png' ),
'left' => get_theme_file_uri( '/assets/images/sidebar-left.png' ),
'right' => get_theme_file_uri( '/assets/images/sidebar-right.png' ),
);
}
}
/**
* @return array
* metabox review position
*/
if ( ! function_exists( 'glaza_config_meta_review_position' ) ) {
function glaza_config_meta_review_position() {
if ( ! is_admin() ) {
return false;
}
return array(
'default' => get_theme_file_uri( '/assets/images/default.png' ),
'bottom' => get_theme_file_uri( '/assets/images/review-bottom.png' ),
'top' => get_theme_file_uri( '/assets/images/review-top.png' )
);
}
}