Update welcome page for 2.0
This commit is contained in:
@@ -99,10 +99,12 @@ class SP_Admin_Welcome {
|
|||||||
if ( ! empty( $_GET['sp-updated'] ) || ! empty( $_GET['sp-installed'] ) )
|
if ( ! empty( $_GET['sp-updated'] ) || ! empty( $_GET['sp-installed'] ) )
|
||||||
flush_rewrite_rules();
|
flush_rewrite_rules();
|
||||||
|
|
||||||
// Drop minor version if 0
|
// Get major version number
|
||||||
$major_version = substr( SP()->version, 0, 3 );
|
$version = explode( '.', SP()->version, 3 );
|
||||||
|
unset( $version[2] );
|
||||||
|
$display_version = implode( '.', $version );
|
||||||
?>
|
?>
|
||||||
<h2 class="sp-welcome-logo"><?php echo apply_filters( 'sportspress_logo', '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/welcome/sportspress' . ( class_exists( 'SportsPress_Pro' ) ? '-pro' : '' ) . '.png" alt="' . __( 'SportsPress', 'sportspress' ) . '">' ); ?></h2>
|
<h1 class="sp-welcome-logo"><?php echo apply_filters( 'sportspress_logo', '<img src="' . plugin_dir_url( SP_PLUGIN_FILE ) . 'assets/images/welcome/sportspress' . ( class_exists( 'SportsPress_Pro' ) ? '-pro' : '' ) . '.png" alt="' . __( 'SportsPress', 'sportspress' ) . '">' ); ?></h1>
|
||||||
|
|
||||||
<div class="sp-badge"><?php printf( __( 'Version %s', 'sportspress' ), SP()->version ); ?></div>
|
<div class="sp-badge"><?php printf( __( 'Version %s', 'sportspress' ), SP()->version ); ?></div>
|
||||||
|
|
||||||
@@ -115,7 +117,7 @@ class SP_Admin_Welcome {
|
|||||||
else
|
else
|
||||||
$message = __( 'Thanks for installing!', 'sportspress' );
|
$message = __( 'Thanks for installing!', 'sportspress' );
|
||||||
|
|
||||||
printf( __( '%s SportsPress %s has lots of refinements we think you’ll love.', 'sportspress' ), $message, $major_version );
|
printf( __( '%s SportsPress %s has lots of refinements we think you’ll love.', 'sportspress' ), $message, $display_version );
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -128,7 +130,7 @@ class SP_Admin_Welcome {
|
|||||||
|
|
||||||
<h2 class="nav-tab-wrapper">
|
<h2 class="nav-tab-wrapper">
|
||||||
<a class="nav-tab <?php if ( $_GET['page'] == 'sp-about' ) echo 'nav-tab-active'; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sp-about' ), 'index.php' ) ) ); ?>">
|
<a class="nav-tab <?php if ( $_GET['page'] == 'sp-about' ) echo 'nav-tab-active'; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sp-about' ), 'index.php' ) ) ); ?>">
|
||||||
<?php _e( 'Get Started', 'sportspress' ); ?>
|
<?php _e( 'Welcome', 'sportspress' ); ?>
|
||||||
</a><a class="nav-tab <?php if ( $_GET['page'] == 'sp-credits' ) echo 'nav-tab-active'; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sp-credits' ), 'index.php' ) ) ); ?>">
|
</a><a class="nav-tab <?php if ( $_GET['page'] == 'sp-credits' ) echo 'nav-tab-active'; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sp-credits' ), 'index.php' ) ) ); ?>">
|
||||||
<?php _e( 'Credits', 'sportspress' ); ?>
|
<?php _e( 'Credits', 'sportspress' ); ?>
|
||||||
</a><a class="nav-tab <?php if ( $_GET['page'] == 'sp-translators' ) echo 'nav-tab-active'; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sp-translators' ), 'index.php' ) ) ); ?>">
|
</a><a class="nav-tab <?php if ( $_GET['page'] == 'sp-translators' ) echo 'nav-tab-active'; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sp-translators' ), 'index.php' ) ) ); ?>">
|
||||||
@@ -171,59 +173,54 @@ class SP_Admin_Welcome {
|
|||||||
SP_Admin_Sample_Data::insert_posts();
|
SP_Admin_Sample_Data::insert_posts();
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
|
<?php if ( false !== get_option( 'sportspress_sport' ) ) { ?>
|
||||||
|
|
||||||
|
<div class="headline-feature feature-video sp-fitvids" style="background-color:#191E23;">
|
||||||
|
<iframe width="990" height="557" src="https://www.youtube.com/embed/KQyga_C5a6M?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="feature-section two-col">
|
||||||
|
<h2>Customization Improvements</h2>
|
||||||
|
<div class="col">
|
||||||
|
<img src="https://cdn-themeboy.netdna-ssl.com/wp-content/uploads/layout-designer.gif" alt=""/>
|
||||||
|
<h3>Layout Designer</h3>
|
||||||
|
<p>You can now choose to show or hide specific elements and reorder them as you like. Design your own unique layouts for event, team, player, and staff pages.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<img src="https://cdn-themeboy.netdna-ssl.com/wp-content/uploads/smart-statistics.png" alt=""/>
|
||||||
|
<h3>Smarter Statistics</h3>
|
||||||
|
<p>Offensive and defensive statistics can now be displayed separately in events and player profiles. A global visibility option lets you choose whether to show or hide each column.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<div class="changelog">
|
||||||
|
<h2>Take Control of Your Data</h2>
|
||||||
|
<div class="under-the-hood three-col">
|
||||||
|
<div class="col">
|
||||||
|
<h3>Taxonomy Ordering</h3>
|
||||||
|
<p>The order of competitions, seasons, venues, positions, and roles can now be changed by editing the slug of each term.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<h3>Career Totals</h3>
|
||||||
|
<p>Display career totals in player statistics tables. This row is added as a footer below the list of seasons.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<h3>REST API Support</h3>
|
||||||
|
<p>SportsPress now integrates with the WP REST API with custom endpoints for retrieving and updating sports data.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress', 'tab' => 'general' ), 'admin.php' ) ) ); ?>"><?php _e( 'Go to SportsPress Settings', 'sportspress' ); ?></a>
|
||||||
|
|
||||||
|
<?php } else { ?>
|
||||||
|
|
||||||
<div class="sp-feature feature-section col two-col">
|
<div class="sp-feature feature-section col two-col">
|
||||||
<div>
|
<div>
|
||||||
<?php if ( false !== get_option( 'sportspress_sport' ) ) { ?>
|
|
||||||
<h4><?php _e( 'Sport', 'sportspress' ); ?></h4>
|
|
||||||
<?php
|
|
||||||
$sport = get_option( 'sportspress_sport' );
|
|
||||||
$sport_options = SP_Admin_Sports::get_preset_options();
|
|
||||||
foreach ( $sport_options as $options ):
|
|
||||||
foreach ( $options as $slug => $name ):
|
|
||||||
if ( $sport === $slug ):
|
|
||||||
$sport = $name;
|
|
||||||
break;
|
|
||||||
endif;
|
|
||||||
endforeach;
|
|
||||||
endforeach;
|
|
||||||
echo $sport;
|
|
||||||
?>
|
|
||||||
<a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress', 'tab' => 'general' ), 'admin.php' ) ) ); ?>"><i class="dashicons dashicons-edit"></i> <?php _e( 'Change', 'sportspress' ); ?></a>
|
|
||||||
|
|
||||||
<h4><?php _e( 'Next Steps', 'sportspress' ); ?></h4>
|
|
||||||
<p><?php _e( 'We’ve assembled some links to get you started:', 'sportspress' ); ?></p>
|
|
||||||
<?php
|
|
||||||
$steps = apply_filters( 'sportspress_next_steps', array(
|
|
||||||
'teams' => array(
|
|
||||||
'link' => admin_url( add_query_arg( array( 'post_type' => 'sp_team' ), 'edit.php' ) ),
|
|
||||||
'icon' => 'sp-icon-shield',
|
|
||||||
'label' => __( 'Add New Team', 'sportspress' ),
|
|
||||||
),
|
|
||||||
'players' => array(
|
|
||||||
'link' => admin_url( add_query_arg( array( 'post_type' => 'sp_player' ), 'edit.php' ) ),
|
|
||||||
'icon' => 'sp-icon-tshirt',
|
|
||||||
'label' => __( 'Add New Player', 'sportspress' ),
|
|
||||||
),
|
|
||||||
'events' => array(
|
|
||||||
'link' => admin_url( add_query_arg( array( 'post_type' => 'sp_event' ), 'edit.php' ) ),
|
|
||||||
'icon' => 'sp-icon-calendar',
|
|
||||||
'label' => __( 'Add New Event', 'sportspress' ),
|
|
||||||
),
|
|
||||||
) );
|
|
||||||
?>
|
|
||||||
<?php if ( sizeof ( $steps ) ) { ?>
|
|
||||||
<div class="sportspress-steps">
|
|
||||||
<ul>
|
|
||||||
<?php foreach ( $steps as $step ) { ?>
|
|
||||||
<li><a href="<?php echo esc_url( $step['link'] ); ?>" class="welcome-icon sp-welcome-icon"><i class="<?php echo sp_array_value( $step, 'icon' ); ?>"></i> <?php echo $step['label']; ?></a></li>
|
|
||||||
<?php } ?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<h4><?php _e( 'Settings', 'sportspress' ); ?></h4>
|
|
||||||
<a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'sportspress', 'tab' => 'general' ), 'admin.php' ) ) ); ?>"><?php _e( 'Go to SportsPress Settings', 'sportspress' ); ?></a>
|
|
||||||
<?php } else { ?>
|
|
||||||
<form method="post" id="mainform" action="" enctype="multipart/form-data">
|
<form method="post" id="mainform" action="" enctype="multipart/form-data">
|
||||||
<h4><?php _e( 'Basic Setup', 'sportspress' ); ?></h4>
|
<h4><?php _e( 'Basic Setup', 'sportspress' ); ?></h4>
|
||||||
<p><?php _e( 'Select your timezone and sport to get started.', 'sportspress' ); ?></p>
|
<p><?php _e( 'Select your timezone and sport to get started.', 'sportspress' ); ?></p>
|
||||||
@@ -282,7 +279,6 @@ class SP_Admin_Welcome {
|
|||||||
<?php wp_nonce_field( 'sportspress-settings' ); ?>
|
<?php wp_nonce_field( 'sportspress-settings' ); ?>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
<?php } ?>
|
|
||||||
</div>
|
</div>
|
||||||
<?php if ( current_user_can( 'install_themes' ) && ! current_theme_supports( 'sportspress' ) ) { ?>
|
<?php if ( current_user_can( 'install_themes' ) && ! current_theme_supports( 'sportspress' ) ) { ?>
|
||||||
<div class="last-feature">
|
<div class="last-feature">
|
||||||
@@ -296,6 +292,9 @@ class SP_Admin_Welcome {
|
|||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user