Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Utils_Options::update_all( array $new_options = array() )

Update the entire settings array from a new array.


Description Description


Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Parameters Parameters

$new_options

(Optional)

Default value: array()


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: classes/Utils/Options.php

	public static function update_all( $new_options = array() ) {
		// First let's grab the current settings
		$options = get_option( self::$_prefix . 'settings' );

		// Lets merge options that may exist previously that are not existing now.
		$new_options = wp_parse_args( $new_options, $options );

		$did_update = update_option( self::$_prefix . 'settings', $new_options );

		// If it updated, let's update the global variable
		if ( $did_update ) {
			self::$_data = $new_options;
		}

		return $did_update;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.