Skip to content

Commit

Permalink
Remove automatic adding of theme options to database
Browse files Browse the repository at this point in the history
See #110
  • Loading branch information
middlesister committed Jul 26, 2014
1 parent deebd99 commit 8f085d9
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions library/extensions/theme-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,13 @@ function thematic_opt_init() {
$current_options = thematic_get_wp_opt('thematic_theme_opt');
$legacy_options = thematic_convert_legacy_opt();

// If no current settings exist
if ( false === $current_options ) {
// Check for legacy options
if ( false !== ( $legacy_options ) ) {
// Theme upgrade: Convert legacy to current format and add to database
add_option( 'thematic_theme_opt', $legacy_options );
} else {
// Fresh theme installation: Add default settings to database
add_option( 'thematic_theme_opt', thematic_default_opt() );
}

// Check for pre-1.0 options
if ( false !== ( $legacy_options ) ) {
// Theme upgrade: Convert legacy to current format and add to database
add_option( 'thematic_theme_opt', $legacy_options );
}


// If we are missing a 2.0 option, this is an upgrade from previous version
if ( !isset( $current_options['layout'] ) && isset( $current_options['footer_txt'] ) ) {
Expand Down

0 comments on commit 8f085d9

Please sign in to comment.