[buddypress-trac] [BuddyPress Trac] #5472: xprofile_insert_field -> type - 'option' not allowed?

buddypress-trac noreply at wordpress.org
Sun Jun 15 18:43:08 UTC 2014


#5472: xprofile_insert_field -> type - 'option' not allowed?
------------------------------+---------------------------
 Reporter:  shanebp           |       Owner:  boonebgorges
     Type:  defect (bug)      |      Status:  reopened
 Priority:  normal            |   Milestone:  2.1
Component:  XProfile          |     Version:  1.9.2
 Severity:  normal            |  Resolution:
 Keywords:  needs-unit-tests  |
------------------------------+---------------------------

Comment (by shanebp):

 >Can you please clarify what you mean by this?

 Sorry, but I'm just guessing as to why the option_order field is saved as
 0 for every row when inserting options in a loop.

 {{{
         $i = 0;

         foreach (  $countries as $country ) {

                 xprofile_insert_field( array(
                         'field_group_id'        => 1,
                         'parent_id'             => $country_list_id,
                         'type'                  => 'option',
                         'name'                  => $country,
                         'option_order'          => $i
                 ));
                 $i++;
         }
 }}}

 Even if I hard-code 'option_order' to 123, it still gets inserted as 0.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5472#comment:18>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list