aa95a46e by Jeremy Groot

added custom upload time to resources

1 parent 74701e02
...@@ -242,6 +242,12 @@ function resources($id, $taxes, $is_fav = false){ ...@@ -242,6 +242,12 @@ function resources($id, $taxes, $is_fav = false){
242 $updated_at = get_field('updated_at', $post->ID); 242 $updated_at = get_field('updated_at', $post->ID);
243 $is_new = get_field('is_new', $post->ID); 243 $is_new = get_field('is_new', $post->ID);
244 244
245 $post_time = get_post_time('U',false, $id );
246 $custom_post_time = get_field('custom_upload_time', $id);
247 if($custom_post_time) {
248 $post_time = strtotime($custom_post_time);
249 }
250
245 $categories = []; 251 $categories = [];
246 foreach($taxes as $tax => $val) { 252 foreach($taxes as $tax => $val) {
247 $terms = get_the_terms( $id, $tax ); 253 $terms = get_the_terms( $id, $tax );
...@@ -281,7 +287,7 @@ function resources($id, $taxes, $is_fav = false){ ...@@ -281,7 +287,7 @@ function resources($id, $taxes, $is_fav = false){
281 <?php } ?> 287 <?php } ?>
282 </td> 288 </td>
283 <td class="hidden"> <?php echo $cat; ?></td> 289 <td class="hidden"> <?php echo $cat; ?></td>
284 <td class="hidden"><?php echo get_post_time('U',false, $id ); ?></td> 290 <td class="hidden"><?= $post_time ?></td>
285 </tr> 291 </tr>
286 <?php 292 <?php
287 $output = ob_get_clean(); 293 $output = ob_get_clean();
......