Skip to:
Content

BuddyPress.org

Changeset 9712


Ignore:
Timestamp:
04/07/2015 12:58:09 AM (4 years ago)
Author:
boonebgorges
Message:

Documentation improvements for xprofile_insert_field().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-functions.php

    r9711 r9712  
    190190
    191191/**
    192  * Insert an xprofile field.
     192 * Insert or update an xprofile field.
    193193 *
    194194 * @param array $args {
    195195 *     Array of arguments.
    196  *     @type int $field_id Optional. Pass the ID of an existing field to edit
    197  *           that field.
    198  *     @type int $field_group_id ID of the associated field group.
    199  *     @type int $parent_id Optional. ID of the parent field.
    200  *     @type string $type Field type. Checked against a field_types whitelist.
    201  *     @type string $name Name of the new field.
    202  *     @type string $description Optional. Descriptive text for the field.
    203  *     @type bool $is_required Optional. Whether users must provide a value for
    204  *           the field. Default: false.
    205  *     @type bool $can_delete Optional. Whether admins can delete this field in
    206  *           the Dashboard interface. Generally this is true only for the Name
    207  *           field, which is required throughout BP. Default: true.
    208  *     @type string $order_by Optional. For field types that support options
    209  *           (such as 'radio'), this flag determines whether the sort order of
    210  *           the options will be 'default' (order created) or 'custom'.
    211  *     @type bool $is_default_option Optional. For the 'option' field type,
    212  *           setting this value to true means that it'll be the default value
    213  *           for the parent field when the user has not yet overridden.
    214  *     @type int $option_order Optional. For the 'option' field type, this
    215  *           determines the order in which the options appear.
     196 *     @type int    $field_id          Optional. Pass the ID of an existing field to edit that field.
     197 *     @type int    $field_group_id    ID of the associated field group.
     198 *     @type int    $parent_id         Optional. ID of the parent field.
     199 *     @type string $type              Field type. Checked against a field_types whitelist.
     200 *     @type string $name              Name of the new field.
     201 *     @type string $description       Optional. Descriptive text for the field.
     202 *     @type bool   $is_required       Optional. Whether users must provide a value for the field. Default: false.
     203 *     @type bool   $can_delete        Optional. Whether admins can delete this field in the Dashboard interface.
     204 *                                     Generally this is false only for the Name field, which is required throughout BP.
     205 *                                     Default: true.
     206 *     @type string $order_by          Optional. For field types that support options (such as 'radio'), this flag
     207 *                                     determines whether the sort order of the options will be 'default'
     208 *                                     (order created) or 'custom'.
     209 *     @type bool   $is_default_option Optional. For the 'option' field type, setting this value to true means that
     210 *                                     it'll be the default value for the parent field when the user has not yet
     211 *                                     overridden. Default: true.
     212 *     @type int    $option_order      Optional. For the 'option' field type, this determines the order in which the
     213 *                                     options appear.
    216214 * }
    217215 * @return bool|int False on failure, ID of new field on success.
Note: See TracChangeset for help on using the changeset viewer.