-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.php
119 lines (96 loc) · 3.41 KB
/
index.php
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
<?php
if (!session_id() ) {
session_start();
}
/**
* The default template file
*
* @package Reactor
* @subpackge Templates
* @since 1.0.0
*/
?>
<?php get_header(); ?>
<!--NG-VIEW-->
<div data-ng-view></div>
<!--NG-VIEW-->
<!--WP-READING-SETTINGS-->
<div data-ng-controller="angpReadingSettingsCtrl">
<div data-ng-if="is_home_visible">
<homenewsloop>
<?php
global $angp_slug_page_on_front;
$angp_page_on_front_id = get_option('page_on_front');
$post = get_post($angp_page_on_front_id);
$angp_slug_page_on_front = $post->post_name;
$template_slug = get_page_template_slug($angp_page_on_front_id);
if (is_front_page() || is_home())
if (get_option('page_for_posts') == 0) {
get_template_part('loops/loop', 'index');
} elseif (is_page($angp_slug_page_on_front) && $template_slug !== '') {
/** @noinspection PhpIncludeInspection */
include(locate_template($template_slug));
}
?>
</homenewsloop>
</div>
<?php
if (get_option('show_on_front') !== 'page') {
?>
<div ng-if="is_include_visible">
<div data-ng-include="templateDir+'/library/views/loops/newsloop.html'"></div>
</div>
<?php } else { ?>
<!--When we load a page other than the index and we set in reading options to static page(ex:front page,posts page). Then on changing route from any page to the index, it should display the front page on the index page-->
<div ng-if="is_include_visible">
<div
data-ng-include="templateDir+'/library/views/pages/<?php echo $angp_slug_page_on_front . '.html'; ?>'"></div>
</div>
<?php } ?>
<?php get_footer(); ?>
<div display-footer>
<div class="angp-footer">
<?php if (is_front_page() && get_option('show_on_front') !== 'posts') {
//when loading page is other than the frontpage and reading settings are set to 'pages'. See: dtDisplayFooter.js
angularpress_footer_inside();
}
?>
</div>
</div>
<!--<div class="row">
<div class="small-6 small-offset-1">
<pre>$location.path() = {{$location.path() }}</pre>
<pre>$location.url() = {{ $location.url() }}</pre>
<pre>$location.absUrl() = {{ $location.absUrl() }}</pre>
<pre>$location.search() = {{ $location.search() }}</pre>
<pre>$route.current.locals = {{$route.current.locals}}</pre>
<pre>$route.current.params = {{$route.current.params}}</pre>
<pre>$route.current.scope= {{$route.current.scope}}</pre>
<pre>$route.current.controller= {{$route.current.controller}}</pre>
<pre>$route.current.templateUrl= {{$route.current.templateUrl}}</pre>
<pre>$routeParams = {{$routeParams}}</pre>
<pre>$routeParams.primaryNav = {{$routeParams.primaryNav}}</pre>
<pre>$routeParams.secondaryNav = {{$routeParams.secondaryNav}}</pre>
<pre>$route.current: {{$route.current}}</pre>
<pre>siteUrl: {{siteUrl}}</pre>
<pre>templateDir: {{templateDir}}</pre>
<?php
/* echo "<pre>" . var_dump(isset($_SESSION['template_req']), 'template_req') .
"</pre>";
echo "<pre>" . var_dump(isset($_SESSION['template_req_pages']), 'template_req_pages') .
"</pre>";
echo "<pre>" . var_dump(isset($_COOKIE['is_page_loaded']), 'cookie page loaded') .
"</pre>";
echo "<pre>" . var_dump(isset($_SESSION['page_loaded']), 'session page_loaded') .
"</pre>";
echo "</br>";
echo "<pre>" . var_dump(session_id(), 'session_id') .
"</pre>";
echo "<pre>" . var_dump(session_name()) .
"</pre>";
echo "</br>";
*/?>
</div>
</div>-->
</div>
<!--WP-READING-SETTINGS-->