-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhooks.php
More file actions
181 lines (151 loc) · 3.44 KB
/
Copy pathhooks.php
File metadata and controls
181 lines (151 loc) · 3.44 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?php
/**
*
* Thematic hooks to modify parent theme.
*
*
* @package onedayoneapp
*/
/**
*
* All custom Hooks
*
*/
add_action('init', 'remove_thematic_hooks');
add_action('init', 'add_tags_to_types');
add_action('thematic_header','add_custom_menus', 6);
add_action('thematic_footer', 'custom_footer', 30);
add_action('thematic_belowheader', 'add_slider_to_home', 1);
add_action('thematic_belowheader', 'app_grid', 3);
add_action('thematic_abovecontainer', 'singular_apps');
add_action('wp_head', 'add_wake_up_call_header');
add_action('thematic_belowpost', 'custom_contact_page');
add_action('wp_head', 'handle_contact_form');
add_action('thematic_abovecontent', 'archive_page_header');
add_action('wp_head', 'ie7js');
add_action('thematic_belowheader', 'search_thing');
add_action('thematic_belowcontainer', 'jobs_sidebar');
add_action('thematic_belowheader', 'jobs_header');
add_action('thematic_abovecontent', 'jobs_content_header');
add_action('thematic_belowpost', 'post_footer');
/**
*
* Removing things we don't want...
*
*/
function remove_thematic_hooks(){
remove_action('thematic_header', 'thematic_access', 9);
remove_action('thematic_footer', 'thematic_siteinfo', 30);
}
/**
*
* Functions
*
*/
function add_custom_menus(){
echo '<div id="serious_menu">';
wp_nav_menu(array(
'menu' => 'content-driven'
));
include_once('includes/searchform.php');
echo '</div>';
echo '<div id="showcases">';
wp_nav_menu(array(
'menu' => 'showcases'
));
echo '</div>';
}
function custom_footer(){
if(!is_singular_app() || !is_search() || !is_archive()){
include_once('includes/footer.php');
}
}
function add_slider_to_home(){
if(is_app_home()) {
include_once('includes/slider.php');
}
}
function app_grid(){
if(is_app_home()) {
include('includes/search-module.php');
include('includes/home-grid.php');
}
}
function add_wake_up_call_header(){
wake_up_call();
}
function singular_apps(){
if(is_singular_app()){
include_once('includes/slider.php');
}
}
function custom_contact_page(){
if(
is_page(array(
'contact-us',
'contact',
'Contact Us',
'Contact',
'submit',
'Submit'
))
){
include_once('includes/custom-contact-page.php');
}
}
function handle_contact_form(){
do_the_contact_form();
}
function add_tags_to_types(){
add_tags_to_post_types();
}
function childtheme_override_search_loop(){
include_once('includes/search-loop.php');
}
function archive_page_header(){
$taxes = array();
$types = array('iphone-app', 'ipad-app', 'mac-app');
foreach($types as $type){
$taxes[] = $type.'-category';
$taxes[] = $type.'-tags';
}
if(is_post_type_archive($types) || is_tax()){
include_once('includes/archive-header.php');
include_once('includes/app-grid.php');
}
}
function ie7js(){
echo '<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->';
}
function search_thing(){
if(is_search()){
include_once('includes/search-head.php');
}
}
function jobs_sidebar(){
if(is_page(5461)){ ?>
<aside id="jobs-bar" class="sidebar">
<ul>
<?php dynamic_sidebar('jobsbar'); ?>
</ul>
</aside>
<?php }
}
function jobs_header(){
if(is_page(5461)){
include_once('includes/jobs-header.php');
}
}
function jobs_content_header(){
if(is_page(5461)){
include_once('includes/jobs-content-header.php');
}
}
function post_footer(){
if(is_home() || is_singular('post')){
include_once('includes/post-footer.php');
}
}
?>