' . __( 'Mizan Themes', 'cafeteria-elementor' ) . '' );
?>
ID, 'cafeteria_elementor_theme_settings', true );
if ( isset( $cafeteria_elementor_post_options['post_layout'] ) && ! empty( $cafeteria_elementor_post_options['cafeteria_elementor_post_layout'] ) ) {
$cafeteria_elementor_global_layout = $cafeteria_elementor_post_options['cafeteria_elementor_post_layout'];
}
}
// Include primary sidebar.
if ( 'no-sidebar' !== $cafeteria_elementor_global_layout ) {
get_sidebar();
}
// Include Secondary sidebar.
switch ( $cafeteria_elementor_global_layout ) {
case 'three-columns':
get_sidebar( 'secondary' );
break;
default:
break;
}
// Include Secondary sidebar 1.
switch ( $cafeteria_elementor_global_layout ) {
case 'four-columns':
get_sidebar( 'secondary' );
break;
default:
break;
}
}
endif;
add_action( 'cafeteria_elementor_action_sidebar', 'cafeteria_elementor_add_sidebar' );
//////////////////////////////////////// single page
if ( ! function_exists( 'cafeteria_elementor_add_image_in_single_display' ) ) :
/**
* Add image in single post.
*
* @since 1.0.0
*/
function cafeteria_elementor_add_image_in_single_display() {
global $post;
if ( has_post_thumbnail() ) {
$values = get_post_meta( $post->ID, 'cafeteria_elementor_theme_settings', true );
$cafeteria_elementor_theme_settings_single_image = isset( $values['cafeteria_elementor_single_image'] ) ? esc_attr( $values['cafeteria_elementor_single_image'] ) : '';
if ( ! $cafeteria_elementor_theme_settings_single_image ) {
$cafeteria_elementor_theme_settings_single_image = cafeteria_elementor_get_option( 'cafeteria_elementor_single_image' );
}
if ( 'disable' !== $cafeteria_elementor_theme_settings_single_image ) {
$args = array(
'class' => 'alignleft',
);
the_post_thumbnail( esc_attr( $cafeteria_elementor_theme_settings_single_image ), $args );
}
}
}
endif;
add_action( 'cafeteria_elementor_single_image', 'cafeteria_elementor_add_image_in_single_display' );
if ( ! function_exists( 'cafeteria_elementor_footer_goto_top' ) ) :
/**
* Go to top.
*
* @since 1.0.0
*/
function cafeteria_elementor_footer_goto_top() {
$cafeteria_elementor_show_scroll_to_top = cafeteria_elementor_get_option( 'cafeteria_elementor_show_scroll_to_top' );
if ( true === $cafeteria_elementor_show_scroll_to_top ) :
echo '
';
endif;
}
endif;
add_action( 'cafeteria_elementor_action_after', 'cafeteria_elementor_footer_goto_top', 20 );