Changeset 5854
- Timestamp:
- 08/31/2017 09:03:22 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
r5853 r5854 1124 1124 1125 1125 $attr = shortcode_atts( array( 1126 'link' => 'none' 1126 'link' => 'none', 1127 'title' => 'visible', 1128 'content' => 'full', 1129 'excerpt_length' => 55, 1127 1130 ), $attr ); 1128 1131 … … 1155 1158 1156 1159 <div id="wcorg-sponsor-<?php the_ID(); ?>" class="wcorg-sponsor"> 1157 <?php if ( 'website' == $attr['link'] && $website ) : ?> 1158 <h3><a href="<?php echo esc_attr( esc_url( $website ) ); ?>"><?php the_title(); ?></a></h3> 1159 <?php else : ?> 1160 <h3><?php the_title(); ?></h3> 1160 <?php if ( 'visible' === $attr['title'] ) : ?> 1161 <?php if ( 'website' === $attr['link'] && $website ) : ?> 1162 <h3><a href="<?php echo esc_attr( esc_url( $website ) ); ?>"><?php the_title(); ?></a></h3> 1163 <?php elseif ( 'post' === $attr['link'] ) : ?> 1164 <h3><a href="<?php echo esc_attr( esc_url( get_permalink() ) ); ?>"><?php the_title(); ?></a></h3> 1165 <?php else : ?> 1166 <h3><?php the_title(); ?></h3> 1167 <?php endif; ?> 1161 1168 <?php endif; ?> 1162 1169 … … 1166 1173 <?php the_post_thumbnail( 'wcb-sponsor-logo-horizontal-2x', array( 'alt' => get_the_title() ) ); ?> 1167 1174 </a> 1175 <?php elseif ( 'post' == $attr['link'] ) : ?> 1176 <a href="<?php echo esc_attr( esc_url( get_permalink() ) ); ?>"> 1177 <?php the_post_thumbnail( 'wcb-sponsor-logo-horizontal-2x', array( 'alt' => get_the_title() ) ); ?> 1178 </a> 1168 1179 <?php else : ?> 1169 1180 <?php the_post_thumbnail( 'wcb-sponsor-logo-horizontal-2x', array( 'alt' => get_the_title() ) ); ?> 1170 1181 <?php endif; ?> 1171 1182 1172 <?php the_content(); ?> 1183 <?php if ( 'full' === $attr['content'] ) : ?> 1184 <?php the_content(); ?> 1185 <?php elseif ( 'excerpt' === $attr['content'] ) : ?> 1186 <?php echo wpautop( 1187 wp_trim_words( 1188 get_the_content(), 1189 absint( $attr['excerpt_length'] ), 1190 apply_filters( 'excerpt_more', ' ' . '…' ) 1191 ) 1192 ); ?> 1193 <?php endif; ?> 1173 1194 </div> 1174 1195 </div><!-- #sponsor -->
Note: See TracChangeset
for help on using the changeset viewer.