Change player columns setting to manual if upgrading from previous version
This commit is contained in:
@@ -88,6 +88,9 @@ class SP_Install {
|
||||
// Queue upgrades
|
||||
$current_version = get_option( 'sportspress_version', null );
|
||||
|
||||
// Do upgrades
|
||||
$this->upgrades( $current_version );
|
||||
|
||||
// Update version
|
||||
update_option( 'sportspress_version', SP()->version );
|
||||
|
||||
@@ -400,6 +403,20 @@ class SP_Install {
|
||||
endif;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make adjustments based on current version of the plugin
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function upgrades( $version = null ) {
|
||||
if ( null === $version ) return;
|
||||
|
||||
if ( version_compare( $version, '2.0', '<' ) ) {
|
||||
update_option( 'sportspress_player_columns', 'manual' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get capabilities for SportsPress - these are assigned during installation or reset
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user