xprofile_field_options_before_save

  • apply_filters( 'xprofile_field_options_before_save', $post_option,  'radio' )

    Source Reference:

    • Component: BuddyPress :: bp-xprofile
      File: /bp-xprofile/bp-xprofile-classes.php :: Trac Source Line: 451
      				if ( $this->id )
      					$parent_id = $this->id;
      				else
      					$parent_id = $wpdb->insert_id;
      
      				if ( 'radio' == $this->type ) {
      					$post_option  = !empty( $_POST['radio_option']           ) ? $_POST['radio_option']           : '';
      					$post_default = !empty( $_POST['isDefault_radio_option'] ) ? $_POST['isDefault_radio_option'] : '';
      
      					$options	= apply_filters( 'xprofile_field_options_before_save', $post_option,  'radio' );
      					$defaults	= apply_filters( 'xprofile_field_default_before_save', $post_default, 'radio' );
      
      				} else if ( 'selectbox' == $this->type ) {
      					$post_option  = !empty( $_POST['selectbox_option']           ) ? $_POST['selectbox_option']           : '';
      					$post_default = !empty( $_POST['isDefault_selectbox_option'] ) ? $_POST['isDefault_selectbox_option'] : '';
      
      					$options	= apply_filters( 'xprofile_field_options_before_save', $post_option, 'selectbox' );
      					$defaults	= apply_filters( 'xprofile_field_default_before_save', $post_default, 'selectbox' );
      
      				} else if ( 'multiselectbox' == $this->type ) {
      
  • apply_filters( 'xprofile_field_options_before_save', $post_option, 'selectbox' )

    Source Reference:

    • Component: BuddyPress :: bp-xprofile
      File: /bp-xprofile/bp-xprofile-classes.php :: Trac Source Line: 458
      					$post_default = !empty( $_POST['isDefault_radio_option'] ) ? $_POST['isDefault_radio_option'] : '';
      
      					$options	= apply_filters( 'xprofile_field_options_before_save', $post_option,  'radio' );
      					$defaults	= apply_filters( 'xprofile_field_default_before_save', $post_default, 'radio' );
      
      				} else if ( 'selectbox' == $this->type ) {
      					$post_option  = !empty( $_POST['selectbox_option']           ) ? $_POST['selectbox_option']           : '';
      					$post_default = !empty( $_POST['isDefault_selectbox_option'] ) ? $_POST['isDefault_selectbox_option'] : '';
      
      					$options	= apply_filters( 'xprofile_field_options_before_save', $post_option, 'selectbox' );
      					$defaults	= apply_filters( 'xprofile_field_default_before_save', $post_default, 'selectbox' );
      
      				} else if ( 'multiselectbox' == $this->type ) {
      					$post_option  = !empty( $_POST['multiselectbox_option']           ) ? $_POST['multiselectbox_option']           : '';
      					$post_default = !empty( $_POST['isDefault_multiselectbox_option'] ) ? $_POST['isDefault_multiselectbox_option'] : '';
      
      					$options	= apply_filters( 'xprofile_field_options_before_save', $post_option, 'multiselectbox' );
      					$defaults	= apply_filters( 'xprofile_field_default_before_save', $post_default, 'multiselectbox' );
      
      				} else if ( 'checkbox' == $this->type ) {
      
  • apply_filters( 'xprofile_field_options_before_save', $post_option, 'multiselectbox' )

    Source Reference:

    • Component: BuddyPress :: bp-xprofile
      File: /bp-xprofile/bp-xprofile-classes.php :: Trac Source Line: 465
      					$post_default = !empty( $_POST['isDefault_selectbox_option'] ) ? $_POST['isDefault_selectbox_option'] : '';
      
      					$options	= apply_filters( 'xprofile_field_options_before_save', $post_option, 'selectbox' );
      					$defaults	= apply_filters( 'xprofile_field_default_before_save', $post_default, 'selectbox' );
      
      				} else if ( 'multiselectbox' == $this->type ) {
      					$post_option  = !empty( $_POST['multiselectbox_option']           ) ? $_POST['multiselectbox_option']           : '';
      					$post_default = !empty( $_POST['isDefault_multiselectbox_option'] ) ? $_POST['isDefault_multiselectbox_option'] : '';
      
      					$options	= apply_filters( 'xprofile_field_options_before_save', $post_option, 'multiselectbox' );
      					$defaults	= apply_filters( 'xprofile_field_default_before_save', $post_default, 'multiselectbox' );
      
      				} else if ( 'checkbox' == $this->type ) {
      					$post_option  = !empty( $_POST['checkbox_option']           ) ? $_POST['checkbox_option']           : '';
      					$post_default = !empty( $_POST['isDefault_checkbox_option'] ) ? $_POST['isDefault_checkbox_option'] : '';
      
      					$options	= apply_filters( 'xprofile_field_options_before_save', $post_option, 'checkbox' );
      					$defaults	= apply_filters( 'xprofile_field_default_before_save', $post_default, 'checkbox' );
      				}
      
  • apply_filters( 'xprofile_field_options_before_save', $post_option, 'checkbox' )

    Source Reference:

    • Component: BuddyPress :: bp-xprofile
      File: /bp-xprofile/bp-xprofile-classes.php :: Trac Source Line: 472
      					$post_default = !empty( $_POST['isDefault_multiselectbox_option'] ) ? $_POST['isDefault_multiselectbox_option'] : '';
      
      					$options	= apply_filters( 'xprofile_field_options_before_save', $post_option, 'multiselectbox' );
      					$defaults	= apply_filters( 'xprofile_field_default_before_save', $post_default, 'multiselectbox' );
      
      				} else if ( 'checkbox' == $this->type ) {
      					$post_option  = !empty( $_POST['checkbox_option']           ) ? $_POST['checkbox_option']           : '';
      					$post_default = !empty( $_POST['isDefault_checkbox_option'] ) ? $_POST['isDefault_checkbox_option'] : '';
      
      					$options	= apply_filters( 'xprofile_field_options_before_save', $post_option, 'checkbox' );
      					$defaults	= apply_filters( 'xprofile_field_default_before_save', $post_default, 'checkbox' );
      				}
      
      				$counter = 1;
      				if ( $options ) {
      					foreach ( (array)$options as $option_key => $option_value ) {
      						$is_default = 0;
      
      						if ( is_array( $defaults ) ) {
      							if ( isset( $defaults[$option_key] ) )
      

Comments are closed.