Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save wpsmith/88548c92029b72af22d7 to your computer and use it in GitHub Desktop.

Select an option

Save wpsmith/88548c92029b72af22d7 to your computer and use it in GitHub Desktop.
</php
/**
* 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 . '"></', ', ', '</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[] = sprintf( '<ul class="details"><span class="tax-title">%s: </span>', __( 'Bible Lesson Subjects', 'ssz' ) );
//$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