Created
June 1, 2020 19:08
-
-
Save stefanpejcic/3ae2db26dabff2f8875204b9948d625e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set array element | |
if ( ! function_exists( 'piqes_storage_set_array' ) ) { | |
function piqes_storage_set_array( $var_name, $key, $value ) { | |
global $PIQES_STORAGE; | |
if ( ! isset( $PIQES_STORAGE[ $var_name ] ) ) { | |
$PIQES_STORAGE[ $var_name ] = array(); | |
} | |
if ( '' === $key ) { | |
$PIQES_STORAGE[ $var_name ][] = $value; | |
} else { | |
$PIQES_STORAGE[ $var_name ][ $key ] = $value; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment