Skip to content

Instantly share code, notes, and snippets.

@bigdigital
Last active May 11, 2017 09:17
Show Gist options
  • Save bigdigital/30ffe42b4cb84ca7035aa9fbdf28876d to your computer and use it in GitHub Desktop.
Save bigdigital/30ffe42b4cb84ca7035aa9fbdf28876d to your computer and use it in GitHub Desktop.
Fix to update The7 v4 theme options (object cache)
if ($optionsframework_settings = get_option( 'optionsframework' ) && !function_exists('optionsframework_update_options_cache') )
add_action( 'update_option_' . $optionsframework_settings['id'], 'optionsframework_update_options_cache_fix', 10, 2 );
function optionsframework_update_options_cache_fix( $old_value, $value ) {
$value = apply_filters( 'dt_of_get_option_static', $value );
wp_cache_set( 'saved_options', $value, 'optionsframework' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment