xprofile_field_is_required_before_save

  • apply_filters( 'xprofile_field_is_required_before_save', $this->is_required, $this->id )

    Source Reference:

    • Component: BuddyPress :: bp-xprofile
      File: /bp-xprofile/bp-xprofile-classes.php :: Trac Source Line: 405
      		global $wpdb, $bp;
      
      		$error = false;
      
      		$this->group_id		= apply_filters( 'xprofile_field_group_id_before_save',    $this->group_id,    $this->id );
      		$this->parent_id	= apply_filters( 'xprofile_field_parent_id_before_save',   $this->parent_id,   $this->id );
      		$this->type			= apply_filters( 'xprofile_field_type_before_save',        $this->type,        $this->id );
      		$this->name			= apply_filters( 'xprofile_field_name_before_save',        $this->name,        $this->id );
      		$this->description	= apply_filters( 'xprofile_field_description_before_save', $this->description, $this->id );
      		$this->is_required	= apply_filters( 'xprofile_field_is_required_before_save', $this->is_required, $this->id );
      		$this->order_by		= apply_filters( 'xprofile_field_order_by_before_save',    $this->order_by,    $this->id );
      		$this->field_order	= apply_filters( 'xprofile_field_field_order_before_save', $this->field_order, $this->id );
      
      		do_action_ref_array( 'xprofile_field_before_save', array( &$this ) );
      
      		if ( $this->id != null )
      			$sql = $wpdb->prepare( "UPDATE {$bp->profile->table_name_fields} SET group_id = %d, parent_id = 0, type = %s, name = %s, description = %s, is_required = %d, order_by = %s, field_order = %d WHERE id = %d", $this->group_id, $this->type, $this->name, $this->description, $this->is_required, $this->order_by, $this->field_order, $this->id );
      		else
      			$sql = $wpdb->prepare( "INSERT INTO {$bp->profile->table_name_fields} (group_id, parent_id, type, name, description, is_required, order_by, field_order ) VALUES (%d, %d, %s, %s, %s, %d, %s, %d )", $this->group_id, $this->parent_id, $this->type, $this->name, $this->description, $this->is_required, $this->order_by, $this->field_order );
      

Comments are closed.