Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/01/2015 04:18:13 AM (10 years ago)
Author:
tw2113
Message:

First pass of documentation cleanup for the XProfile Component.

See #6406.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-multiselectbox.php

    r10140 r10163  
    1818
    1919    /**
    20      * Constructor for the multi-selectbox field type
    21      *
    22      * @since 2.0.0
    23      */
     20     * Constructor for the multi-selectbox field type.
     21     *
     22     * @since 2.0.0
     23     */
    2424    public function __construct() {
    2525        parent::__construct();
     
    5050     * Must be used inside the {@link bp_profile_fields()} template loop.
    5151     *
    52      * @param array $raw_properties Optional key/value array of {@link http://dev.w3.org/html5/markup/select.html permitted attributes} that you want to add.
    53      * @since 2.0.0
     52     * @since 2.0.0
     53     *
     54     * @param array $raw_properties Optional key/value array of
     55     *                              {@link http://dev.w3.org/html5/markup/select.html permitted attributes}
     56     *                              that you want to add.
    5457     */
    5558    public function edit_field_html( array $raw_properties = array() ) {
    5659
    57         // user_id is a special optional parameter that we pass to
     60        // User_id is a special optional parameter that we pass to
    5861        // {@link bp_the_profile_field_options()}.
    5962        if ( isset( $raw_properties['user_id'] ) ) {
     
    104107     * Must be used inside the {@link bp_profile_fields()} template loop.
    105108     *
     109     * @since 2.0.0
     110     *
    106111     * @param array $args Optional. The arguments passed to {@link bp_the_profile_field_options()}.
    107      * @since 2.0.0
    108112     */
    109113    public function edit_field_options_html( array $args = array() ) {
     
    122126
    123127            // Check for updated posted values, but errors preventing them from
    124             // being saved first time
     128            // being saved first time.
    125129            foreach( $option_values as $i => $option_value ) {
    126130                if ( isset( $_POST['field_' . $this->field_obj->id] ) && $_POST['field_' . $this->field_obj->id][$i] != $option_value ) {
     
    132136
    133137            // Run the allowed option name through the before_save filter, so
    134             // we'll be sure to get a match
     138            // we'll be sure to get a match.
    135139            $allowed_options = xprofile_sanitize_data_value_before_save( $options[$k]->name, false, false );
    136140
    137             // First, check to see whether the user-entered value matches
     141            // First, check to see whether the user-entered value matches.
    138142            if ( in_array( $allowed_options, $option_values ) ) {
    139143                $selected = ' selected="selected"';
    140144            }
    141145
    142             // Then, if the user has not provided a value, check for defaults
     146            // Then, if the user has not provided a value, check for defaults.
    143147            if ( ! is_array( $original_option_values ) && empty( $option_values ) && ! empty( $options[$k]->is_default_option ) ) {
    144148                $selected = ' selected="selected"';
     
    167171     * Must be used inside the {@link bp_profile_fields()} template loop.
    168172     *
     173     * @since 2.0.0
     174     *
    169175     * @param array $raw_properties Optional key/value array of permitted attributes that you want to add.
    170      * @since 2.0.0
    171176     */
    172177    public function admin_field_html( array $raw_properties = array() ) {
     
    183188
    184189    /**
    185      * Output HTML for this field type's children options on the wp-admin Profile Fields "Add Field" and "Edit Field" screens.
    186      *
    187      * Must be used inside the {@link bp_profile_fields()} template loop.
     190     * Output HTML for this field type's children options on the wp-admin Profile Fields,
     191     * "Add Field" and "Edit Field" screens.
     192     *
     193     * Must be used inside the {@link bp_profile_fields()} template loop.
     194     *
     195     * @since 2.0.0
    188196     *
    189197     * @param BP_XProfile_Field $current_field The current profile field on the add/edit screen.
    190      * @param string $control_type Optional. HTML input type used to render the current field's child options.
    191      * @since 2.0.0
     198     * @param string            $control_type  Optional. HTML input type used to render the current
     199     *                                         field's child options.
    192200     */
    193201    public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) {
Note: See TracChangeset for help on using the changeset viewer.