diff --git a/includes/admin/class-sp-admin-notices.php b/includes/admin/class-sp-admin-notices.php index 020a0ac3..826a2cc1 100644 --- a/includes/admin/class-sp-admin-notices.php +++ b/includes/admin/class-sp-admin-notices.php @@ -40,12 +40,14 @@ class SP_Admin_Notices { $screen = get_current_screen(); $notices = get_option( 'sportspress_admin_notices', array() ); - if ( ! get_option( 'sportspress_completed_setup' ) ) { + if ( ! is_object( $screen ) ) return; + + if ( ! get_option( 'sportspress_completed_setup' ) && ! in_array( $screen->id, array( 'dashboard_page_sp-about', 'dashboard_page_sp-credits', 'dashboard_page_sp-translators' ) ) ) { wp_enqueue_style( 'sportspress-activation', plugins_url( '/assets/css/activation.css', SP_PLUGIN_FILE ) ); add_action( 'admin_notices', array( $this, 'setup_notice' ) ); } - if ( is_object( $screen ) && 'post' == $screen->base ) { + if ( 'post' == $screen->base ) { $post_id = get_the_ID(); if ( ! apply_filters( 'sportspress_user_can', current_user_can( 'edit_post', $post_id ), $post_id ) ) { add_action( 'admin_notices', array( $this, 'no_access_notice' ) ); @@ -62,7 +64,7 @@ class SP_Admin_Notices { update_option( 'sportspress_admin_notices', $notices ); } - if ( is_object( $screen ) && in_array( 'theme_support', $notices ) && ! current_theme_supports( 'sportspress' ) && ! in_array( $screen->id, array( 'toplevel_page_sportspress', 'dashboard_page_sp-about', 'dashboard_page_sp-credits', 'dashboard_page_sp-translators' ) ) ) { + if ( in_array( 'theme_support', $notices ) && ! current_theme_supports( 'sportspress' ) && ! in_array( $screen->id, array( 'toplevel_page_sportspress', 'dashboard_page_sp-about', 'dashboard_page_sp-credits', 'dashboard_page_sp-translators' ) ) ) { $template = get_option( 'template' ); if ( ! in_array( $template, array( 'twentyfifteen', 'twentyfourteen', 'twentythirteen', 'twentyeleven', 'twentytwelve', 'twentyten' ) ) ) { diff --git a/includes/admin/class-sp-admin-settings.php b/includes/admin/class-sp-admin-settings.php index 9263c446..6da7bfff 100644 --- a/includes/admin/class-sp-admin-settings.php +++ b/includes/admin/class-sp-admin-settings.php @@ -443,6 +443,8 @@ class SP_Admin_Settings { case 'sport' : $option_value = self::get_option( $value['id'], $value['default'] ); + if ( 'none' === $option_value ) $option_value = 'soccer'; + $categories = SP_Admin_Sports::sport_category_names(); ?> diff --git a/includes/admin/class-sp-admin-setup-wizard.php b/includes/admin/class-sp-admin-setup-wizard.php index ce6943b4..ab486676 100644 --- a/includes/admin/class-sp-admin-setup-wizard.php +++ b/includes/admin/class-sp-admin-setup-wizard.php @@ -28,8 +28,7 @@ class WC_Admin_Setup_Wizard { /** @var array Tweets user can optionally send after install */ private $tweets = array( - 'Someone give me woo-t, I just set up a new store with #WordPress and @SportsPress!', - 'Someone give me high five, I just set up a new store with #WordPress and @SportsPress!' + 'Someone give me high five, I just set up a new sports data website with #WordPress and @SportsPress!' ); /** @@ -155,7 +154,7 @@ class WC_Admin_Setup_Wizard { public function setup_wizard_footer() { ?> step ) : ?> - + @@ -203,7 +202,7 @@ class WC_Admin_Setup_Wizard {

- +

- - - - - 'sportspress_sport', - 'default' => get_option( 'sportspress_sport', 'soccer' ), - 'type' => 'sport', - 'title' => __( 'Sport', 'sportspress' ), - 'welcome' => true, - 'class' => $class, - 'options' => $sport_options, - ), - ); - SP_Admin_Settings::output_fields( $settings ); - ?> - - -

- - - -

- - - -
-

- -

-

-

- -

-
- - - +
+

More Advanced Statistics

+
+ Chronological Streaks +

Chronological Streaks

+

A new Form preset variable has been added to the equation builder for table columns. Use this variable to display the most recent outcomes with each outcome linking to that event.

+
+
+ Head to Head Tiebreakers +

Head to Head Tiebreakers

+

When two or more teams are tied in the general standings, SportsPress can now automatically analyze the events between those teams to determine who comes out on top.

+
+
+ Time Format +

Time Format

+

A new Time format has been added to player performance settings. Times are saved as minutes, and displayed using time format with 0:00 as the default.

+
+
+ +
+ +
+

Bulk Actions

+
+ Generate Team Calendars +

Generate Team Calendars

+

Bulk actions has been added to instantly generate team calendars. Simply select the checkboxes next to each team, then choose Generate Calendars from the Bulk Actions dropdown and voilà!

+
+
+ Assign Teams to Players +

Assign Teams to Players

+

Quickly add players to teams using the Bulk Edit feature. New sections have been added to select the current teams and past teams for multiple players at once.

+
+
+ +
+ +
+

Admin Improvements

+
+
+

Player List Limits

+

A limit option has been added to player lists when automatically adding players, enabling speedier queries.

+
+
+

Mixed Statistic Columns

+

The order of player performance and statistics can now be mixed together by editing the order of each variable.

+
+
+

Explicit Team URL Redirect

+

Decide whether to use native team pages or to redirect teams to their external URLs using the new Redirect option.

+
+
+ +
+
+

Quick Edit Players

+

In addition to editing the teams a player belongs to, squad numbers can also be updated via the Quick Edit menu

+
+
+

Independent Timed Option

+

Choose which values in the box score need minutes recorded, with an independent setting for each column.

+
+
+

Taxonomies in REST API

+

New endpoints have been added for taxonomies including seasons, competitions, venues, positions, and jobs.

+
+
+
+ +
+ +
+

Under the Hood

+
+
+

Variables Filtered by Offense and Defense

+

Offense and defense statistics are now calculated using only the player performance from the same category.

+
+
+

Account for Substitution Time

+

The Minutes equation variable is now automatically adjusted by subtracting substitution time.

+
+
+

Division by Zero

+

No more errors when dividing by zero. Equations with undefined solutions now simply return zero for that value.

+
+
+
+ + + + __( 'Sport', 'sportspress' ), 'id' => 'sportspress_sport', - 'default' => 'custom', + 'default' => 'none', 'type' => 'sport', 'options' => $presets, ),