add_wpbm_calendar_options [data_value] => calendar_months_count=1&calendar_months_num_in_1_row=1&calendar_width=500px&calendar_cell_height */ $post_param = explode( '&', $_POST['data_value'] ); // "&" was set by jQuery.param( data_params ) in client side. $data_to_save = array(); foreach ( $post_param as $param ) { $param_data = explode( '=', $param ); $data_to_save[ $param_data[0] ] = ( isset( $param_data[1] ) ) ? esc_attr( $param_data[1] ) : ''; } /* Exmaple: Array ( [calendar_months_count] => 1 [calendar_months_num_in_1_row] => 1 [calendar_width] => 500px [calendar_cell_height] => ) */ // Save Custom User Data update_user_option( (int) $_POST['user_id'], 'wpbm_custom_' . esc_attr( $_POST['data_name'] ) , serialize( $data_to_save ) ); ?> 'admin' ,'WPBM_USER_SAVE_CUSTOM_DATA' => 'admin' , 'WPBM_LISTING_ICS_URL' => 'admin' ); foreach ($actions_list as $action_name => $action_where) { if ( ( isset($_POST['action']) ) && ( $_POST['action'] == $action_name ) ){ if ( ( $action_where == 'admin' ) || ( $action_where == 'both' ) ) add_action( 'wp_ajax_' . $action_name, 'wpbm_ajax_' . $action_name); // Admin & Client (logged in usres) if ( ( $action_where == 'both' ) || ( $action_where == 'client' ) ) add_action( 'wp_ajax_nopriv_' . $action_name, 'wpbm_ajax_' . $action_name); // Client (not logged in) } } }