BP_XProfile_Field_Type_WordPress::__construct()

Constructor for the WordPress field type.


Source Source

File: bp-xprofile/classes/class-bp-xprofile-field-type-wordpress.php

	public function __construct() {
		parent::__construct();

		/**
		 * Fires inside __construct() method for BP_XProfile_Field_Type_WordPress class.
		 *
		 * @since 8.0.0
		 *
		 * @param BP_XProfile_Field_Type_WordPress $this Instance of the field type object.
		 */
		do_action( 'bp_xprofile_field_type_wordpress', $this );

		// Use the `$wpdb->usermeta` table instead of the $bp->profile->table_name_data one.
		add_filter( 'bp_xprofile_set_field_data_pre_save', array( $this, 'set_field_value' ), 10, 2 );

		// Set the supported keys.
		$this->supported_keys = bp_xprofile_get_wp_user_keys();
	}


Top ↑

Changelog Changelog

Changelog
Version Description
8.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.