diff --git wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php
index bbdca08..bcded2b 100644
|
|
class WordCamp_Post_Types_Plugin { |
1097 | 1097 | global $post; |
1098 | 1098 | |
1099 | 1099 | $attr = shortcode_atts( array( |
1100 | | 'link' => 'none' |
| 1100 | 'link' => 'none', |
| 1101 | 'title' => 'visible', |
| 1102 | 'content' => 'full', |
| 1103 | 'excerpt_length' => 55, |
1101 | 1104 | ), $attr ); |
1102 | 1105 | |
1103 | 1106 | $attr['link'] = strtolower( $attr['link'] ); |
… |
… |
class WordCamp_Post_Types_Plugin { |
1128 | 1131 | <?php $website = get_post_meta( get_the_ID(), '_wcpt_sponsor_website', true ); ?> |
1129 | 1132 | |
1130 | 1133 | <div id="wcorg-sponsor-<?php the_ID(); ?>" class="wcorg-sponsor"> |
1131 | | <?php if ( 'website' == $attr['link'] && $website ) : ?> |
1132 | | <h3><a href="<?php echo esc_attr( esc_url( $website ) ); ?>"><?php the_title(); ?></a></h3> |
1133 | | <?php else : ?> |
1134 | | <h3><?php the_title(); ?></h3> |
| 1134 | <?php if ( 'visible' === $attr['title'] ) : ?> |
| 1135 | <?php if ( 'website' === $attr['link'] && $website ) : ?> |
| 1136 | <h3><a href="<?php echo esc_attr( esc_url( $website ) ); ?>"><?php the_title(); ?></a></h3> |
| 1137 | <?php elseif ( 'post' === $attr['link'] ) : ?> |
| 1138 | <h3><a href="<?php echo esc_attr( esc_url( get_permalink() ) ); ?>"><?php the_title(); ?></a></h3> |
| 1139 | <?php else : ?> |
| 1140 | <h3><?php the_title(); ?></h3> |
| 1141 | <?php endif; ?> |
1135 | 1142 | <?php endif; ?> |
1136 | 1143 | |
1137 | 1144 | <div class="wcorg-sponsor-description"> |
1138 | 1145 | <?php if ( 'website' == $attr['link'] && $website ) : ?> |
1139 | 1146 | <a href="<?php echo esc_attr( esc_url( $website ) ); ?>"> |
1140 | | <?php the_post_thumbnail( 'wcb-sponsor-logo-horizontal-2x' ); ?> |
| 1147 | <?php the_post_thumbnail( 'wcb-sponsor-logo-horizontal-2x', array( 'alt' => get_the_title() ) ); ?> |
| 1148 | </a> |
| 1149 | <?php elseif ( 'post' == $attr['link'] ) : ?> |
| 1150 | <a href="<?php echo esc_attr( esc_url( get_permalink() ) ); ?>"> |
| 1151 | <?php the_post_thumbnail( 'wcb-sponsor-logo-horizontal-2x', array( 'alt' => get_the_title() ) ); ?> |
1141 | 1152 | </a> |
1142 | 1153 | <?php else : ?> |
1143 | | <?php the_post_thumbnail( 'wcb-sponsor-logo-horizontal-2x' ); ?> |
| 1154 | <?php the_post_thumbnail( 'wcb-sponsor-logo-horizontal-2x', array( 'alt' => get_the_title() ) ); ?> |
1144 | 1155 | <?php endif; ?> |
1145 | 1156 | |
1146 | | <?php the_content(); ?> |
| 1157 | <?php if ( 'full' === $attr['content'] ) : ?> |
| 1158 | <?php the_content(); ?> |
| 1159 | <?php elseif ( 'excerpt' === $attr['content'] ) : ?> |
| 1160 | <?php echo wpautop( |
| 1161 | wp_trim_words( |
| 1162 | get_the_content(), |
| 1163 | intval( $attr['excerpt_length'] ), |
| 1164 | apply_filters( 'excerpt_more', ' ' . '…' ) |
| 1165 | ) |
| 1166 | ); ?> |
| 1167 | <?php endif; ?> |
1147 | 1168 | </div> |
1148 | 1169 | </div><!-- #sponsor --> |
1149 | 1170 | <?php endwhile; ?> |