Files
ultimatemember/includes/admin/templates/role/register.php
T
nikitozzzzzzz 9e53314c3a !!! IMPORTANT 2.0 version before upgrade please run full backup of your site !!!
- new code structure, optimized for next development;
  - created spl_autoloader for remove includes;
  - UM classes with namespaces;
  - deprecated global $ultimatemember; variable (use UM() instead);
- new UM/WP roles logic;
- new settings class and logic (deprecated Redux framework, deprecated some old options, added some new options);
- new dependencies class for extensions;
- WP native styles for backend fields;
- new upgrades and license activations for extensions;
- new logic form backend forms and fields;
- created uninstall.php file for delete permanently all UM settings;
- optimized registration/upgrade profile process;

Deprecated Hooks:

um_new_user_registration_plain
um_user_registration_extra_hook
um_add_user_frontend
um_post_registration_global_hook
um_admin_extend_directory_options_general (was action...will be filter)
2017-07-26 14:57:52 +03:00

122 lines
7.0 KiB
PHP

<div class="um-admin-metabox">
<?php $role = $object['data'];
UM()->admin_forms( array(
'class' => 'um-role-register um-half-column',
'prefix_id' => 'role',
'fields' => array(
array(
'id' => '_um_status',
'type' => 'select',
'name' => '_um_status',
'label' => __( 'Registration Status', 'ultimate-member' ),
'tooltip' => __( 'Select the status you would like this user role to have after they register on your site', 'ultimate-member' ),
'value' => ! empty( $role['_um_status'] ) ? $role['_um_status'] : array(),
'options' => array(
'approved' => __( 'Auto Approve', 'ultimate-member' ),
'checkmail' => __( 'Require Email Activation', 'ultimate-member' ),
'pending' => __( 'Require Admin Review', 'ultimate-member' )
),
),
array(
'id' => '_um_auto_approve_act',
'type' => 'select',
'name' => '_um_auto_approve_act',
'label' => __( 'Action to be taken after registration', 'ultimate-member' ),
'tooltip' => __( 'Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message', 'ultimate-member' ),
'value' => ! empty( $role['_um_auto_approve_act'] ) ? $role['_um_auto_approve_act'] : array(),
'options' => array(
'redirect_profile' => __( 'Redirect to profile', 'ultimate-member' ),
'redirect_url' => __( 'Redirect to URL', 'ultimate-member' ),
),
'conditional' => array( '_um_status', '=', 'approved' )
),
array(
'id' => '_um_auto_approve_url',
'type' => 'text',
'name' => '_um_auto_approve_url',
'label' => __( 'Set Custom Redirect URL', 'ultimate-member' ),
'value' => ! empty( $role['_um_auto_approve_url'] ) ? $role['_um_auto_approve_url'] : '',
'conditional' => array( '_um_auto_approve_act', '=', 'redirect_url' )
),
array(
'id' => '_um_login_email_activate',
'type' => 'checkbox',
'name' => '_um_login_email_activate',
'label' => __( 'Login user after validating the activation link?', 'ultimate-member' ),
'tooltip' => __( 'Login the user after validating the activation link', 'ultimate-member' ),
'value' => ! empty( $role['_um_login_email_activate'] ) ? $role['_um_login_email_activate'] : 0,
'conditional' => array( '_um_status', '=', 'checkmail' )
),
array(
'id' => '_um_checkmail_action',
'type' => 'select',
'name' => '_um_checkmail_action',
'label' => __( 'Action to be taken after registration', 'ultimate-member' ),
'tooltip' => __( 'Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message', 'ultimate-member' ),
'value' => ! empty( $role['_um_checkmail_action'] ) ? $role['_um_checkmail_action'] : array(),
'options' => array(
'show_message' => __( 'Show custom message', 'ultimate-member' ),
'redirect_url' => __( 'Redirect to URL', 'ultimate-member' ),
),
'conditional' => array( '_um_status', '=', 'checkmail' )
),
array(
'id' => '_um_checkmail_message',
'type' => 'textarea',
'name' => '_um_checkmail_message',
'label' => __( 'Personalize the custom message', 'ultimate-member' ),
'value' => ! empty( $role['_um_checkmail_message'] ) ? $role['_um_checkmail_message'] : '',
'conditional' => array( '_um_checkmail_action', '=', 'show_message' )
),
array(
'id' => '_um_checkmail_url',
'type' => 'text',
'name' => '_um_checkmail_url',
'label' => __( 'Set Custom Redirect URL', 'ultimate-member' ),
'value' => ! empty( $role['_um_checkmail_url'] ) ? $role['_um_checkmail_url'] : '',
'conditional' => array( '_um_checkmail_action', '=', 'redirect_url' )
),
array(
'id' => '_um_url_email_activate',
'type' => 'text',
'name' => '_um_url_email_activate',
'label' => __( 'URL redirect after e-mail activation', 'ultimate-member' ),
'tooltip' => __( 'If you want users to go to a specific page other than login page after e-mail activation, enter the URL here.', 'ultimate-member' ),
'value' => ! empty( $role['_um_url_email_activate'] ) ? $role['_um_url_email_activate'] : '',
'conditional' => array( '_um_status', '=', 'checkmail' ),
),
array(
'id' => '_um_pending_action',
'type' => 'select',
'name' => '_um_pending_action',
'label' => __( 'Action to be taken after registration', 'ultimate-member' ),
'tooltip' => __( 'Select what action is taken after a person registers on your site. Depending on the status you can redirect them to their profile, a custom url or show a custom message', 'ultimate-member' ),
'value' => ! empty( $role['_um_pending_action'] ) ? $role['_um_pending_action'] : array(),
'options' => array(
'show_message' => __( 'Show custom message', 'ultimate-member' ),
'redirect_url' => __( 'Redirect to URL', 'ultimate-member' ),
),
'conditional' => array( '_um_status', '=', 'pending' )
),
array(
'id' => '_um_pending_message',
'type' => 'textarea',
'name' => '_um_pending_message',
'label' => __( 'Personalize the custom message', 'ultimate-member' ),
'value' => ! empty( $role['_um_pending_message'] ) ? $role['_um_pending_message'] : '',
'conditional' => array( '_um_pending_action', '=', 'show_message' )
),
array(
'id' => '_um_pending_url',
'type' => 'text',
'name' => '_um_pending_url',
'label' => __( 'Set Custom Redirect URL', 'ultimate-member' ),
'conditional' => array( '_um_pending_action', '=', 'redirect_url' ),
'value' => ! empty( $role['_um_pending_url'] ) ? $role['_um_pending_url'] : '',
),
)
) )->render_form(); ?>
</div>