Property | Type | Description | |
---|---|---|---|
$settings |
Property | Type | Description | |
---|---|---|---|
$user_id |
Method | Description | |
---|---|---|
__construct ( string $title ) | Create a new user meta container | |
attach ( ) | Add the container to the user | |
init ( ) | Bind attach() and save() to the appropriate WordPress actions. | |
is_profile_page ( ) | Whether we're on the user profile page | |
is_valid_attach ( ) : boolean | Perform checks whether the container should be attached during the current request | |
is_valid_save ( $user_id ) : boolean | Checks whether the current request is valid | |
is_valid_save_conditions ( integer $user_id ) : boolean | Perform checks whether the current save() request is valid | |
render ( $user_profile = null ) | Output the container markup | |
save ( integer $user_id ) | Perform save operation after successful is_valid_save() check. | |
set_user_id ( integer $user_id ) | Set the user ID the container will operate with. | |
show_on_user_role ( string $role ) : object | Show the container only on users who have the $role role. |
public __construct ( string $title ) | ||
$title | string | Unique title of the container |
public is_valid_attach ( ) : boolean | ||
return | boolean | True if the container is allowed to be attached |
public is_valid_save ( $user_id ) : boolean | ||
return | boolean |
public is_valid_save_conditions ( integer $user_id ) : boolean | ||
$user_id | integer | ID of the user against which save() is ran |
return | boolean |
public set_user_id ( integer $user_id ) | ||
$user_id | integer |
public show_on_user_role ( string $role ) : object | ||
$role | string | |
return | object | $this |