Skip to content

Commit

Permalink
Merge remote-tracking branch 'bb-upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMaz committed Jun 8, 2015
2 parents f46d254 + 4808b06 commit 7dc9aff
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/engine/ICE/components/options/policy.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,5 @@ function ice_register_option( $args, $defaults = array() )
*/
function ice_rename_options( $list )
{
ICE_Policy::options()->registry()->rename_theme_mods( $list );
return ICE_Policy::options()->registry()->rename_theme_mods( $list );
}
2 changes: 1 addition & 1 deletion src/engine/ICE/loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ final static public function init( $ice_slug, $ice_url )
// add theme activation callback
add_action( 'load-themes.php', array( __CLASS__, 'do_activated_actions' ) );
// add upgrade callback
add_action( 'ice_theme_activated', array( __CLASS__, 'upgrade' ), 1 );
add_action( 'admin_init', array( __CLASS__, 'upgrade' ), 1 );
}
}
}
Expand Down
8 changes: 3 additions & 5 deletions src/engine/ICE/utils/mod.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function refresh( $force = false )
/**
* Saves all modifications to database.
*
* @return boolean
* @return true
*/
public function save()
{
Expand All @@ -115,12 +115,10 @@ public function save()
set_theme_mod( $this->name, $this->mods );
// no longer stale
$this->stale = false;
// success
return true;
}

// no save occurred
return false;
// always return true
return true;
}

/**
Expand Down
12 changes: 11 additions & 1 deletion src/engine/ICE/utils/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ final public function __construct( $mod_key, $default_version = '1.0' )
}
}

/**
* Return currently stored version.
*
* @return string
*/
final public function get_version()
{
return $this->version;
}

/**
* Returns true if comparison of saved version to given version using given operator is successful.
*
Expand Down Expand Up @@ -168,7 +178,7 @@ public function run()
*/
private function import_options()
{
ice_rename_options( array(
return ice_rename_options( array(
// core options
'infinity-core-options.text-color' => 'core.text-color',
'infinity-core-options.link-color' => 'core.link-color',
Expand Down

0 comments on commit 7dc9aff

Please sign in to comment.