Users
in package
Extended user information.
Adds field to capture member image id using WP media selector. Adds additional contact methods.
Tags
Table of Contents
Constants
- ABOUT_IMAGE_KEY = 'psite_about_image'
- The user image meta key name.
- MEDIA_FIELD_NAME = 'pnet_image_id'
- The media selector field name attribute.
- PROFILE_OPTIONS_CONTAINER = 'table-user-profile-options.php'
- Profile options container partial.
Properties
- $instances : array<string|int, object>
- The array of instances of this class and sub-classes.
- $media_selector : Media_Selector
- The instance of the Media_Selector class.
- $profile_options_container : string
- Fully qualified path to profile options container.
Methods
- additional_fields() : void
- Show additional user fields on profile page.
- get_instance() : object
- Creates and/or returns the instance of this class.
- revise_contact_methods() : array<string|int, mixed>
- Register new contact methods.
- update_extra_profile_fields() : void
- Update the additional profile fields.
- __construct() : void
- Initialise the class and set its properties.
Constants
ABOUT_IMAGE_KEY
The user image meta key name.
protected
string
ABOUT_IMAGE_KEY
= 'psite_about_image'
Tags
MEDIA_FIELD_NAME
The media selector field name attribute.
protected
string
MEDIA_FIELD_NAME
= 'pnet_image_id'
Tags
PROFILE_OPTIONS_CONTAINER
Profile options container partial.
protected
string
PROFILE_OPTIONS_CONTAINER
= 'table-user-profile-options.php'
Tags
Properties
$instances
The array of instances of this class and sub-classes.
protected
static array<string|int, object>
$instances
= array()
Tags
$media_selector
The instance of the Media_Selector class.
protected
Media_Selector
$media_selector
Tags
$profile_options_container
Fully qualified path to profile options container.
protected
string
$profile_options_container
Tags
Methods
additional_fields()
Show additional user fields on profile page.
public
additional_fields(WP_User $profile_user) : void
Parameters
- $profile_user : WP_User
-
The target user profile onject..
Tags
get_instance()
Creates and/or returns the instance of this class.
public
static get_instance() : object
Tags
Return values
object —The instance of this class.
revise_contact_methods()
Register new contact methods.
public
revise_contact_methods(array<string|int, mixed> $methods) : array<string|int, mixed>
Parameters
- $methods : array<string|int, mixed>
-
Array of contact methods and their labels.
Tags
Return values
array<string|int, mixed> —The modified contact methods.
update_extra_profile_fields()
Update the additional profile fields.
public
update_extra_profile_fields(int $user_id) : void
Parameters
- $user_id : int
-
User id.
Tags
__construct()
Initialise the class and set its properties.
protected
__construct() : void