Add div wrappers to templates
This commit is contained in:
@@ -28,7 +28,8 @@ extract( $defaults, EXTR_SKIP );
|
||||
|
||||
if ( ! isset( $post ) ) return;
|
||||
?>
|
||||
<div id="sp-countdown-wrapper">
|
||||
<div class="sp-template sp-template-countdown">
|
||||
<div id="sp-countdown-wrapper">
|
||||
<h3 class="event-name"><a href="<?php echo get_permalink( $post->ID ); ?>"><?php echo $post->post_title; ?></a></h3>
|
||||
<?php
|
||||
if ( isset( $show_venue ) && $show_venue ):
|
||||
@@ -67,4 +68,5 @@ if ( ! isset( $post ) ) return;
|
||||
<span><?php echo sprintf( '%02s', $i ); ?> <small><?php _e( 'mins', 'sportspress' ); ?></small></span>
|
||||
<span><?php echo sprintf( '%02s', $s ); ?> <small><?php _e( 'secs', 'sportspress' ); ?></small></span>
|
||||
</time></p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,7 +37,8 @@ $usecolumns = $calendar->columns;
|
||||
if ( isset( $columns ) )
|
||||
$usecolumns = $columns;
|
||||
?>
|
||||
<div class="sp-table-wrapper">
|
||||
<div class="sp-template sp-template-event-blocks">
|
||||
<div class="sp-table-wrapper">
|
||||
<table class="sp-event-blocks sp-data-table<?php if ( $paginated ) { ?> sp-paginated-table<?php } ?>" data-sp-rows="<?php echo $rows; ?>">
|
||||
<thead><tr><th></th></tr></thead> <?php # Required for DataTables ?>
|
||||
<tbody>
|
||||
@@ -102,6 +103,7 @@ if ( isset( $columns ) )
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ( $id && $show_all_events_link )
|
||||
|
||||
@@ -209,5 +209,7 @@ $calendar_output .= "\n\t</tr>\n\t</tbody>\n\t</table>\n\t</div>";
|
||||
|
||||
if ( $id && $show_all_events_link )
|
||||
$calendar_output .= '<a class="sp-calendar-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . __( 'View all events', 'sportspress' ) . '</a>';
|
||||
|
||||
echo apply_filters( 'sportspress_event_calendar', $calendar_output );
|
||||
?>
|
||||
<div class="sp-template sp-template-event-calendar">
|
||||
<?php echo $calendar_output; ?>
|
||||
</div>
|
||||
|
||||
@@ -30,8 +30,9 @@ if ( $seasons ):
|
||||
$data[ __( 'Season', 'sportspress' ) ] = $season->name;
|
||||
endif;
|
||||
?>
|
||||
<h4 class="sp-table-caption"><?php _e( 'Details', 'sportspress' ); ?></h4>
|
||||
<div class="sp-table-wrapper<?php if ( $scrollable ) { ?> sp-scrollable-table-wrapper<?php } ?>">
|
||||
<div class="sp-template sp-template-event-details">
|
||||
<h4 class="sp-table-caption"><?php _e( 'Details', 'sportspress' ); ?></h4>
|
||||
<div class="sp-table-wrapper<?php if ( $scrollable ) { ?> sp-scrollable-table-wrapper<?php } ?>">
|
||||
<table class="sp-event-details sp-data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -48,4 +49,5 @@ endif;
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -47,7 +47,8 @@ if ( isset( $columns ) ):
|
||||
$usecolumns = explode( ',', $columns );
|
||||
endif;
|
||||
?>
|
||||
<div class="sp-table-wrapper<?php if ( $scrollable ) { ?> sp-scrollable-table-wrapper<?php } ?>">
|
||||
<div class="sp-template sp-template-event-list">
|
||||
<div class="sp-table-wrapper<?php if ( $scrollable ) { ?> sp-scrollable-table-wrapper<?php } ?>">
|
||||
<table class="sp-event-list sp-data-table<?php if ( $responsive ) { ?> sp-responsive-table<?php } if ( $paginated ) { ?> sp-paginated-table<?php } ?>" data-sp-rows="<?php echo $rows; ?>">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -187,6 +188,7 @@ endif;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ( $id && $show_all_events_link )
|
||||
|
||||
@@ -59,6 +59,7 @@ if ( is_array( $teams ) ):
|
||||
$data = sp_array_combine( $players, sp_array_value( $performance, $team_id, array() ) );
|
||||
|
||||
?>
|
||||
<div class="sp-template sp-template-event-performance">
|
||||
<h4 class="sp-table-caption"><?php echo get_the_title( $team_id ); ?></h4>
|
||||
<?php
|
||||
if ( get_option( 'sportspress_event_show_staff', 'yes' ) == 'yes' ):
|
||||
@@ -212,6 +213,7 @@ if ( is_array( $teams ) ):
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
|
||||
@@ -100,5 +100,7 @@ else:
|
||||
$output .= '</tbody>' . '</table>' . '</div>';
|
||||
|
||||
endif;
|
||||
|
||||
echo $output;
|
||||
?>
|
||||
<div class="sp-template sp-template-event-results">
|
||||
<?php echo $output; ?>
|
||||
</div>
|
||||
|
||||
@@ -32,6 +32,7 @@ foreach( $venues as $venue ):
|
||||
$latitude = sp_array_value( $meta, 'sp_latitude', 0 );
|
||||
$longitude = sp_array_value( $meta, 'sp_longitude', 0 );
|
||||
?>
|
||||
<div class="sp-template sp-template-event-venue">
|
||||
<h4 class="sp-table-caption"><?php _e( 'Venue', 'sportspress' ); ?></h4>
|
||||
<table class="sp-data-table sp-event-venue">
|
||||
<thead>
|
||||
@@ -52,5 +53,6 @@ foreach( $venues as $venue ):
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
|
||||
@@ -14,6 +14,12 @@ if ( ! isset( $id ) )
|
||||
|
||||
$video_url = get_post_meta( $id, 'sp_video', true );
|
||||
if ( $video_url ):
|
||||
?>
|
||||
<div class="sp-event-video">
|
||||
<?php
|
||||
global $wp_embed;
|
||||
echo $wp_embed->autoembed( $video_url );
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
@@ -153,4 +153,7 @@ $output .= '</div>';
|
||||
if ( $show_full_table_link )
|
||||
$output .= '<a class="sp-league-table-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . __( 'View full table', 'sportspress' ) . '</a>';
|
||||
|
||||
echo $output;
|
||||
?>
|
||||
<div class="sp-template sp-template-league-table">
|
||||
<?php echo $output; ?>
|
||||
</div>
|
||||
@@ -63,5 +63,5 @@ foreach( $data as $label => $value ):
|
||||
endforeach;
|
||||
|
||||
$output .= '</dl></div>';
|
||||
|
||||
echo apply_filters( 'sportspress_player_details', $output );
|
||||
?>
|
||||
<?php echo $output; ?>
|
||||
@@ -91,22 +91,25 @@ if ( apply_filters( 'use_default_gallery_style', true ) )
|
||||
</style>";
|
||||
$size_class = sanitize_html_class( $size );
|
||||
$gallery_div = "<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>";
|
||||
echo apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div );
|
||||
|
||||
if ( intval( $number ) > 0 )
|
||||
echo apply_filters( 'gallery_style', $gallery_style . "\n\t\t" );
|
||||
?>
|
||||
<div class="sp-template sp-template-player-gallery">
|
||||
<?php echo $gallery_div; ?>
|
||||
<?php
|
||||
if ( intval( $number ) > 0 )
|
||||
$limit = $number;
|
||||
|
||||
if ( $grouping === 'position' ):
|
||||
if ( $grouping === 'position' ):
|
||||
$groups = get_terms( 'sp_position', array( 'orderby' => 'slug' ) );
|
||||
else:
|
||||
else:
|
||||
$group = new stdClass();
|
||||
$group->term_id = null;
|
||||
$group->name = null;
|
||||
$group->slug = null;
|
||||
$groups = array( $group );
|
||||
endif;
|
||||
endif;
|
||||
|
||||
foreach ( $groups as $group ):
|
||||
foreach ( $groups as $group ):
|
||||
$i = 0;
|
||||
|
||||
if ( ! empty( $group->name ) ):
|
||||
@@ -138,9 +141,11 @@ foreach ( $groups as $group ):
|
||||
|
||||
echo '<br style="clear: both;" />';
|
||||
|
||||
endforeach;
|
||||
endforeach;
|
||||
|
||||
echo "</div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
if ( $show_all_players_link )
|
||||
if ( $show_all_players_link )
|
||||
echo '<a class="sp-player-list-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . __( 'View all players', 'sportspress' ) . '</a>';
|
||||
?>
|
||||
</div>
|
||||
@@ -162,5 +162,7 @@ endforeach;
|
||||
|
||||
if ( $show_all_players_link )
|
||||
$output .= '<a class="sp-player-list-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . __( 'View all players', 'sportspress' ) . '</a>';
|
||||
|
||||
echo apply_filters( 'sportspress_player_list', $output );
|
||||
?>
|
||||
<div class="sp-template sp-template-player-list">
|
||||
<?php echo $output; ?>
|
||||
</div>
|
||||
@@ -60,7 +60,10 @@ if ( is_array( $leagues ) ):
|
||||
endforeach;
|
||||
|
||||
$output .= '</tbody>' . '</table>' . '</div>';
|
||||
|
||||
echo apply_filters( 'sportspress_player_statistics', $output );
|
||||
?>
|
||||
<div class="sp-template sp-template-player-statistics">
|
||||
<?php echo $output; ?>
|
||||
</div>
|
||||
<?php
|
||||
endforeach;
|
||||
endif;
|
||||
|
||||
@@ -53,5 +53,7 @@ foreach( $data as $label => $value ):
|
||||
endforeach;
|
||||
|
||||
$output .= '</dl></div>';
|
||||
|
||||
echo apply_filters( 'sportspress_staff_details', $output );
|
||||
?>
|
||||
<div class="sp-template sp-template-staff-details">
|
||||
<?php echo $output; ?>
|
||||
</div>
|
||||
@@ -67,4 +67,7 @@ foreach ( $leagues as $league ):
|
||||
|
||||
endforeach;
|
||||
|
||||
echo apply_filters( 'sportspress_team_columns', $output );
|
||||
?>
|
||||
<div class="sp-template sp-template-team-columns">
|
||||
<?php echo $output; ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user