- Timestamp:
- 07/10/2015 08:32:01 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.tv/public_html/wp-content/themes/wptv2/sidebar-single.php
r1044 r1724 82 82 } 83 83 } 84 85 /* 86 * Credit video producer with link to their WordPress.org profile 87 * 88 * In most cases we'll either have the producer name, or the username, but not both. 89 */ 90 $producer_name = get_the_terms( get_the_ID(), 'producer' ); 91 $producer_username = get_the_terms( get_the_ID(), 'producer-username' ); 84 92 ?> 93 94 <?php if ( $producer_name || $producer_username ) : ?> 95 <h5>Producer</h5> 96 97 <div class="video-producer"> 98 <?php if ( $producer_username ) : ?> 99 100 <a href="<?php echo esc_url( 'https://profiles.wordpress.org/' . rawurlencode( $producer_username[0]->name ) ); ?>"> 101 <?php if ( $producer_name ) : ?> 102 <?php echo esc_html( $producer_name[0]->name ); ?> 103 <?php else : ?> 104 <?php echo esc_html( $producer_username[0]->name ); ?> 105 <?php endif; ?> 106 </a> 107 108 <?php else : ?> 109 110 <a href="<?php echo esc_url( get_term_link( $producer_name[0] ) ); ?>"> 111 <?php echo esc_html( $producer_name[0]->name ); ?> 112 </a> 113 114 <?php endif; ?> 115 </div> 116 <?php endif; ?> 117 85 118 </div><!-- .secondary-content -->
Note: See TracChangeset
for help on using the changeset viewer.