Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/01/2015 04:18:13 AM (9 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-checkbox.php

    r10140 r10163  
    1818
    1919    /**
    20      * Constructor for the checkbox field type
     20     * Constructor for the checkbox field type.
    2121     *
    2222     * @since 2.0.0
    23      */
     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/input.checkbox.html permitted attributes} that you want to add.
    5352     * @since 2.0.0
     53     *
     54     * @param array $raw_properties Optional key/value array of
     55     *                              {@link http://dev.w3.org/html5/markup/input.checkbox.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'] ) ) {
     
    97100     * Must be used inside the {@link bp_profile_fields()} template loop.
    98101     *
     102     * @since 2.0.0
     103     *
    99104     * @param array $args Optional. The arguments passed to {@link bp_the_profile_field_options()}.
    100      * @since 2.0.0
    101105     */
    102106    public function edit_field_options_html( array $args = array() ) {
     
    108112
    109113        // Check for updated posted values, but errors preventing them from
    110         // being saved first time
     114        // being saved first time.
    111115        if ( isset( $_POST['field_' . $this->field_obj->id] ) && $option_values != maybe_serialize( $_POST['field_' . $this->field_obj->id] ) ) {
    112116            if ( ! empty( $_POST['field_' . $this->field_obj->id] ) ) {
     
    118122            $selected = '';
    119123
    120             // First, check to see whether the user's saved values match the option
     124            // First, check to see whether the user's saved values match the option.
    121125            for ( $j = 0, $count_values = count( $option_values ); $j < $count_values; ++$j ) {
    122126
    123127                // Run the allowed option name through the before_save filter,
    124                 // so we'll be sure to get a match
     128                // so we'll be sure to get a match.
    125129                $allowed_options = xprofile_sanitize_data_value_before_save( $options[$k]->name, false, false );
    126130
     
    132136
    133137            // If the user has not yet supplied a value for this field, check to
    134             // see whether there is a default value available
     138            // see whether there is a default value available.
    135139            if ( empty( $option_values ) && empty( $selected ) && ! empty( $options[$k]->is_default_option ) ) {
    136140                $selected = ' checked="checked"';
     
    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() ) {
     
    179184     * Must be used inside the {@link bp_profile_fields()} template loop.
    180185     *
     186     * @since 2.0.0
     187     *
    181188     * @param BP_XProfile_Field $current_field The current profile field on the add/edit screen.
    182      * @param string $control_type Optional. HTML input type used to render the current field's child options.
    183      * @since 2.0.0
     189     * @param string            $control_type  Optional. HTML input type used to render the current
     190     *                                         field's child options.
    184191     */
    185192    public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) {
Note: See TracChangeset for help on using the changeset viewer.