Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Commonwell
/
broker-site
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
aa95a46e
authored
2024-02-02 14:49:39 -0500
by
Jeremy Groot
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added custom upload time to resources
1 parent
74701e02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
wp-content/themes/commonwell-broker/inc/shortcodes-resources.php
wp-content/themes/commonwell-broker/inc/shortcodes-resources.php
View file @
aa95a46
...
...
@@ -242,6 +242,12 @@ function resources($id, $taxes, $is_fav = false){
$updated_at
=
get_field
(
'updated_at'
,
$post
->
ID
);
$is_new
=
get_field
(
'is_new'
,
$post
->
ID
);
$post_time
=
get_post_time
(
'U'
,
false
,
$id
);
$custom_post_time
=
get_field
(
'custom_upload_time'
,
$id
);
if
(
$custom_post_time
)
{
$post_time
=
strtotime
(
$custom_post_time
);
}
$categories
=
[];
foreach
(
$taxes
as
$tax
=>
$val
)
{
$terms
=
get_the_terms
(
$id
,
$tax
);
...
...
@@ -281,7 +287,7 @@ function resources($id, $taxes, $is_fav = false){
<?php
}
?>
</td>
<td
class=
"hidden"
>
<?php
echo
$cat
;
?>
</td>
<td
class=
"hidden"
>
<?
php
echo
get_post_time
(
'U'
,
false
,
$id
);
?>
</td>
<td
class=
"hidden"
>
<?
=
$post_time
?>
</td>
</tr>
<?php
$output
=
ob_get_clean
();
...
...
Please
register
or
sign in
to post a comment