\um\frontendActions_Listener

Class Actions_Listener

Summary

Methods
Properties
Constants
__construct()
actions_listener()
get_error_message()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
set_action_error_and_redirect()
No private properties found
N/A

Methods

__construct()

__construct() : mixed

Actions_Listener constructor.

Returns

mixed

actions_listener()

actions_listener() : mixed

Handle frontend actions

Returns

mixed

get_error_message()

get_error_message(string  $code) : string

Parameters

string $code

Returns

string

set_action_error_and_redirect()

set_action_error_and_redirect(string  $code) : mixed

Store an action error message in a transient and redirect back to the profile page.

Instead of calling wp_die() which shows a blank death page, this method stores an informative error message and redirects the admin back to the user's profile page where the notice will be displayed.

Parameters

string $code

Error code to redirect.

Returns

mixed