Use YouTube videos for tutorials
This commit is contained in:
@@ -59,27 +59,27 @@ class SportsPress_Tutorials {
|
||||
public function get_video_ids() {
|
||||
$this->ids = apply_filters( 'sportspress_tutorial_videos', array(
|
||||
__( 'Get Started', 'sportspress' ) => apply_filters( 'sportspress_get_started_tutorial_videos', array(
|
||||
__( 'Installation', 'sportspress' ) => 'nE8-RlbotmU',
|
||||
__( 'Competitions', 'sportspress' ) . ' & ' . __( 'Seasons', 'sportspress' ) => 'XAf2EsDrf8M',
|
||||
__( 'Venues', 'sportspress' ) => 'iTZnC_7VvYk',
|
||||
__( 'Positions', 'sportspress' ) . ' & ' . __( 'Jobs', 'sportspress' ) => 'g6QKbDH05n0',
|
||||
__( 'Installation', 'sportspress' ) => '//www.youtube-nocookie.com/embed/nE8-RlbotmU?rel=0&showinfo=0',
|
||||
__( 'Competitions', 'sportspress' ) . ' & ' . __( 'Seasons', 'sportspress' ) => '//www.youtube-nocookie.com/embed/XAf2EsDrf8M?rel=0&showinfo=0',
|
||||
__( 'Venues', 'sportspress' ) => '//www.youtube-nocookie.com/embed/iTZnC_7VvYk?rel=0&showinfo=0',
|
||||
__( 'Positions', 'sportspress' ) . ' & ' . __( 'Jobs', 'sportspress' ) => '//www.youtube-nocookie.com/embed/g6QKbDH05n0?rel=0&showinfo=0',
|
||||
) ),
|
||||
__( 'Teams', 'sportspress' ) => apply_filters( 'sportspress_team_tutorial_videos', array(
|
||||
__( 'Add New Team', 'sportspress' ) => 'x8GoxaHwC9U',
|
||||
__( 'League Tables', 'sportspress' ) => '8AXh399Vstc',
|
||||
__( 'Add New Team', 'sportspress' ) => '//www.youtube-nocookie.com/embed/x8GoxaHwC9U?rel=0&showinfo=0',
|
||||
__( 'League Tables', 'sportspress' ) => '//www.youtube-nocookie.com/embed/8AXh399Vstc?rel=0&showinfo=0',
|
||||
) ),
|
||||
__( 'Players', 'sportspress' ) . ' & ' . __( 'Staff', 'sportspress' ) => array_merge(
|
||||
apply_filters( 'sportspress_player_tutorial_videos', array(
|
||||
__( 'Add New Player', 'sportspress' ) => 'wWYQNHITz-g',
|
||||
__( 'Add New Player', 'sportspress' ) => '//www.youtube-nocookie.com/embed/wWYQNHITz-g?rel=0&showinfo=0',
|
||||
) ),
|
||||
apply_filters( 'sportspress_staff_tutorial_videos', array(
|
||||
__( 'Add New Staff', 'sportspress' ) => 'cxm2S7qYSL4',
|
||||
__( 'Add New Staff', 'sportspress' ) => '//www.youtube-nocookie.com/embed/cxm2S7qYSL4?rel=0&showinfo=0',
|
||||
) )
|
||||
),
|
||||
__( 'Events', 'sportspress' ) => apply_filters( 'sportspress_event_tutorial_videos', array(
|
||||
__( 'Add New Event', 'sportspress' ) => 'UA25lgqgnSc',
|
||||
__( 'Edit Event', 'sportspress' ) => 'nL0ObdPMyBM',
|
||||
__( 'Calendars', 'sportspress' ) => 'NIHBKMMqN0s',
|
||||
__( 'Add New Event', 'sportspress' ) => '//www.youtube-nocookie.com/embed/UA25lgqgnSc?rel=0&showinfo=0',
|
||||
__( 'Edit Event', 'sportspress' ) => '//www.youtube-nocookie.com/embed/nL0ObdPMyBM?rel=0&showinfo=0',
|
||||
__( 'Calendars', 'sportspress' ) => '//www.youtube-nocookie.com/embed/NIHBKMMqN0s?rel=0&showinfo=0',
|
||||
) ),
|
||||
) );
|
||||
}
|
||||
@@ -102,24 +102,24 @@ class SportsPress_Tutorials {
|
||||
<?php _e( 'Tutorials', 'sportspress' ); ?>
|
||||
</h2>
|
||||
<div class="sp-tutorials-main">
|
||||
<?php foreach ( $this->ids as $section => $ids ) { ?>
|
||||
<?php foreach ( $this->ids as $section => $urls ) { ?>
|
||||
<h3><?php echo $section; ?></h3>
|
||||
<ul class="sp-tutorials-list">
|
||||
<?php foreach ( $ids as $label => $id ) { $i++; ?>
|
||||
<?php foreach ( $urls as $label => $url ) { $i++; ?>
|
||||
<li>
|
||||
<table class="widefat" cellspacing="0">
|
||||
<thead>
|
||||
<tr><th>
|
||||
<strong><?php echo $i; ?></strong>
|
||||
<?php echo $label; ?>
|
||||
<a href="#" class="sp-popup sp-icon-popup" title="<?php _e( 'Pop-out', 'sportspress' ); ?>" onclick="window.open('//www.youtube-nocookie.com/embed/<?php echo $id; ?>?rel=0&showinfo=0&autoplay=1', '_blank', 'width=640, height=360');return false;"></a>
|
||||
<a href="#" class="sp-popup sp-icon-popup" title="<?php _e( 'Pop-out', 'sportspress' ); ?>" onclick="window.open('<?php echo esc_url( add_query_arg( 'autoplay', 1, $url ) ); ?>', '_blank', 'width=640, height=360');return false;"></a>
|
||||
</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="sp-fitvids">
|
||||
<iframe width="320" height="180" src="//www.youtube-nocookie.com/embed/<?php echo $id; ?>?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
|
||||
<iframe width="320" height="180" src="<?php echo $url; ?>" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user