Created
October 2, 2014 15:38
-
-
Save WebEndevSnippets/825bab879026e88f97e5 to your computer and use it in GitHub Desktop.
ssz taxo detail output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Displays the Single Activity Post Meta Details | |
* | |
* Sets a site transient to make this simple and display quickly. | |
* | |
* @uses genesis_grid_loop() Generates the Grid Loop | |
*/ | |
function ssz_single_activities_post_meta() { | |
global $post; | |
$output = get_transient( 'ssz_single_activities_post_meta_' . $post->ID ); | |
if ( false === $output || WP_DEBUG || isset( $_GET['debug'] ) ) { | |
if ( isset( $_GET['debug'] ) ) | |
delete_transient( 'ssz_single_activities_post_meta_' . $post->ID ); | |
$output = array(); | |
foreach ( array( 'ssz_concept', 'ssz_bible_character', 'ssz_grade_level', 'ssz_bible_story', /* 'ssz_special_emphasis',*/ ) as $tax ) { | |
$taxonomy = get_taxonomy( $tax ); | |
// $output[] = get_the_term_list( $post->ID, $taxonomy->name, '<li class="tax-item tax-' . $taxonomy->name . '"><h4 class="tax-title"><span class="icon"></span><span class="tax-label">' . $taxonomy->label . '</span></h4>', ', ', '</li>' ); | |
$output[] = get_the_term_list( $post->ID, $taxonomy->name, '', ', ', '<li class="tax-item tax-' . $taxonomy->name . '"></li>' ); | |
} | |
$output = implode( '', $output ); | |
// Set the Transient cache to expire every year | |
$set = set_transient( 'ssz_single_activities_post_meta_' . $post->ID, $output, 31556926 ); | |
} | |
$return = array(); | |
if ( ! empty( $output ) ) { | |
$return[] = '<div class="activity-details">'; | |
//echo '<h3>' . __( 'Details' ) . '</h3>'; | |
$return[] = '<ul class="details"><span class="tax-title">Bible Lesson Subjects: </span>'; | |
//$return[] = implode( '', $output ); | |
$return[] = $output; | |
$return[] = '</ul>'; | |
$return[] = '</div>'; | |
} | |
return implode( '', $return ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment