Check for video module only once
This commit is contained in:
@@ -189,7 +189,7 @@ class SP_Meta_Box_Calendar_Data {
|
|||||||
<td><?php the_terms( $event->ID, 'sp_venue' ); ?></td>
|
<td><?php the_terms( $event->ID, 'sp_venue' ); ?></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="<?php echo get_edit_post_link( $event->ID ); ?>#sp_articlediv">
|
<a href="<?php echo get_edit_post_link( $event->ID ); ?>#sp_articlediv">
|
||||||
<?php if ( $video && 'yes' == get_option( 'sportspress_load_videos_module', 'yes' ) ): ?>
|
<?php if ( $video ): ?>
|
||||||
<div class="dashicons dashicons-video-alt"></div>
|
<div class="dashicons dashicons-video-alt"></div>
|
||||||
<?php elseif ( has_post_thumbnail( $event->ID ) ): ?>
|
<?php elseif ( has_post_thumbnail( $event->ID ) ): ?>
|
||||||
<div class="dashicons dashicons-camera"></div>
|
<div class="dashicons dashicons-camera"></div>
|
||||||
|
|||||||
@@ -33,9 +33,7 @@ add_action( 'get_the_generator_xhtml', 'sp_generator_tag', 10, 2 );
|
|||||||
*/
|
*/
|
||||||
add_action( 'sportspress_single_event_content', 'sportspress_output_event_logos', 0 );
|
add_action( 'sportspress_single_event_content', 'sportspress_output_event_logos', 0 );
|
||||||
add_action( 'sportspress_single_event_content', 'sportspress_output_event_results', 20 );
|
add_action( 'sportspress_single_event_content', 'sportspress_output_event_results', 20 );
|
||||||
if ( 'yes' == get_option( 'sportspress_load_videos_module', 'yes' ) ) {
|
add_action( 'sportspress_single_event_content', 'sportspress_output_event_video', 10 );
|
||||||
add_action( 'sportspress_single_event_content', 'sportspress_output_event_video', 10 );
|
|
||||||
}
|
|
||||||
add_action( 'sportspress_single_event_content', 'sportspress_output_event_details', 30 );
|
add_action( 'sportspress_single_event_content', 'sportspress_output_event_details', 30 );
|
||||||
add_action( 'sportspress_single_event_content', 'sportspress_output_event_venue', 40 );
|
add_action( 'sportspress_single_event_content', 'sportspress_output_event_venue', 40 );
|
||||||
add_action( 'sportspress_single_event_content', 'sportspress_output_event_performance', 50 );
|
add_action( 'sportspress_single_event_content', 'sportspress_output_event_performance', 50 );
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ if ( $id ) {
|
|||||||
echo '<td class="data-article">';
|
echo '<td class="data-article">';
|
||||||
if ( $link_events ) echo '<a href="' . get_permalink( $event->ID ) . '">';
|
if ( $link_events ) echo '<a href="' . get_permalink( $event->ID ) . '">';
|
||||||
|
|
||||||
if ( $video && 'yes' == get_option( 'sportspress_load_videos_module', 'yes' ) ):
|
if ( $video ):
|
||||||
echo '<div class="dashicons dashicons-video-alt"></div>';
|
echo '<div class="dashicons dashicons-video-alt"></div>';
|
||||||
elseif ( has_post_thumbnail( $event->ID ) ):
|
elseif ( has_post_thumbnail( $event->ID ) ):
|
||||||
echo '<div class="dashicons dashicons-camera"></div>';
|
echo '<div class="dashicons dashicons-camera"></div>';
|
||||||
|
|||||||
Reference in New Issue
Block a user