-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.php
More file actions
149 lines (143 loc) · 6.69 KB
/
page.php
File metadata and controls
149 lines (143 loc) · 6.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
<?php
global $post;
$postID = $post->ID;
$header_disable = $footer_disable = $content_type = $page_class = $content_class = $enable_preloader = '';
if ( did_action( 'elementor/loaded' ) ) {
$elementorenabled = get_post_meta($postID, '_elementor_page_settings', true);
if(!empty($elementorenabled)){
$page_settings_manager = \Elementor\Core\Settings\Manager::get_settings_managers( 'page' );
$page_settings_model = $page_settings_manager->get_model( $postID );
$header_disable = $page_settings_model->get_settings( '_header_disable' );
$footer_disable = $page_settings_model->get_settings( '_footer_disable' );
$enable_preloader = $page_settings_model->get_settings( '_enable_preloader' );
$content_type = $page_settings_model->get_settings( 'content_type' );
}
}
if(!$header_disable) $header_disable = get_post_meta($postID, "_header_disable", true);
if(!$footer_disable) $footer_disable = get_post_meta($postID, "_footer_disable", true);
if(!$content_type) $content_type = get_post_meta($postID, "content_type", true);
if(!$enable_preloader) $enable_preloader = get_post_meta($postID, "_enable_preloader", true);
if ($content_type =='full_width') {
$page_class = ' full_width';
}elseif($content_type =='full_post_area'){
$page_class = ' visual_page_builder full_width';
}
$title_disable = get_post_meta($postID, "_title_disable", true);
$comment_enable = get_post_meta($postID, "_enable_comments", true);
$content_class = ($content_type == 'full_post_area') ? 'rh-fullbrowser' : 'rh-post-wrapper';
?>
<?php if ($header_disable =='1') :?>
<!DOCTYPE html>
<!--[if IE 8]> <html class="ie8" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 9]> <html class="ie9" <?php language_attributes(); ?>> <![endif]-->
<!--[if (gt IE 9)|!(IE)] <?php language_attributes(); ?>><![endif]-->
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<meta name="viewport" content="width=device-width" />
<!-- feeds & pingback -->
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php if(function_exists('wp_body_open')){wp_body_open();}?>
<div class="rh-outer-wrap">
<div id="top_ankor"></div>
<?php $branded_bg_url = rehub_option('rehub_branded_bg_url');?>
<?php if ($branded_bg_url ) :?>
<a id="branded_bg" href="<?php echo esc_url($branded_bg_url); ?>" target="_blank" rel="sponsored"></a>
<?php endif; ?>
<?php include(rh_locate_template('inc/parts/branded_banner.php')); ?>
<!-- HEADER -->
<?php elseif($header_disable =='2') :?>
<?php get_header(); ?>
<?php $addstyles = '#main_header{position: absolute;}
#main_header, .main-nav{background:none transparent !important;}
nav.top_menu > ul > li > a, .user-ava-intop:after, .dl-menuwrapper button i, .dl-menuwrapper .re-compare-icon-toggle, nav.top_menu > ul > li > a{color: #fff !important}
.dl-menuwrapper button svg line{stroke:#fff !important}
.is-sticky .logo_section_wrap{background: #000 !important}';
wp_register_style( 'rhheader-inline-style', false );
wp_enqueue_style( 'rhheader-inline-style' );
wp_add_inline_style('rhheader-inline-style', $addstyles);
?>
<?php else :?>
<?php get_header(); ?>
<?php endif ;?>
<?php if($enable_preloader):?>
<!-- PRELOADER -->
<div id="rhLoader">
<style scoped>
#loading-spinner {
animation: loading-spinner 1s linear infinite;
}
@keyframes loading-spinner {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
<?php
if (rehub_option('rehub_custom_color')) {
$maincolor = rehub_option('rehub_custom_color');
}
else {
$maincolor = REHUB_MAIN_COLOR;
}
?>
<div class="preloader-cell">
<div>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto;" width="200px" height="200px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" id="loading-spinner">
<circle cx="50" cy="50" r="15" stroke-width="4" stroke="<?php echo esc_attr($maincolor);?>" stroke-dasharray="23.561944901923447 23.561944901923447" fill="none" stroke-linecap="round">
</circle>
</svg>
</div>
</div>
</div>
<!-- /end PRELOADER -->
<?php endif;?>
<!-- CONTENT -->
<div class="rh-container <?php echo ''.$content_type ?>">
<div class="rh-content-wrap clearfix">
<!-- Main Side -->
<div class="main-side page clearfix<?php echo ''.$page_class ?>" id="content">
<div class="<?php echo ''.$content_class;?>">
<?php if(!$title_disable):?>
<div class="title"><h1 class="entry-title"><?php the_title(); ?></h1></div>
<?php endif;?>
<article class="post mb0" id="page-<?php the_ID(); ?>">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php if($content_type =='full_post_area'):?>
<?php wp_link_pages(array( 'before' => '<div class="page-link"><span class="page-link-title">' . esc_html__( 'Pages:', 'rehub-theme' ).'</span>', 'after' => '</div>', 'pagelink' => '<span>%</span>' )); ?>
<?php endif;?>
<?php if($comment_enable):?>
<?php comments_template(); ?>
<?php endif;?>
<?php endwhile; endif; ?>
</article>
</div>
</div>
<!-- /Main Side -->
<?php if($content_type =='def' || $content_type == ''):?>
<!-- Sidebar -->
<?php get_sidebar(); ?>
<!-- /Sidebar -->
<?php endif;?>
</div>
</div>
<!-- /CONTENT -->
<!-- FOOTER -->
<?php if ($footer_disable =='1') :?>
</div>
<span class="rehub_scroll" id="topcontrol" data-scrollto="#top_ankor"><i class="far fa-chevron-up"></i></span>
<?php wp_footer(); ?>
</body>
</html>
<?php else :?>
<?php get_footer(); ?>
<?php endif ;?>