Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/22/2014 11:17:54 PM (11 years ago)
Author:
djpaul
Message:

xProfile: when saving community profile changes in wp-admin, we don't need to split $_POST['field_ids'] into a comma-seperated string before using wp_parse_id_list() as it will take care of that for us.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-admin.php

    r7857 r7970  
    608608                }
    609609
    610                 $merge_ids = '';
    611                 foreach ( $_POST['field_ids'] as $ids ) {
    612                     $merge_ids .= $ids . ',';
    613                 }
    614 
    615                 // Explode the posted field IDs into an array so we know which
    616                 // fields have been submitted
    617                 $posted_field_ids = array_filter( wp_parse_id_list( $merge_ids ) );
     610                // Explode the posted field IDs into an array so we know which fields have been submitted
     611                $posted_field_ids = wp_parse_id_list( $_POST['field_ids'] );
    618612                $is_required      = array();
    619613
    620                 // Loop through the posted fields formatting any datebox values
    621                 // then validate the field
     614                // Loop through the posted fields formatting any datebox values then validate the field
    622615                foreach ( (array) $posted_field_ids as $field_id ) {
    623616                    if ( ! isset( $_POST['field_' . $field_id] ) ) {
Note: See TracChangeset for help on using the changeset viewer.