Update default colour scheme
This commit is contained in:
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
* Handles taxonomies in admin
|
* Handles taxonomies in admin
|
||||||
*
|
*
|
||||||
* @class SP_Admin_Taxonomies
|
* @class SP_Admin_Taxonomies
|
||||||
* @version 2.1.0
|
* @version 0.7
|
||||||
* @package SportsPress/Admin
|
* @package SportsPress/Admin
|
||||||
* @category Class
|
* @category Class
|
||||||
* @author ThemeBoy
|
* @author ThemeBoy
|
||||||
|
|||||||
@@ -181,10 +181,10 @@ class SP_Settings_General extends SP_Settings_Page {
|
|||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
if ( empty( $colors['primary'] ) ) $colors['primary'] = '#00a69c';
|
if ( empty( $colors['primary'] ) ) $colors['primary'] = '#00a69c';
|
||||||
if ( empty( $colors['heading'] ) ) $colors['heading'] = '#ffffff';
|
if ( empty( $colors['heading'] ) ) $colors['heading'] = '#404041';
|
||||||
if ( empty( $colors['text'] ) ) $colors['text'] = '#ffffff';
|
if ( empty( $colors['text'] ) ) $colors['text'] = '#ffffff';
|
||||||
if ( empty( $colors['background'] ) ) $colors['background'] = '#3a3a3a';
|
if ( empty( $colors['background'] ) ) $colors['background'] = '#39393a';
|
||||||
if ( empty( $colors['alternate'] ) ) $colors['alternate'] = '#494949';
|
if ( empty( $colors['alternate'] ) ) $colors['alternate'] = '#404041';
|
||||||
|
|
||||||
// Show inputs
|
// Show inputs
|
||||||
$this->color_picker( __( 'Primary', 'sportspress' ), 'sportspress_frontend_css_primary', $colors['primary'] );
|
$this->color_picker( __( 'Primary', 'sportspress' ), 'sportspress_frontend_css_primary', $colors['primary'] );
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Handle frontend forms
|
* Handle frontend forms
|
||||||
*
|
*
|
||||||
* @class SP_Frontend_Scripts
|
* @class SP_Frontend_Scripts
|
||||||
* @version 2.1.0
|
* @version 0.7
|
||||||
* @package SportsPress/Classes/
|
* @package SportsPress/Classes/
|
||||||
* @category Class
|
* @category Class
|
||||||
* @author ThemeBoy
|
* @author ThemeBoy
|
||||||
@@ -67,9 +67,9 @@ class SP_Frontend_Scripts {
|
|||||||
|
|
||||||
$colors = get_option( 'sportspress_frontend_css_colors' );
|
$colors = get_option( 'sportspress_frontend_css_colors' );
|
||||||
|
|
||||||
if ( sizeof( $colors ) > 0 ) {
|
echo '<style type="text/css">.sp-data-table a,.sp-calendar a{text-decoration:none;}.sp-data-table tbody a,.sp-data-table tbody a:hover,.sp-calendar tbody a,.sp-calendar tbody a:hover{background:none;}';
|
||||||
|
|
||||||
echo '<style type="text/css">';
|
if ( sizeof( $colors ) > 0 ) {
|
||||||
|
|
||||||
if ( isset( $colors['primary'] ) )
|
if ( isset( $colors['primary'] ) )
|
||||||
echo '.sp-data-table th,.sp-calendar th,.sp-data-table tfoot,.sp-calendar tfoot{background:' . $colors['primary'] . ' !important}.sp-data-table tbody a,.sp-calendar tbody a{color:' . $colors['primary'] . ' !important}';
|
echo '.sp-data-table th,.sp-calendar th,.sp-data-table tfoot,.sp-calendar tfoot{background:' . $colors['primary'] . ' !important}.sp-data-table tbody a,.sp-calendar tbody a{color:' . $colors['primary'] . ' !important}';
|
||||||
@@ -85,11 +85,11 @@ class SP_Frontend_Scripts {
|
|||||||
|
|
||||||
if ( isset( $colors['alternate'] ) )
|
if ( isset( $colors['alternate'] ) )
|
||||||
echo '.sp-data-table tbody tr.odd,.sp-data-table tbody tr.alternate,.sp-calendar tbody td#today{background: ' . $colors['alternate'] . ' !important}';
|
echo '.sp-data-table tbody tr.odd,.sp-data-table tbody tr.alternate,.sp-calendar tbody td#today{background: ' . $colors['alternate'] . ' !important}';
|
||||||
|
}
|
||||||
|
|
||||||
echo '</style>';
|
echo '</style>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
new SP_Frontend_Scripts();
|
new SP_Frontend_Scripts();
|
||||||
@@ -71,10 +71,7 @@ class SP_Install {
|
|||||||
// Update button
|
// Update button
|
||||||
} elseif ( ! empty( $_GET['do_update_sportspress'] ) ) {
|
} elseif ( ! empty( $_GET['do_update_sportspress'] ) ) {
|
||||||
|
|
||||||
$this->update();
|
|
||||||
|
|
||||||
// Update complete
|
// Update complete
|
||||||
delete_option( '_sp_needs_pages' );
|
|
||||||
delete_option( '_sp_needs_update' );
|
delete_option( '_sp_needs_update' );
|
||||||
delete_transient( '_sp_activation_redirect' );
|
delete_transient( '_sp_activation_redirect' );
|
||||||
|
|
||||||
@@ -98,13 +95,6 @@ class SP_Install {
|
|||||||
|
|
||||||
// Queue upgrades
|
// Queue upgrades
|
||||||
$current_version = get_option( 'sportspress_version', null );
|
$current_version = get_option( 'sportspress_version', null );
|
||||||
$current_db_version = get_option( 'sportspress_db_version', null );
|
|
||||||
|
|
||||||
if ( version_compare( $current_db_version, '2.1.0', '<' ) && null !== $current_db_version ) {
|
|
||||||
update_option( '_sp_needs_update', 1 );
|
|
||||||
} else {
|
|
||||||
update_option( 'sportspress_db_version', SP()->version );
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update version
|
// Update version
|
||||||
update_option( 'sportspress_version', SP()->version );
|
update_option( 'sportspress_version', SP()->version );
|
||||||
@@ -116,49 +106,6 @@ class SP_Install {
|
|||||||
set_transient( '_sp_activation_redirect', 1, 60 * 60 );
|
set_transient( '_sp_activation_redirect', 1, 60 * 60 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle updates
|
|
||||||
*/
|
|
||||||
public function update() {
|
|
||||||
// Do updates
|
|
||||||
$current_db_version = get_option( 'sportspress_db_version' );
|
|
||||||
|
|
||||||
if ( version_compare( $current_db_version, '1.4', '<' ) ) {
|
|
||||||
include( 'updates/sportspress-update-1.4.php' );
|
|
||||||
update_option( 'sportspress_db_version', '1.4' );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( version_compare( $current_db_version, '1.5', '<' ) ) {
|
|
||||||
include( 'updates/sportspress-update-1.5.php' );
|
|
||||||
update_option( 'sportspress_db_version', '1.5' );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( version_compare( $current_db_version, '2.0', '<' ) ) {
|
|
||||||
include( 'updates/sportspress-update-2.0.php' );
|
|
||||||
update_option( 'sportspress_db_version', '2.0' );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( version_compare( $current_db_version, '2.0.9', '<' ) ) {
|
|
||||||
include( 'updates/sportspress-update-2.0.9.php' );
|
|
||||||
update_option( 'sportspress_db_version', '2.0.9' );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( version_compare( $current_db_version, '2.0.14', '<' ) ) {
|
|
||||||
if ( 'HU' == get_option( 'sportspress_default_country' ) ) {
|
|
||||||
update_option( 'sportspress_default_country', 'HU:BU' );
|
|
||||||
}
|
|
||||||
|
|
||||||
update_option( 'sportspress_db_version', '2.0.14' );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( version_compare( $current_db_version, '2.1.0', '<' ) || SP_VERSION == '2.1-bleeding' ) {
|
|
||||||
include( 'updates/sportspress-update-2.1.php' );
|
|
||||||
update_option( 'sportspress_db_version', '2.1.0' );
|
|
||||||
}
|
|
||||||
|
|
||||||
update_option( 'sportspress_db_version', SP()->version );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default options
|
* Default options
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ foreach( $teams as $key => $team_id ):
|
|||||||
|
|
||||||
// Get results for players in the team
|
// Get results for players in the team
|
||||||
$players = sportspress_array_between( (array)get_post_meta( $id, 'sp_player', false ), 0, $key );
|
$players = sportspress_array_between( (array)get_post_meta( $id, 'sp_player', false ), 0, $key );
|
||||||
|
|
||||||
|
if ( sizeof( $players ) <= 1 ) continue;
|
||||||
|
|
||||||
$data = sportspress_array_combine( $players, sportspress_array_value( $stats, $team_id, array() ) );
|
$data = sportspress_array_combine( $players, sportspress_array_value( $stats, $team_id, array() ) );
|
||||||
|
|
||||||
$output .= '<h3>' . get_the_title( $team_id ) . '</h3>';
|
$output .= '<h3>' . get_the_title( $team_id ) . '</h3>';
|
||||||
|
|||||||
Reference in New Issue
Block a user