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::merge( array $new_options = array() )
Merge the new options into the settings 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()
Return Return
(bool)
Source Source
File: classes/Utils/Options.php
public static function merge( $new_options = array() ) { $options = self::get_all(); // Merge new options. foreach ( $new_options as $key => $val ) { $options[ $key ] = ! empty( $val ) ? $val : false; } $did_update = update_option( self::$_prefix . 'settings', $options ); // If it updated, let's update the global variable if ( $did_update ) { self::$_data = $options; } return $did_update; }
Expand full source code Collapse full source code View on Trac