Register
in package
Handle subscriber registration.
Tags
Table of Contents
Constants
- REGISTER_PAGE = 'register'
- The register page slug.
Properties
- $instances : array<string|int, object>
- The array of instances of this class and sub-classes.
- $registration_url : string
- The registration page url.
- $user : User
- The instance of the User class.
Methods
- get_instance() : object
- Creates and/or returns the instance of this class.
- get_registration_url() : string
- Return the registration page url.
- redirect_to_custom_registration() : void
- Redirects the registration request to the custom registration page.
- register_user() : WP_Error
- Register the new user.
- __construct() : void
- Initialise the class.
Constants
REGISTER_PAGE
The register page slug.
protected
string
REGISTER_PAGE
= 'register'
Tags
Properties
$instances
The array of instances of this class and sub-classes.
protected
static array<string|int, object>
$instances
= array()
Tags
$registration_url
The registration page url.
protected
string
$registration_url
= ''
Tags
$user
The instance of the User class.
protected
User
$user
Tags
Methods
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.
get_registration_url()
Return the registration page url.
public
get_registration_url() : string
Tags
Return values
string —The registration page url.
redirect_to_custom_registration()
Redirects the registration request to the custom registration page.
public
redirect_to_custom_registration() : void
Tags
register_user()
Register the new user.
public
register_user(WP_Error $errors, array<string|int, string> $post_vars, array<string|int, string> $server_vars) : WP_Error
Parameters
- $errors : WP_Error
-
The WP_Error object to use if errors.
- $post_vars : array<string|int, string>
-
The sanitised $_POST arguments.
- $server_vars : array<string|int, string>
-
The sanitised $_SERVER arguments.
Tags
Return values
WP_Error —The maybe modified error messages.
__construct()
Initialise the class.
protected
__construct() : void