xprofile_group_description_before_save

  • apply_filters( 'xprofile_group_description_before_save', $this->description, $this->id )

    Source Reference:

    • Component: BuddyPress :: bp-xprofile
      File: /bp-xprofile/bp-xprofile-classes.php :: Trac Source Line: 44
      		$this->description = stripslashes( $group->description );
      		$this->can_delete  = $group->can_delete;
      		$this->group_order = $group->group_order;
      	}
      
      	function save() {
      		global $wpdb, $bp;
      
      		$this->name			= apply_filters( 'xprofile_group_name_before_save',        $this->name,        $this->id );
      		$this->description	= apply_filters( 'xprofile_group_description_before_save', $this->description, $this->id );
      
      		do_action_ref_array( 'xprofile_group_before_save', array( &$this ) );
      
      		if ( $this->id )
      			$sql = $wpdb->prepare( "UPDATE {$bp->profile->table_name_groups} SET name = %s, description = %s WHERE id = %d", $this->name, $this->description, $this->id );
      		else
      			$sql = $wpdb->prepare( "INSERT INTO {$bp->profile->table_name_groups} (name, description, can_delete) VALUES (%s, %s, 1)", $this->name, $this->description );
      
      		if ( is_wp_error( $wpdb->query( $sql ) ) )
      			return false;
      

Comments are closed.