-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathindex.php
More file actions
97 lines (73 loc) · 2.76 KB
/
index.php
File metadata and controls
97 lines (73 loc) · 2.76 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
<?php
/**
* 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 ng-cloak data-ng-show="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)) {
/** @noinspection PhpIncludeInspection */
include(locate_template($template_slug));
}
?>
</homenewsloop>
</div>
<?php
if (get_option('show_on_front') !== 'page') {
?>
<div data-ng-cloak data-ng-hide="true" data-ng-show="is_include_visible"
data-ng-include="templateDir+'/library/views/loops/newsloop.html'"></div>
<?php } else { ?>
<!--When we load a page other than the index and we set in reading options to static page(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 data-ng-cloak data-ng-show="is_include_visible"
data-ng-include="templateDir+'/library/views/pages/<?php echo $angp_slug_page_on_front . '.html'; ?>'"></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>$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>
</div>
</div>-->
</div>
<!--WP-READING-SETTINGS-->