Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In BuddyPress, What is the use of is_default_option field in wp_bp_xprofile_fields table?

share|improve this question
add comment

1 Answer

up vote 9 down vote accepted

This is one of the things you won't find in the docs, but only in the source. The source code contains only one usage of this variable. This is in bp-xprofile-template.php line 493.

              // First, check to see whether the user-entered value matches
              if ( in_array( $allowed_options, (array) $option_values ) ) {
                  $selected = ' selected="selected"';

              // Then, if the user has not provided a value, check for defaults
              if ( !is_array( $original_option_values ) && empty( $option_values ) && $options[$k]->is_default_option ) {
                  $selected = ' selected="selected"';

As you can see, it is used to pre-select an option in the case the user hasn't supplied a value yet.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.