Merged in feature/MAW-855-import-code-into-aws (pull request #2)

code import from pantheon

* code import from pantheon
This commit is contained in:
Tony Volpe
2023-12-04 23:08:14 +00:00
parent 8c9b1312bc
commit 8f4b5efda6
4766 changed files with 185592 additions and 239967 deletions

View File

@@ -110,10 +110,14 @@ class WPCF7 {
* @param mixed $value Option value.
*/
public static function update_option( $name, $value ) {
$option = get_option( 'wpcf7' );
$option = ( false === $option ) ? array() : (array) $option;
$option = array_merge( $option, array( $name => $value ) );
update_option( 'wpcf7', $option );
$old_option = get_option( 'wpcf7' );
$old_option = ( false === $old_option ) ? array() : (array) $old_option;
update_option( 'wpcf7',
array_merge( $old_option, array( $name => $value ) )
);
do_action( 'wpcf7_update_option', $name, $value, $old_option );
}
}