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::remap_keys( array $remap_array = array() )
Remaps option keys.
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
- $remap_array
-
(Optional) an array of $old_key => $new_key values.
Default value: array()
Return Return
(bool)
Source Source
File: classes/Utils/Options.php
public static function remap_keys( $remap_array = array() ) { $options = self::get_all(); foreach ( $remap_array as $key => $new_key ) { $value = self::get( $key, false ); if ( ! empty( $value ) ) { $options[ $new_key ] = $value; } unset( $options[ $key ] ); } $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