Advanced video tutorials tab
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
Plugin Name: SportsPress: Tutorials
|
Plugin Name: SportsPress Tutorials
|
||||||
Plugin URI: http://themeboy.com/
|
Plugin URI: http://themeboy.com/
|
||||||
Description: Display SportsPress video tutorials.
|
Description: Display SportsPress video tutorials.
|
||||||
Author: ThemeBoy
|
Author: ThemeBoy
|
||||||
@@ -57,7 +57,8 @@ class SportsPress_Tutorials {
|
|||||||
* Get video IDs.
|
* Get video IDs.
|
||||||
*/
|
*/
|
||||||
public function get_video_ids() {
|
public function get_video_ids() {
|
||||||
$this->ids = apply_filters( 'sportspress_tutorial_videos', array(
|
$this->ids = apply_filters( 'sportspress_videos', array(
|
||||||
|
'tutorials' => apply_filters( 'sportspress_tutorial_videos', array(
|
||||||
__( 'Get Started', 'sportspress' ) => apply_filters( 'sportspress_get_started_tutorial_videos', array(
|
__( 'Get Started', 'sportspress' ) => apply_filters( 'sportspress_get_started_tutorial_videos', array(
|
||||||
__( 'Installation', 'sportspress' ) => '//www.youtube-nocookie.com/embed/nE8-RlbotmU?rel=0&showinfo=0',
|
__( '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',
|
__( 'Competitions', 'sportspress' ) . ' & ' . __( 'Seasons', 'sportspress' ) => '//www.youtube-nocookie.com/embed/XAf2EsDrf8M?rel=0&showinfo=0',
|
||||||
@@ -81,6 +82,36 @@ class SportsPress_Tutorials {
|
|||||||
__( 'Edit Event', 'sportspress' ) => '//www.youtube-nocookie.com/embed/nL0ObdPMyBM?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',
|
__( 'Calendars', 'sportspress' ) => '//www.youtube-nocookie.com/embed/NIHBKMMqN0s?rel=0&showinfo=0',
|
||||||
) ),
|
) ),
|
||||||
|
) ),
|
||||||
|
'advanced' => apply_filters( 'sportspress_advanced_videos', array(
|
||||||
|
__( 'Settings', 'sportspress' ) => apply_filters( 'sportspress_settings_advanced_videos', array(
|
||||||
|
__( 'Text', 'sportspress' ) => '//www.youtube-nocookie.com/embed/qEucgVVsDcE?rel=0&showinfo=0',
|
||||||
|
__( 'Permalinks', 'sportspress' ) => '//www.youtube-nocookie.com/embed/QuHmsdVyjU8?rel=0&showinfo=0',
|
||||||
|
) ),
|
||||||
|
__( 'Events', 'sportspress' ) => apply_filters( 'sportspress_event_advanced_videos', array(
|
||||||
|
__( 'Event Outcomes', 'sportspress' ) . ' ' . __( '(Auto)', 'sportspress' ) => '//www.youtube-nocookie.com/embed/pCVfPv2O5yY?rel=0&showinfo=0',
|
||||||
|
__( 'Box Score', 'sportspress' ) => '//www.youtube-nocookie.com/embed/rERU6X7vjTc?rel=0&showinfo=0',
|
||||||
|
) ),
|
||||||
|
__( 'Calendars', 'sportspress' ) => apply_filters( 'sportspress_calendar_advanced_videos', array(
|
||||||
|
__( 'Layout', 'sportspress' ) => '//www.youtube-nocookie.com/embed/aLx_5D0Xgnc?rel=0&showinfo=0',
|
||||||
|
) ),
|
||||||
|
__( 'Teams', 'sportspress' ) => apply_filters( 'sportspress_team_advanced_videos', array(
|
||||||
|
__( 'Logo', 'sportspress' ) => '//www.youtube-nocookie.com/embed/tLJZKB0fnXw?rel=0&showinfo=0',
|
||||||
|
__( 'Adjustments', 'sportspress' ) => '//www.youtube-nocookie.com/embed/VJkhn9Or0jA?rel=0&showinfo=0',
|
||||||
|
__( 'Highlight', 'sportspress' ) => '//www.youtube-nocookie.com/embed/1rKRmRzVWoU?rel=0&showinfo=0',
|
||||||
|
) ),
|
||||||
|
__( 'Players', 'sportspress' ) => apply_filters( 'sportspress_player_advanced_videos', array(
|
||||||
|
__( 'Player Metrics', 'sportspress' ) => '//www.youtube-nocookie.com/embed/dGXYgi8esPc?rel=0&showinfo=0',
|
||||||
|
__( 'Player Ranking', 'sportspress' ) => '//www.youtube-nocookie.com/embed/xAQRZf7VOTg?rel=0&showinfo=0',
|
||||||
|
) ),
|
||||||
|
__( 'Other', 'sportspress' ) => apply_filters( 'sportspress_other_advanced_videos', array(
|
||||||
|
__( 'Demo Content', 'sportspress' ) => '//www.youtube-nocookie.com/embed/sARiHQJqSBw?rel=0&showinfo=0',
|
||||||
|
__( 'Overview', 'sportspress' ) => '//www.youtube-nocookie.com/embed/osXGpBJDMpY?rel=0&showinfo=0',
|
||||||
|
__( 'User Roles', 'sportspress' ) => '//www.youtube-nocookie.com/embed/UancX-33NE4?rel=0&showinfo=0',
|
||||||
|
__( 'Shortcodes', 'sportspress' ) => '//www.youtube-nocookie.com/embed/czrhafIcLaM?rel=0&showinfo=0',
|
||||||
|
__( 'Page not found', 'sportspress' ) => '//www.youtube-nocookie.com/embed/2rss9qfMubw?rel=0&showinfo=0',
|
||||||
|
) ),
|
||||||
|
) ),
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,14 +126,23 @@ class SportsPress_Tutorials {
|
|||||||
* Init the tutorials page
|
* Init the tutorials page
|
||||||
*/
|
*/
|
||||||
public function tutorials_page() {
|
public function tutorials_page() {
|
||||||
|
$tabs = apply_filters( 'sportspress_tutorial_tabs', array(
|
||||||
|
'tutorials' => __( 'Tutorials', 'sportspress' ),
|
||||||
|
'advanced' => __( 'Advanced', 'sportspress' ),
|
||||||
|
) );
|
||||||
|
if ( isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $tabs ) ) {
|
||||||
|
$current_tab = $_GET['tab'];
|
||||||
|
} else {
|
||||||
|
$current_tab = key( $tabs );
|
||||||
|
}
|
||||||
$i = 0;
|
$i = 0;
|
||||||
?>
|
?>
|
||||||
<div class="wrap sportspress sportspress-tutorials-wrap">
|
<h2 class="nav-tab-wrapper">
|
||||||
<h2>
|
<?php foreach ( $tabs as $name => $label ): ?><a href="<?php echo admin_url( 'admin.php?page=sportspress-tutorials&tab=' . $name ); ?>" class="nav-tab <?php echo ( $current_tab == $name ? 'nav-tab-active' : '' ); ?>"><?php echo $label; ?></a><?php endforeach; ?>
|
||||||
<?php _e( 'Tutorials', 'sportspress' ); ?>
|
|
||||||
</h2>
|
</h2>
|
||||||
|
<div class="wrap sportspress sportspress-tutorials-wrap">
|
||||||
<div class="sp-tutorials-main">
|
<div class="sp-tutorials-main">
|
||||||
<?php foreach ( $this->ids as $section => $urls ) { ?>
|
<?php foreach ( $this->ids[$current_tab] as $section => $urls ) { ?>
|
||||||
<h3><?php echo $section; ?></h3>
|
<h3><?php echo $section; ?></h3>
|
||||||
<ul class="sp-tutorials-list">
|
<ul class="sp-tutorials-list">
|
||||||
<?php foreach ( $urls as $label => $url ) { $i++; ?>
|
<?php foreach ( $urls as $label => $url ) { $i++; ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user