/**
 * bf_update_option() - Update Option Function
 * 
 * Updates the option based on the ID and value given. 
 * Not to be confused with bf_update_options().
 * 
 * @access	public
 * @since	0.5.2
 * @param	string				$name	Name of the option
 * @param	mixed				$value	Value of the option
 * @param	boolean[optional]	$commit	Commit the changes to the database
 */
function bf_update_option($name, $value, $commit = true)
{
    global $bf_options;
    $bf_options->get_options();
    $bf_options->{$name} = $value;
    if ($commit) {
        bf_update_options();
        bf_flush_options();
    }
}
Example #2
0
/**
 * {@internal Missing Short Description }}
 * 
 * {@internal Missing Long Description }}
 * 
 * @ignore
 * @since	0.5.2
 */
function bf_admin_load_save()
{
    global $bf_options;
    $bf_options->save_options();
    bf_update_options();
    echo '<div class="updated"><p>' . __('Your settings have been saved to the database.', 'buffet') . '</p></div>';
}