role="article" itemscope itemtype="http://schema.org/MusicAlbum"> <?php if (has_post_thumbnail()) { ?> <p class="audiotheme-record-artwork audiotheme-featured-image"> <a href="<?php the_permalink(); ?> "> <?php the_post_thumbnail('record-thumbnail', array('itemprop' => 'image')); ?> <span class="audiotheme-record-type"><?php echo esc_html(get_audiotheme_record_type_string(get_audiotheme_record_type())); ?> </span> </a> </p> <?php } ?> <?php the_title('<h2 class="audiotheme-record-title entry-title" itemprop="name"><a href="' . esc_url(get_permalink()) . '">', '</a></h2>'); ?> <?php $artist = get_audiotheme_record_artist();
/** * Upgrade routine for version 1.7.0. * * @since 1.7.0 */ function audiotheme_upgrade_170() { // Update record types. $terms = get_terms('audiotheme_record_type', array('get' => 'all')); if (!empty($terms)) { foreach ($terms as $term) { $name = get_audiotheme_record_type_string($term->slug); $name = empty($name) ? ucwords(str_replace(array('record-type-', '-'), array('', ' '), $term->name)) : $name; $slug = str_replace('record-type-', '', $term->slug); $result = wp_update_term($term->term_id, 'audiotheme_record_type', array('name' => $name, 'slug' => $slug)); if (is_wp_error($result)) { // Update the name only. We'll account for the 'record-type-' prefix. wp_update_term($term->term_id, 'audiotheme_record_type', array('name' => $name)); } } } }