Skip to:
Content

BuddyPress.org

Changeset 8028


Ignore:
Timestamp:
03/03/2014 10:29:13 PM (11 years ago)
Author:
imath
Message:

Make sure all xprofile fields are saved in wp-admin/profile

Unlike front-end edit-fields screens, the wp-admin/profile displays all groups of fields on a single page. So the list of field ids is an array gathering for each group of fields a distinct comma separated list of ids. As a result, before using the wp_parse_id_list() function, we must ensure that these ids are merged into a single comma separated list.

Fixes #5425

File:
1 edited

Legend:

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

    r7970 r8028  
    608608                }
    609609
     610                /**
     611                 * Unlike front-end edit-fields screens, the wp-admin/profile displays all
     612                 * groups of fields on a single page, so the list of field ids is an array
     613                 * gathering for each group of fields a distinct comma separated list of ids.
     614                 * As a result, before using the wp_parse_id_list() function, we must ensure
     615                 * that these ids are "merged" into a single comma separated list.
     616                 */
     617                $merge_ids = join( ',', $_POST['field_ids'] );
     618
    610619                // 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'] );
     620                $posted_field_ids = wp_parse_id_list( $merge_ids );
    612621                $is_required      = array();
    613622
Note: See TracChangeset for help on using the changeset viewer.