ich folgenden Code Javascript haben:
var configuration = [];
configuration["step 1"] = val1;
configuration["step 2"] = val2;
configuration["step 3"] = val3;
configuration["extraData"] = extra_data;
var data = {
action: 'configuration_save',
config: configuration,
};
$.post(ajaxurl, data, function (response) {
alert(response)
});
$_POST['config']
in PHP leer zeigt. Mache ich einen Fehler beim Übergeben von Array.
PHP CODE
$current_user = wp_get_current_user();
$user_id = $current_user->ID;
add_user_meta($user_id, "CONFIG", $_POST['config']);
entfernen Sie das ',' 'hier config: Konfiguration,' –
uns zeigen 'configuration_save' Code –
@TheFlash: noch leer –