Custom Actions & Filters


Warning: Invalid argument supplied for foreach() in /home/customer/www/registrationmagic.com/public_html/wp-content/plugins/wp-knowledgebase/includes/kbe-template-functions.php on line 33

Custom Actions & Filters

Actions

Action Name: rm_user_signon
Calling: do_action(‘rm_user_signon’,$user)
Description: Called after successful sign-on from RegistrationMagic. Sends $user object.
Parameters:
(object|WP_User) (Required) $user – Object of WP_User type for registering user.


Action Name: rm_user_signon_failure
Calling: do_action(‘rm_user_signon_failure’,$credentials)
Description: Called on login failure. Sends $credentials object.
Parameters:
(array) (Required) $credentials – Array containing two strings for Username and Password.


Action Name: rm_submission_edited
Calling: do_action(‘rm_submission_edited’,$submission_id)
Description: Called after successfully editing form submission.
Parameters:
(int) (Required) $submission_id – Integer value of Form Submission ID.


Action Name: rm_submission_completed
Calling: do_action(‘rm_submission_completed’,$form_id,$user_id,$submission_data)
Description: Called after successful form submission.
Parameters:
(int) (Required) $form_id – Integer value of Form ID.
(int) (Required) $user_id – Integer value of User ID submitting the form.
(array) (Required) $submission_data – Array of form field data sent for submission.


Action Name: rm_user_deactivated
Calling: do_action(‘rm_user_deactivated’,$user_id);
Description: Called on user deactivation.
Parameters:
(int) (Required) $user_id – Integer value of User ID getting deactivated.


Action Name: rm_ip_unblocked
Calling: do_action(‘rm_ip_unblocked’,array(‘ip’=>$ip))
Description: Called after blocking an IP.
Parameters:
(array) (Required) ‘ip’=>$ip – Array with key as ‘ip’ and value as an IP address.


Action Name: rm_extend_front_registrations_view
Calling: do_action(‘rm_extend_front_registrations_view’)
Description: Allows attaching new HTML in ‘Registrations‘ tab of My Submissions (RM_Front_Submissions) page.
Parameters:
None

Filters

Filter Name: rm_user_activation_msg_to_admin
Calling: apply_filters(‘rm_user_activation_msg_to_admin’,$notification_msg,$params)
Description: Allows to dynamically update the notification content while sending the user activation email to admin.
Parameters:
(string) (Required) $notification_msg – Notification message content to send to the admin.
(object|stdClass) (Required) $params – Object containing notification related details.
Return:
(string) Updated message content.


Filter Name: rm_user_activation_link_to_admin
Calling: apply_filters(‘rm_user_activation_link_to_admin’,true,$params)
Description: Allows to dynamically disable the admin notification for user activation.
Parameters:
(boolean) (Required) True for enabling the notification. False for disabling it.
(object|stdClass) (Required) $params – Object containing notification related details.
Return:
(boolean) True if notification is enabled. False if it is disabled.


Filter Name: rm_login_redirection
Calling: apply_filters(‘rm_login_redirection’,$redirect_to,$user)
Description: Filter to get redirection URL after user login.
Parameters:
(string) (Required) $redirect_to – Redirection URL.
(object) (Required) $user – Object of WP_User type.
Return:
(string) Updated redirection URL.


Filter Name: rm_logout_redirection
Calling: apply_filters(‘rm_logout_redirection’,$redirect_to,$user)
Description: Filter to get redirection URL after user logout.
Parameters:
(string) (Required) $redirect_to – Redirection URL.
(object) (Required) $user – Object of WP_User type.
Return:
(string) Updated redirection URL.


Filter Name: rm_timezone_options
Calling: apply_filters(‘rm_timezone_options’,$timezones)
Description: Filter to dynamically update Timezone options.
Parameters:
(array) (Required) $timezones – Array of default timezones.
Return:
(array) Updated timezone list.


Filter Name: rm_after_front_tabtitle_listing
Calling: apply_filters(‘rm_after_front_tabtitle_listing’, array())
Description: Allows adding new tabs to My Submissions (RM_Front_Submissions) page.
Parameters:
(array) (Required) – Array of tab. Default value is empty array.
Return:
(array) Tabs with Label, Icon, & ID.


Filter Name: rm_after_front_tabcontent_listing
Calling: apply_filters(‘rm_after_front_tabcontent_listing’, ”,$user_id)
Description: Allows adding content for newly added tabs (using the ‘rm_after_front_tabtitle_listing‘ filter).
Parameters:
(string) (Required) – String of HTML code with content.
(integer) (Required) – Current user’s ID.
Return:
(string) HTML for new tabs.