You appear to be a bot. Output may be restricted
Description
Takes an array of new settings, merges them with the old settings, and pushes them into the database.
Usage
$bool = genesis_update_settings( $new, $setting );
Parameters
- $new
- ( string|array ) optional – New settings. Can be a string, or an array.
- $setting
- ( string ) optional default: GENESIS_SETTINGS_FIELD – Optional. Settings field name. Default is GENESIS_SETTINGS_FIELD.
Returns
bool true
if option was updated, false
otherwise.
Source
File name: genesis/lib/functions/options.php
Lines:
1 to 17 of 17
function genesis_update_settings( $new = '', $setting = GENESIS_SETTINGS_FIELD ) { $old = get_option( $setting ); $settings = wp_parse_args( $new, $old ); // Allow settings to be deleted. foreach ( $settings as $key => $value ) { if ( 'unset' === $value ) { unset( $settings[ $key ] ); } } return update_option( $setting, $settings ); }