mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- intermediate results with sanitizing form handlers;
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( empty( UM()->builder()->form_id ) ) {
|
||||
UM()->builder()->form_id = $this->form_id;
|
||||
@@ -9,8 +10,10 @@ if ( empty( UM()->builder()->form_id ) ) {
|
||||
|
||||
<div class="um-admin-drag-ctrls-demo um-admin-drag-ctrls">
|
||||
|
||||
<a href="javascript:void(0);" class="active" data-modal="UM_preview_form" data-modal-size="smaller" data-dynamic-content="um_admin_preview_form"
|
||||
data-arg1="<?php esc_attr( the_ID() ); ?>" data-arg2=""><?php _e('Live Preview','ultimate-member'); ?></a>
|
||||
<a href="javascript:void(0);" class="active" data-modal="UM_preview_form" data-modal-size="smaller"
|
||||
data-dynamic-content="um_admin_preview_form" data-arg1="<?php echo esc_attr( get_the_ID() ); ?>" data-arg2="">
|
||||
<?php esc_html_e( 'Live Preview', 'ultimate-member' ); ?>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -19,9 +22,7 @@ if ( empty( UM()->builder()->form_id ) ) {
|
||||
<div class="um-admin-drag">
|
||||
|
||||
<div class="um-admin-drag-ajax" data-form_id="<?php echo esc_attr( UM()->builder()->form_id ); ?>">
|
||||
|
||||
<?php UM()->builder()->show_builder(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="um-admin-drag-addrow um-admin-tipsy-n" title="<?php esc_attr_e( 'Add Master Row', 'ultimate-member' ); ?>"
|
||||
@@ -31,4 +32,4 @@ if ( empty( UM()->builder()->form_id ) ) {
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,102 +1,106 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
|
||||
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
} ?>
|
||||
|
||||
<div class="um-admin-metabox">
|
||||
<?php UM()->admin_forms( array(
|
||||
'class' => 'um-form-login-customize um-top-label',
|
||||
'prefix_id' => 'form',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => '_um_login_use_custom_settings',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Apply custom settings to this form', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Switch to yes if you want to customize this form settings, styling & appearance', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_use_custom_settings', null, 0 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
<?php
|
||||
UM()->admin_forms(
|
||||
array(
|
||||
'class' => 'um-form-login-customize um-top-label',
|
||||
'prefix_id' => 'form',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => '_um_login_use_custom_settings',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Apply custom settings to this form', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Switch to yes if you want to customize this form settings, styling & appearance', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_use_custom_settings', null, 0 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_template',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Template', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_template', null, UM()->options()->get( 'login_template' ) ),
|
||||
'options' => UM()->shortcodes()->get_templates( 'login' ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_max_width',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Max. Width (px)', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The maximum width of shortcode in pixels e.g. 600px', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_login_max_width', null, UM()->options()->get( 'login_max_width' ) ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_icons',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Field Icons', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Whether to show field icons and where to show them relative to the field', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_icons', null, UM()->options()->get( 'login_icons' ) ) ,
|
||||
'options' => array(
|
||||
'field' => __( 'Show inside text field', 'ultimate-member' ),
|
||||
'label' => __( 'Show with label', 'ultimate-member' ),
|
||||
'off' => __( 'Turn off', 'ultimate-member' )
|
||||
array(
|
||||
'id' => '_um_login_template',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Template', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_template', null, UM()->options()->get( 'login_template' ) ),
|
||||
'options' => UM()->shortcodes()->get_templates( 'login' ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_primary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_primary_btn_word', null, UM()->options()->get( 'login_primary_btn_word' ) ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_secondary_btn',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show Secondary Button', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_secondary_btn', null, UM()->options()->get( 'login_secondary_btn' ) ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_secondary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Secondary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_secondary_btn_word', null, UM()->options()->get( 'login_secondary_btn_word' ) ),
|
||||
'conditional' => array( '_um_login_secondary_btn', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_forgot_pass_link',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show Forgot Password Link?', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_forgot_pass_link', null, UM()->options()->get('login_forgot_pass_link') ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
array(
|
||||
'id' => '_um_login_max_width',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Max. Width (px)', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The maximum width of shortcode in pixels e.g. 600px', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_max_width', null, UM()->options()->get( 'login_max_width' ) ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_show_rememberme',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show "Remember Me"?', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_show_rememberme', null, UM()->options()->get('login_show_rememberme') ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
array(
|
||||
'id' => '_um_login_icons',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Field Icons', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Whether to show field icons and where to show them relative to the field', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_icons', null, UM()->options()->get( 'login_icons' ) ),
|
||||
'options' => array(
|
||||
'field' => __( 'Show inside text field', 'ultimate-member' ),
|
||||
'label' => __( 'Show with label', 'ultimate-member' ),
|
||||
'off' => __( 'Turn off', 'ultimate-member' ),
|
||||
),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_primary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_primary_btn_word', null, UM()->options()->get( 'login_primary_btn_word' ) ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_secondary_btn',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show Secondary Button', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_secondary_btn', null, UM()->options()->get( 'login_secondary_btn' ) ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_secondary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Secondary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_secondary_btn_word', null, UM()->options()->get( 'login_secondary_btn_word' ) ),
|
||||
'conditional' => array( '_um_login_secondary_btn', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_forgot_pass_link',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show Forgot Password Link?', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_forgot_pass_link', null, UM()->options()->get( 'login_forgot_pass_link' ) ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_show_rememberme',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show "Remember Me"?', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_show_rememberme', null, UM()->options()->get( 'login_show_rememberme' ) ),
|
||||
'conditional' => array( '_um_login_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
) )->render_form(); ?>
|
||||
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,34 +1,38 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
|
||||
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
} ?>
|
||||
|
||||
<div class="um-admin-metabox">
|
||||
<?php UM()->admin_forms( array(
|
||||
'class' => 'um-form-login-settings um-top-label',
|
||||
'prefix_id' => 'form',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => '_um_login_after_login',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Redirection after Login', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Change this If you want to override role redirection settings after login only.', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_after_login', null, 0 ),
|
||||
'options' => array(
|
||||
'0' => __( 'Default', 'ultimate-member' ),
|
||||
'redirect_profile' => __( 'Redirect to profile', 'ultimate-member' ),
|
||||
'redirect_url' => __( 'Redirect to URL', 'ultimate-member' ),
|
||||
'refresh' => __( 'Refresh active page', 'ultimate-member' ),
|
||||
'redirect_admin' => __( 'Redirect to WordPress Admin', 'ultimate-member' ),
|
||||
<?php
|
||||
UM()->admin_forms(
|
||||
array(
|
||||
'class' => 'um-form-login-settings um-top-label',
|
||||
'prefix_id' => 'form',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => '_um_login_after_login',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Redirection after Login', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Change this If you want to override role redirection settings after login only.', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_after_login', null, 0 ),
|
||||
'options' => array(
|
||||
'0' => __( 'Default', 'ultimate-member' ),
|
||||
'redirect_profile' => __( 'Redirect to profile', 'ultimate-member' ),
|
||||
'redirect_url' => __( 'Redirect to URL', 'ultimate-member' ),
|
||||
'refresh' => __( 'Refresh active page', 'ultimate-member' ),
|
||||
'redirect_admin' => __( 'Redirect to WordPress Admin', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_redirect_url',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Set Custom Redirect URL', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_login_redirect_url', null, 'na' ),
|
||||
'conditional' => array( '_um_login_after_login', '=', 'redirect_url' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_login_redirect_url',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Set Custom Redirect URL', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_login_redirect_url', null, 'na' ),
|
||||
'conditional' => array( '_um_login_after_login', '=', 'redirect_url' )
|
||||
)
|
||||
)
|
||||
) )->render_form(); ?>
|
||||
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,21 +1,29 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$is_core = get_post_meta( get_the_ID(), '_um_core', true ); ?>
|
||||
|
||||
<div class="um-admin-boxed-links um-admin-ajaxlink <?php if ( $is_core ) echo 'is-core-form'; ?>">
|
||||
<div class="um-admin-boxed-links um-admin-ajaxlink<?php echo $is_core ? ' is-core-form' : ''; ?>">
|
||||
|
||||
<?php if ( $is_core ) { ?>
|
||||
<p><?php _e( '<strong>Note:</strong> Form type cannot be changed for the default forms.', 'ultimate-member' ); ?></p>
|
||||
<p>
|
||||
<strong><?php esc_html_e( 'Note: ', 'ultimate-member' ); ?></strong><?php esc_html_e( 'Form type cannot be changed for the default forms.', 'ultimate-member' ); ?>
|
||||
</p>
|
||||
<?php } ?>
|
||||
|
||||
<a href="javascript:void(0);" data-role="register"><?php _e( 'Registration Form', 'ultimate-member' ); ?></a>
|
||||
<a href="javascript:void(0);" data-role="register">
|
||||
<?php esc_html_e( 'Registration Form', 'ultimate-member' ); ?>
|
||||
</a>
|
||||
|
||||
<a href="javascript:void(0);" data-role="profile"><?php _e('Profile Form', 'ultimate-member' ); ?></a>
|
||||
<a href="javascript:void(0);" data-role="profile">
|
||||
<?php esc_html_e( 'Profile Form', 'ultimate-member' ); ?>
|
||||
</a>
|
||||
|
||||
<a href="javascript:void(0);" data-role="login"><?php _e( 'Login Form', 'ultimate-member' ); ?></a>
|
||||
<a href="javascript:void(0);" data-role="login">
|
||||
<?php esc_html_e( 'Login Form', 'ultimate-member' ); ?>
|
||||
</a>
|
||||
|
||||
<input type="hidden" name="form[_um_mode]" id="form__um_mode" value="<?php echo esc_attr( UM()->query()->get_meta_value( '_um_mode', null, 'register' ) ); ?>" />
|
||||
|
||||
</div>
|
||||
<div class="um-admin-clear"></div>
|
||||
<div class="um-admin-clear"></div>
|
||||
|
||||
@@ -1,208 +1,211 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$profile_role_array = array();
|
||||
foreach ( UM()->roles()->get_roles() as $key => $value ) {
|
||||
$_um_profile_role = UM()->query()->get_meta_value( '_um_profile_role', $key );
|
||||
if ( ! empty( $_um_profile_role ) ) {
|
||||
$profile_role_array[] = $_um_profile_role;
|
||||
}
|
||||
} ?>
|
||||
|
||||
|
||||
<div class="um-admin-metabox">
|
||||
|
||||
<?php $profile_role_array = array();
|
||||
foreach ( UM()->roles()->get_roles() as $key => $value ) {
|
||||
$_um_profile_role = UM()->query()->get_meta_value( '_um_profile_role', $key );
|
||||
if ( ! empty( $_um_profile_role ) ) {
|
||||
$profile_role_array[] = $_um_profile_role;
|
||||
}
|
||||
}
|
||||
|
||||
UM()->admin_forms( array(
|
||||
'class' => 'um-form-profile-customize um-top-label',
|
||||
'prefix_id' => 'form',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => '_um_profile_use_custom_settings',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Apply custom settings to this form', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Switch to yes if you want to customize this form settings, styling & appearance', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_use_custom_settings', null, 0 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
<?php
|
||||
UM()->admin_forms(
|
||||
array(
|
||||
'class' => 'um-form-profile-customize um-top-label',
|
||||
'prefix_id' => 'form',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => '_um_profile_use_custom_settings',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Apply custom settings to this form', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Switch to yes if you want to customize this form settings, styling & appearance', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_use_custom_settings', null, 0 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_role',
|
||||
'type' => 'select',
|
||||
'multi' => true,
|
||||
'label' => __( 'Make this profile form role-specific', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Please note if you make a profile form specific to a role then you must make sure that every other role is assigned a profile form', 'ultimate-member' ),
|
||||
'value' => $profile_role_array,
|
||||
'options' => UM()->roles()->get_roles(),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_template',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Template', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_template', null, UM()->options()->get( 'profile_template' ) ),
|
||||
'options' => UM()->shortcodes()->get_templates( 'profile' ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_max_width',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Max. Width (px)', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The maximum width of shortcode in pixels e.g. 600px', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_max_width', null, UM()->options()->get( 'profile_max_width' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_area_max_width',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Profile Area Max. Width (px)', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The maximum width of the profile area inside profile (below profile header)', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_area_max_width', null, UM()->options()->get( 'profile_area_max_width' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_icons',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Field Icons', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Whether to show field icons and where to show them relative to the field', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_icons', null, UM()->options()->get( 'profile_icons' ) ),
|
||||
'options' => array(
|
||||
'field' => __( 'Show inside text field', 'ultimate-member' ),
|
||||
'label' => __( 'Show with label', 'ultimate-member' ),
|
||||
'off' => __( 'Turn off', 'ultimate-member' ),
|
||||
),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_primary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_primary_btn_word', null, UM()->options()->get( 'profile_primary_btn_word' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_secondary_btn',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show Secondary Button', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_secondary_btn', null, UM()->options()->get( 'profile_secondary_btn' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_secondary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Secondary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_secondary_btn_word', null, UM()->options()->get( 'profile_secondary_btn_word' ) ),
|
||||
'conditional' => array( '_um_profile_secondary_btn', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_cover_enabled',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Enable Cover Photos', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_cover_enabled', null, 1 ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_coversize',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Cover Photo Size', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Set the profile photo size in pixels here', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_coversize', null, UM()->options()->get( 'profile_coversize' ) ),
|
||||
'options' => UM()->files()->get_profile_photo_size( 'cover_thumb_sizes' ),
|
||||
'conditional' => array( '_um_profile_cover_enabled', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_cover_ratio',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Cover photo ratio', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The shortcode is centered by default unless you specify otherwise here', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_cover_ratio', null, UM()->options()->get( 'profile_cover_ratio' ) ),
|
||||
'options' => array(
|
||||
'1.6:1' => '1.6:1',
|
||||
'2.7:1' => '2.7:1',
|
||||
'2.2:1' => '2.2:1',
|
||||
'3.2:1' => '3.2:1',
|
||||
),
|
||||
'conditional' => array( '_um_profile_cover_enabled', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_disable_photo_upload',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Disable Profile Photo Upload', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Switch on/off the profile photo uploader', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_disable_photo_upload', null, UM()->options()->get( 'disable_profile_photo_upload' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_photosize',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Profile Photo Size', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Set the profile photo size in pixels here', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_photosize', null, UM()->options()->get( 'profile_photosize' ) ),
|
||||
'options' => UM()->files()->get_profile_photo_size( 'photo_thumb_sizes' ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_photo_required',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Make Profile Photo Required', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Require user to update a profile photo when updating their profile', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_photo_required' ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_show_name',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show display name in profile header?', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_show_name', null, 1 ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_show_social_links',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show social links in profile header?', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_show_social_links', null, UM()->options()->get( 'profile_show_social_links' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_show_bio',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show user description in profile header?', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_show_bio', null, 1 ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_role',
|
||||
'type' => 'select',
|
||||
'multi' => true,
|
||||
'label' => __( 'Make this profile form role-specific', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Please note if you make a profile form specific to a role then you must make sure that every other role is assigned a profile form', 'ultimate-member' ),
|
||||
'value' => $profile_role_array,
|
||||
'options' => UM()->roles()->get_roles(),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_template',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Template', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_template', null, UM()->options()->get( 'profile_template' ) ),
|
||||
'options' => UM()->shortcodes()->get_templates( 'profile' ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_max_width',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Max. Width (px)', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The maximum width of shortcode in pixels e.g. 600px', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_profile_max_width', null, UM()->options()->get( 'profile_max_width' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_area_max_width',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Profile Area Max. Width (px)', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The maximum width of the profile area inside profile (below profile header)', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_profile_area_max_width', null, UM()->options()->get( 'profile_area_max_width' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_icons',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Field Icons', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Whether to show field icons and where to show them relative to the field', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_icons', null, UM()->options()->get( 'profile_icons' ) ) ,
|
||||
'options' => array(
|
||||
'field' => __( 'Show inside text field', 'ultimate-member' ),
|
||||
'label' => __( 'Show with label', 'ultimate-member' ),
|
||||
'off' => __( 'Turn off', 'ultimate-member' )
|
||||
),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_primary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_primary_btn_word', null, UM()->options()->get( 'profile_primary_btn_word' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_secondary_btn',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show Secondary Button', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_secondary_btn', null, UM()->options()->get( 'profile_secondary_btn' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_secondary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Secondary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_secondary_btn_word', null, UM()->options()->get( 'profile_secondary_btn_word' ) ),
|
||||
'conditional' => array( '_um_profile_secondary_btn', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_cover_enabled',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Enable Cover Photos', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_cover_enabled', null, 1 ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_coversize',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Cover Photo Size', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Set the profile photo size in pixels here', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_coversize', null, UM()->options()->get( 'profile_coversize' ) ),
|
||||
'options' => UM()->files()->get_profile_photo_size( 'cover_thumb_sizes' ),
|
||||
'conditional' => array( '_um_profile_cover_enabled', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_cover_ratio',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Cover photo ratio', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The shortcode is centered by default unless you specify otherwise here', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_cover_ratio', null, UM()->options()->get( 'profile_cover_ratio' ) ),
|
||||
'options' => array(
|
||||
'1.6:1' => '1.6:1',
|
||||
'2.7:1' => '2.7:1',
|
||||
'2.2:1' => '2.2:1',
|
||||
'3.2:1' => '3.2:1'
|
||||
),
|
||||
'conditional' => array( '_um_profile_cover_enabled', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_disable_photo_upload',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Disable Profile Photo Upload', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Switch on/off the profile photo uploader', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_disable_photo_upload', null, UM()->options()->get( 'disable_profile_photo_upload' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_photosize',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Profile Photo Size', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Set the profile photo size in pixels here', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_photosize', null, UM()->options()->get( 'profile_photosize' ) ),
|
||||
'options' => UM()->files()->get_profile_photo_size( 'photo_thumb_sizes' ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_photo_required',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Make Profile Photo Required', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Require user to update a profile photo when updating their profile', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_photo_required' ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_show_name',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show display name in profile header?', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_show_name', null, 1 ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_show_social_links',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show social links in profile header?', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_show_social_links', null, UM()->options()->get( 'profile_show_social_links' ) ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_profile_show_bio',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show user description in profile header?', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_profile_show_bio', null, 1 ),
|
||||
'conditional' => array( '_um_profile_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
|
||||
)
|
||||
) )->render_form(); ?>
|
||||
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,32 +1,37 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$user_fields = array();
|
||||
foreach ( UM()->builtin()->all_user_fields() as $key => $arr ) {
|
||||
$user_fields[ $key ] = isset( $arr['title'] ) ? $arr['title'] : '';
|
||||
}
|
||||
|
||||
$post_id = get_the_ID();
|
||||
$_um_search_fields = get_post_meta( $post_id, '_um_profile_metafields', true );
|
||||
$_um_search_fields = empty( $_um_search_fields ) ? array() : $_um_search_fields; ?>
|
||||
|
||||
|
||||
<div class="um-admin-metabox">
|
||||
<?php $user_fields = array();
|
||||
foreach ( UM()->builtin()->all_user_fields() as $key => $arr ) {
|
||||
$user_fields[ $key ] = isset( $arr['title'] ) ? $arr['title'] : '';
|
||||
}
|
||||
|
||||
$post_id = get_the_ID();
|
||||
$_um_search_fields = get_post_meta( $post_id, '_um_profile_metafields', true );
|
||||
$_um_search_fields = empty( $_um_search_fields ) ? array() : $_um_search_fields;
|
||||
|
||||
UM()->admin_forms( array(
|
||||
'class' => 'um-form-profile-settings um-top-label',
|
||||
'prefix_id' => 'form',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => '_um_profile_metafields',
|
||||
'type' => 'multi_selects',
|
||||
'label' => __( 'Field(s) to show in user meta', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Fields selected here will appear in the profile header area below the user\'s display name', 'ultimate-member' ),
|
||||
'value' => $_um_search_fields,
|
||||
'options' => $user_fields,
|
||||
'add_text' => __( 'Add New Field', 'ultimate-member' ),
|
||||
'show_default_number' => 0,
|
||||
)
|
||||
<?php
|
||||
UM()->admin_forms(
|
||||
array(
|
||||
'class' => 'um-form-profile-settings um-top-label',
|
||||
'prefix_id' => 'form',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => '_um_profile_metafields',
|
||||
'type' => 'multi_selects',
|
||||
'label' => __( 'Field(s) to show in user meta', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Fields selected here will appear in the profile header area below the user\'s display name', 'ultimate-member' ),
|
||||
'value' => $_um_search_fields,
|
||||
'options' => $user_fields,
|
||||
'add_text' => __( 'Add New Field', 'ultimate-member' ),
|
||||
'show_default_number' => 0,
|
||||
),
|
||||
),
|
||||
)
|
||||
) )->render_form(); ?>
|
||||
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,95 +1,99 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
foreach ( UM()->roles()->get_roles( __( 'Default', 'ultimate-member' ) ) as $key => $value ) {
|
||||
$_um_register_role = UM()->query()->get_meta_value( '_um_register_role', $key );
|
||||
if ( ! empty( $_um_register_role ) ) {
|
||||
$register_role = $_um_register_role;
|
||||
}
|
||||
} ?>
|
||||
|
||||
<div class="um-admin-metabox">
|
||||
|
||||
<?php foreach ( UM()->roles()->get_roles( __( 'Default', 'ultimate-member' ) ) as $key => $value ) {
|
||||
$_um_register_role = UM()->query()->get_meta_value( '_um_register_role', $key );
|
||||
if ( ! empty( $_um_register_role ) )
|
||||
$register_role = $_um_register_role;
|
||||
}
|
||||
|
||||
UM()->admin_forms( array(
|
||||
'class' => 'um-form-register-customize um-top-label',
|
||||
'prefix_id' => 'form',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => '_um_register_use_custom_settings',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Apply custom settings to this form', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Switch to yes if you want to customize this form settings, styling & appearance', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_use_custom_settings', null, 0 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
<?php
|
||||
UM()->admin_forms(
|
||||
array(
|
||||
'class' => 'um-form-register-customize um-top-label',
|
||||
'prefix_id' => 'form',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => '_um_register_use_custom_settings',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Apply custom settings to this form', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Switch to yes if you want to customize this form settings, styling & appearance', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_use_custom_settings', null, 0 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_role',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Assign role to form', 'ultimate-member' ),
|
||||
'value' => ! empty( $register_role ) ? $register_role : 0,
|
||||
'options' => UM()->roles()->get_roles( __( 'Default', 'ultimate-member' ) ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_template',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Template', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_template', null, UM()->options()->get( 'register_template' ) ),
|
||||
'options' => UM()->shortcodes()->get_templates( 'register' ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_max_width',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Max. Width (px)', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The maximum width of shortcode in pixels e.g. 600px', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_max_width', null, UM()->options()->get( 'register_max_width' ) ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_icons',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Field Icons', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Whether to show field icons and where to show them relative to the field', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_icons', null, UM()->options()->get( 'register_icons' ) ),
|
||||
'options' => array(
|
||||
'field' => __( 'Show inside text field', 'ultimate-member' ),
|
||||
'label' => __( 'Show with label', 'ultimate-member' ),
|
||||
'off' => __( 'Turn off', 'ultimate-member' ),
|
||||
),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_primary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_primary_btn_word', null, UM()->options()->get( 'register_primary_btn_word' ) ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_secondary_btn',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show Secondary Button', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_secondary_btn', null, UM()->options()->get( 'register_secondary_btn' ) ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_secondary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Secondary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_secondary_btn_word', null, UM()->options()->get( 'register_secondary_btn_word' ) ),
|
||||
'conditional' => array( '_um_register_secondary_btn', '=', 1 ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_role',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Assign role to form', 'ultimate-member' ),
|
||||
'value' => ! empty( $register_role ) ? $register_role : 0,
|
||||
'options' => UM()->roles()->get_roles( __( 'Default', 'ultimate-member' ) ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_template',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Template', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_template', null, UM()->options()->get( 'register_template' ) ),
|
||||
'options' => UM()->shortcodes()->get_templates( 'register' ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_max_width',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Max. Width (px)', 'ultimate-member' ),
|
||||
'tooltip' => __( 'The maximum width of shortcode in pixels e.g. 600px', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_register_max_width', null, UM()->options()->get( 'register_max_width' ) ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_icons',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Field Icons', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Whether to show field icons and where to show them relative to the field', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_icons', null, UM()->options()->get( 'register_icons' ) ) ,
|
||||
'options' => array(
|
||||
'field' => __( 'Show inside text field', 'ultimate-member' ),
|
||||
'label' => __( 'Show with label', 'ultimate-member' ),
|
||||
'off' => __( 'Turn off', 'ultimate-member' )
|
||||
),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_primary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Primary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_primary_btn_word', null, UM()->options()->get( 'register_primary_btn_word' ) ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_secondary_btn',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Show Secondary Button', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_secondary_btn', null, UM()->options()->get( 'register_secondary_btn' ) ),
|
||||
'conditional' => array( '_um_register_use_custom_settings', '=', 1 ),
|
||||
'options' => array(
|
||||
0 => __( 'No', 'ultimate-member' ),
|
||||
1 => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_secondary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Secondary Button Text', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Customize the button text', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_secondary_btn_word', null, UM()->options()->get( 'register_secondary_btn_word' ) ),
|
||||
'conditional' => array( '_um_register_secondary_btn', '=', 1 )
|
||||
)
|
||||
)
|
||||
) )->render_form(); ?>
|
||||
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,74 +1,76 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$options = array(
|
||||
'' => __( 'Select page', 'ultimate-member' ),
|
||||
);
|
||||
|
||||
$pages = get_pages();
|
||||
foreach ( $pages as $page ) {
|
||||
$options[ $page->ID ] = $page->post_title;
|
||||
} ?>
|
||||
|
||||
<div class="um-admin-metabox">
|
||||
|
||||
<?php
|
||||
$options = array(
|
||||
'' => __( 'Select page', 'ultimate-member' )
|
||||
);
|
||||
|
||||
$pages = get_pages();
|
||||
foreach ( $pages as $page ) {
|
||||
$options[$page->ID] = $page->post_title;
|
||||
}
|
||||
|
||||
UM()->admin_forms( array(
|
||||
'class' => 'um-form-register-gdpr um-top-label',
|
||||
'prefix_id' => 'form',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => '_um_register_use_gdpr',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Enable on this form', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_use_gdpr', null, '' ),
|
||||
'options' => array(
|
||||
'0' => __( 'No', 'ultimate-member' ),
|
||||
'1' => __( 'Yes', 'ultimate-member' )
|
||||
UM()->admin_forms(
|
||||
array(
|
||||
'class' => 'um-form-register-gdpr um-top-label',
|
||||
'prefix_id' => 'form',
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => '_um_register_use_gdpr',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Enable on this form', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_use_gdpr', null, '' ),
|
||||
'options' => array(
|
||||
'0' => __( 'No', 'ultimate-member' ),
|
||||
'1' => __( 'Yes', 'ultimate-member' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_use_gdpr_content_id',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Content', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_use_gdpr_content_id', null, '' ),
|
||||
'options' => $options,
|
||||
'conditional' => array( '_um_register_use_gdpr', '=', '1' ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_use_gdpr_toggle_show',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Toggle Show text', 'ultimate-member' ),
|
||||
'placeholder' => __( 'Show privacy policy', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_use_gdpr_toggle_show', null, __( 'Show privacy policy', 'ultimate-member' ) ),
|
||||
'conditional' => array( '_um_register_use_gdpr', '=', '1' ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_use_gdpr_toggle_hide',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Toggle Hide text', 'ultimate-member' ),
|
||||
'placeholder' => __( 'Hide privacy policy', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_use_gdpr_toggle_hide', null, __( 'Hide privacy policy', 'ultimate-member' ) ),
|
||||
'conditional' => array( '_um_register_use_gdpr', '=', '1' ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_use_gdpr_agreement',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Checkbox agreement description', 'ultimate-member' ),
|
||||
'placeholder' => __( 'Please confirm that you agree to our privacy policy', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_use_gdpr_agreement', null, __( 'Please confirm that you agree to our privacy policy', 'ultimate-member' ) ),
|
||||
'conditional' => array( '_um_register_use_gdpr', '=', '1' ),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_use_gdpr_error_text',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Error Text', 'ultimate-member' ),
|
||||
'placeholder' => __( 'Please confirm your acceptance of our privacy policy', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value( '_um_register_use_gdpr_error_text', null, __( 'Please confirm your acceptance of our privacy policy', 'ultimate-member' ) ),
|
||||
'conditional' => array( '_um_register_use_gdpr', '=', '1' ),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_use_gdpr_content_id',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Content', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_register_use_gdpr_content_id', null, '' ),
|
||||
'options' => $options,
|
||||
'conditional' => array( '_um_register_use_gdpr', '=', '1' )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_use_gdpr_toggle_show',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Toggle Show text', 'ultimate-member' ),
|
||||
'placeholder' => __( 'Show privacy policy', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_register_use_gdpr_toggle_show', null, __( 'Show privacy policy', 'ultimate-member' ) ),
|
||||
'conditional' => array( '_um_register_use_gdpr', '=', '1' )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_use_gdpr_toggle_hide',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Toggle Hide text', 'ultimate-member' ),
|
||||
'placeholder' => __( 'Hide privacy policy', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_register_use_gdpr_toggle_hide', null, __( 'Hide privacy policy', 'ultimate-member' ) ),
|
||||
'conditional' => array( '_um_register_use_gdpr', '=', '1' )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_use_gdpr_agreement',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Checkbox agreement description', 'ultimate-member' ),
|
||||
'placeholder' => __( 'Please confirm that you agree to our privacy policy', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_register_use_gdpr_agreement', null, __( 'Please confirm that you agree to our privacy policy', 'ultimate-member' ) ),
|
||||
'conditional' => array( '_um_register_use_gdpr', '=', '1' )
|
||||
),
|
||||
array(
|
||||
'id' => '_um_register_use_gdpr_error_text',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Error Text', 'ultimate-member' ),
|
||||
'placeholder' => __( 'Please confirm your acceptance of our privacy policy', 'ultimate-member' ),
|
||||
'value' => UM()->query()->get_meta_value('_um_register_use_gdpr_error_text', null, __( 'Please confirm your acceptance of our privacy policy', 'ultimate-member' ) ),
|
||||
'conditional' => array( '_um_register_use_gdpr', '=', '1' )
|
||||
)
|
||||
)
|
||||
) )->render_form(); ?>
|
||||
|
||||
)->render_form();
|
||||
?>
|
||||
<div class="um-admin-clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user