-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive-apps.php
370 lines (266 loc) · 9.56 KB
/
archive-apps.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
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<?php get_template_part('templates/page', 'header'); ?>
<?php if (!have_posts()) : ?>
<div class="alert alert-warning">
<?php _e('Sorry, no results were found.', 'sage'); ?>
</div>
<?php get_search_form(); ?>
<?php endif; ?>
<div class="app-archive-info-wrap">
<?php
$last_tracker_update = get_field('last_tracker_update', 'option');
$formatted_tracker_date = date('M j, Y', $last_tracker_update);?>
<h4>Last Updated: <?php echo $formatted_tracker_date;?></h4>
<h3>Welcome to thesoundtestroom app directory!</h3>
<img src="/wp-content/uploads/2016/04/appStore-STR.png" alt="app store logo">
<p>In this section, you'll find a collection of apps currently being tracked by thesoundtestroom. As apps are updated with price changes or new versions, you'll find them automatically added to the lists below.
<br>
<br>
We are not tagging, adding, or altering any info about these apps. Genres, compatible devices, search terms, etc. are all taken directly from the App Store.
<br>
<br>
Search terms are found in the app's description. Please note this might not reflect the functionality of the app, only that it's App Store description contains the keyword.
<br>
<br>
For example, an effect app might suggest you "use with your favorite DAW", while not actually having any DAW like capabilities. Please read all descriptions carefully before purchase. Buyer beware!
<br>
<br>
You can view by:</p>
<ul>
<li><a href="/all-apps">All Apps</a></li>
<li><a href="/status/price-drop">Price Drops</a></li>
<li><a href="/status/price-bump">Price Bumps</a></li>
<li><a href="/status/version-update">Version Updates</a></li>
<li><a href="/recently-released">Recently Released</a></li>
<li><a href="/free-apps">Free Apps</a></li>
<li><a href="/under-five-dollar-apps">Under Five Dollar Apps</a></li>
<li><a href="/five-to-twenty-dollar-apps">Five to Twenty Dollar Apps</a></li>
<li><a href="/over-twenty-dollar-apps">Over Twenty Dollar Apps</a></li>
</ul>
<p>or the following categories:</p>
<div class="col-sm-4 no-gutter">
<h2>Search Terms</h2>
<?php
$args = array( 'hide_empty=0' );
$terms = get_terms( 'search-terms', $args );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
$count = count( $terms );
$i = 0;
echo '<ul>';
foreach ( $terms as $term ) {
$i++;
echo '<li><a href="' . esc_url( get_term_link( $term ) ) . '" alt="' . esc_attr( sprintf( __( 'View all posts filed under %s', 'my_localization_domain' ), $term->name ) ) . '">' . $term->name . '</a> <em>('; echo $term->count; echo')</em></li>';
}
echo '</ul>';
}
?>
</div>
<div class="col-sm-4 genre-no-gutter">
<h2>Genres</h2>
<?php
$args = array( 'hide_empty=0' );
$terms = get_terms( 'genres', $args );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
$count = count( $terms );
$i = 0;
echo '<ul>';
foreach ( $terms as $term ) {
$i++;
echo '<li><a href="' . esc_url( get_term_link( $term ) ) . '" alt="' . esc_attr( sprintf( __( 'View all posts filed under %s', 'my_localization_domain' ), $term->name ) ) . '">' . $term->name . '</a> <em>('; echo $term->count; echo')</em></li>';
}
echo '</ul>';
}
?>
</div>
<div class="col-sm-4 no-gutter">
<h2>Devices</h2>
<?php
$args = array( 'hide_empty=0' );
$terms = get_terms( 'devices', $args );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
$count = count( $terms );
$i = 0;
echo '<ul>';
foreach ( $terms as $term ) {
$i++;
echo '<li><a href="' . esc_url( get_term_link( $term ) ) . '" alt="' . esc_attr( sprintf( __( 'View all posts filed under %s', 'my_localization_domain' ), $term->name ) ) . '">' . $term->name . '</a> <em>('; echo $term->count; echo')</em></li>';
}
echo '</ul>';
}
?>
</div>
</div>
<h4>Last Updated: <?php echo $formatted_tracker_date;?></h4>
<div class="col-sm-12 no-gutter">
<?php
$args = array( 'hide_empty'=>0, 'order'=>'ASC' );
$terms = get_terms( 'status', $args );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
$count = count( $terms );
$i = 0;
echo '<ul class="app-archive-status-ul">';
foreach ( $terms as $term ) {
$i++;
// if ($term->name == 'Price Bump') {
// // echo '<li><a href="' . esc_url( get_term_link( $term ) ) . '" alt="' . esc_attr( sprintf( __( 'View all posts filed under %s', 'my_localization_domain' ), $term->name ) ) . '">' . $term->name . 's</a> <em>('; echo $term->count; echo')</em>';
// }
// else {
echo '<li><h2>' . $term->name . 's</h2>
';
$new_query = array ('taxonomy'=>'status','term'=>$term->slug, 'orderby'=>'rand', 'posts_per_page'=>'6');
$myquery = new WP_Query ($new_query);
$article_count = $myquery->post_count;
$termLinks = get_term_link( $term, 'status' );
if ($article_count) {
?>
<ul>
<?php
while ($myquery->have_posts()) : $myquery->the_post();
$url = wp_get_attachment_url( get_post_thumbnail_id($id) );
$sizes = get_intermediate_image_sizes();
$images = array();
foreach ( $sizes as $size ) {
$images[] = wp_get_attachment_image_src( get_post_thumbnail_id($id), $size );
}
?>
<li>
<a href="<?php the_permalink(); ?>">
<img src="<?php
if ($images[0][0] == false ) {
echo '/wp-content/uploads/STR/genericPostPhoto.png';
}
else {
echo $images[0][0];
}
?>" />
<?php
if (has_term('Version Update', 'status')) {
if ( has_term('Price Drop', 'status') ) {
echo '<div class="app-sticky green version-update">';
}
else if ( has_term('Price Bump', 'status') ) {
echo '<div class="app-sticky red version-update">';
}
else {
echo '<div class="app-sticky version-update">';
}
}
else {
if ( has_term('Price Drop', 'status') ) {
echo '<div class="app-sticky green">';
}
else if ( has_term('Price Bump', 'status') ) {
echo '<div class="app-sticky red">';
}
else {
echo '<div class="app-sticky">';
}
}
?>
<?php
$price = get_field('price');
if ( $price == '0' ) {
echo 'FREE';
}
else {
echo '$';
echo $price;
}
?>
</div>
<?php the_title(); ?>
</a>
</li>
<?php
endwhile;
?>
<?php echo '<h4><a href="' . esc_url( get_term_link( $term ) ) . '" alt="' . esc_attr( sprintf( __( 'View all posts filed under %s', 'my_localization_domain' ), $term->name ) ) . '">View all ' . $term->name . 's</a> <em>('; echo $term->count; echo')</em></h4>'; ?>
</li>
</ul>
<?php
}
// }
}
echo '</ul>';
}
?>
</div><!-- end of status terms section -->
<div class="col-sm-12 no-gutter">
<?php
$args = array( 'hide_empty'=>0 );
$terms = get_terms( 'search-terms', $args );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
$count = count( $terms );
$i = 0;
echo '<ul class="app-archive-status-ul">';
foreach ( $terms as $term ) {
$i++;
// if ($term->name == 'Price Bump') {
// echo '<li><a href="' . esc_url( get_term_link( $term ) ) . '" alt="' . esc_attr( sprintf( __( 'View all posts filed under %s', 'my_localization_domain' ), $term->name ) ) . '">' . $term->name . 's</a> <em>('; echo $term->count; echo')</em>';
// }
// else {
echo '<li><h2>' . $term->name . '</h2>';
$new_query = array ('taxonomy'=>'search-terms','term'=>$term->slug, 'orderby'=>'rand', 'posts_per_page'=>'6');
$myquery = new WP_Query ($new_query);
$article_count = $myquery->post_count;
$termLinks = get_term_link( $term, 'search-terms' );
if ($article_count) {
?>
<ul>
<?php
while ($myquery->have_posts()) : $myquery->the_post();
$url = wp_get_attachment_url( get_post_thumbnail_id($id) );
$sizes = get_intermediate_image_sizes();
$images = array();
foreach ( $sizes as $size ) {
$images[] = wp_get_attachment_image_src( get_post_thumbnail_id($id), $size );
}
?>
<li>
<a href="<?php the_permalink(); ?>">
<img src="<?php
if ($images[0][0] == false ) {
echo '/wp-content/uploads/STR/genericPostPhoto.png';
}
else {
echo $images[0][0];
}
?>" />
<?php
if ( has_term('Price Drop', 'status') ) {
echo '<div class="app-sticky green">';
}
else if ( has_term('Price Bump', 'status') ) {
echo '<div class="app-sticky red">';
}
else {
echo '<div class="app-sticky">';
}
?>
<?php
$price = get_field('price');
if ( $price == '0' ) {
echo 'FREE';
}
else {
echo '$';
echo $price;
}
?>
</div>
<?php the_title(); ?>
</a>
</li>
<?php
endwhile;
?>
<?php echo '<h4><a href="' . esc_url( get_term_link( $term ) ) . '" alt="' . esc_attr( sprintf( __( 'View all posts filed under %s', 'my_localization_domain' ), $term->name ) ) . '">View all ' . $term->name . '</a> <em>('; echo $term->count; echo')</em></h4>'; ?>
</li>
</ul>
<?php
}
// }
}
echo '</ul>';
}
?>
</div><!-- end of status terms section -->