2017-07-26 14:57:52 +03:00
< div class = " um-admin-metabox " >
< ? php
foreach ( UM () -> roles () -> get_roles ( __ ( 'All roles' , 'ultimate-member' ) ) as $key => $value ) {
2018-01-12 12:32:32 +02:00
$_um_profile_role = UM () -> query () -> get_meta_value ( '_um_profile_role' , $key );
if ( ! empty ( $_um_profile_role ) )
$profile_role = $_um_profile_role ;
2017-07-26 14:57:52 +03:00
}
UM () -> admin_forms ( array (
'class' => 'um-form-profile-customize um-top-label' ,
'prefix_id' => 'form' ,
'fields' => array (
array (
2017-08-03 10:52:40 +03:00
'id' => '_um_profile_use_custom_settings' ,
2017-07-26 14:57:52 +03:00
'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' ),
2017-08-03 10:52:40 +03:00
'value' => UM () -> query () -> get_meta_value ( '_um_profile_use_custom_settings' , null , 0 ),
2017-07-26 14:57:52 +03:00
'options' => array (
0 => __ ( 'No' , 'ultimate-member' ),
1 => __ ( 'Yes' , 'ultimate-member' ),
),
),
array (
'id' => '_um_profile_role' ,
'type' => 'select' ,
2017-08-03 10:52:40 +03:00
'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' ),
2017-07-26 14:57:52 +03:00
'value' => ! empty ( $profile_role ) ? $profile_role : 0 ,
'options' => UM () -> roles () -> get_roles ( __ ( 'All roles' , 'ultimate-member' ) ),
2017-08-03 10:52:40 +03:00
'conditional' => array ( '_um_profile_use_custom_settings' , '=' , 1 )
2017-07-26 14:57:52 +03:00
),
array (
'id' => '_um_profile_template' ,
'type' => 'select' ,
'label' => __ ( 'Template' , 'ultimate-member' ),
2017-12-12 11:13:02 +02:00
'value' => UM () -> query () -> get_meta_value ( '_um_profile_template' , null , UM () -> options () -> get ( 'profile_template' ) ),
2017-07-26 14:57:52 +03:00
'options' => UM () -> shortcodes () -> get_templates ( 'profile' ),
2017-08-03 10:52:40 +03:00
'conditional' => array ( '_um_profile_use_custom_settings' , '=' , 1 )
2017-07-26 14:57:52 +03:00
),
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' ),
2017-12-12 11:13:02 +02:00
'value' => UM () -> query () -> get_meta_value ( '_um_profile_max_width' , null , UM () -> options () -> get ( 'profile_max_width' ) ),
2017-08-03 10:52:40 +03:00
'conditional' => array ( '_um_profile_use_custom_settings' , '=' , 1 )
2017-07-26 14:57:52 +03:00
),
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' ),
2017-12-12 11:13:02 +02:00
'value' => UM () -> query () -> get_meta_value ( '_um_profile_area_max_width' , null , UM () -> options () -> get ( 'profile_area_max_width' ) ),
2017-08-03 10:52:40 +03:00
'conditional' => array ( '_um_profile_use_custom_settings' , '=' , 1 )
2017-07-26 14:57:52 +03:00
),
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' ),
2017-12-12 11:13:02 +02:00
'value' => UM () -> query () -> get_meta_value ( '_um_profile_icons' , null , UM () -> options () -> get ( 'profile_icons' ) ) ,
2017-07-26 14:57:52 +03:00
'options' => array (
'field' => __ ( 'Show inside text field' , 'ultimate-member' ),
'label' => __ ( 'Show with label' , 'ultimate-member' ),
'off' => __ ( 'Turn off' , 'ultimate-member' )
),
2017-08-03 10:52:40 +03:00
'conditional' => array ( '_um_profile_use_custom_settings' , '=' , 1 )
2017-07-26 14:57:52 +03:00
),
array (
'id' => '_um_profile_primary_btn_word' ,
'type' => 'text' ,
'label' => __ ( 'Primary Button Text' , 'ultimate-member' ),
'tooltip' => __ ( 'Customize the button text' , 'ultimate-member' ),
2017-12-12 11:13:02 +02:00
'value' => UM () -> query () -> get_meta_value ( '_um_profile_primary_btn_word' , null , UM () -> options () -> get ( 'profile_primary_btn_word' ) ),
2017-08-03 10:52:40 +03:00
'conditional' => array ( '_um_profile_use_custom_settings' , '=' , 1 )
2017-07-26 14:57:52 +03:00
),
array (
'id' => '_um_profile_secondary_btn' ,
2017-08-30 16:01:43 +03:00
'type' => 'select' ,
2017-07-26 14:57:52 +03:00
'label' => __ ( 'Show Secondary Button' , 'ultimate-member' ),
2017-12-12 11:13:02 +02:00
'value' => UM () -> query () -> get_meta_value ( '_um_profile_secondary_btn' , null , UM () -> options () -> get ( 'profile_secondary_btn' ) ),
2017-08-30 16:01:43 +03:00
'conditional' => array ( '_um_profile_use_custom_settings' , '=' , 1 ),
'options' => array (
0 => __ ( 'No' , 'ultimate-member' ),
1 => __ ( 'Yes' , 'ultimate-member' ),
),
2017-07-26 14:57:52 +03:00
),
2017-08-30 16:01:43 +03:00
array (
2017-07-26 14:57:52 +03:00
'id' => '_um_profile_secondary_btn_word' ,
'type' => 'text' ,
'label' => __ ( 'Primary Button Text' , 'ultimate-member' ),
'tooltip' => __ ( 'Customize the button text' , 'ultimate-member' ),
2017-12-12 11:13:02 +02:00
'value' => UM () -> query () -> get_meta_value ( '_um_profile_secondary_btn_word' , null , UM () -> options () -> get ( 'profile_secondary_btn_word' ) ),
2017-07-26 14:57:52 +03:00
'conditional' => array ( '_um_profile_secondary_btn' , '=' , 1 )
),
array (
'id' => '_um_profile_cover_enabled' ,
2017-09-04 16:52:42 +03:00
'type' => 'select' ,
2017-07-26 14:57:52 +03:00
'label' => __ ( 'Enable Cover Photos' , 'ultimate-member' ),
'value' => UM () -> query () -> get_meta_value ( '_um_profile_cover_enabled' , null , 1 ),
2017-09-04 16:52:42 +03:00
'conditional' => array ( '_um_profile_use_custom_settings' , '=' , 1 ),
'options' => array (
0 => __ ( 'No' , 'ultimate-member' ),
1 => __ ( 'Yes' , 'ultimate-member' ),
),
2017-07-26 14:57:52 +03:00
),
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' ),
2017-12-12 11:13:02 +02:00
'value' => UM () -> query () -> get_meta_value ( '_um_profile_cover_ratio' , null , UM () -> options () -> get ( 'profile_cover_ratio' ) ),
2017-07-26 14:57:52 +03:00
'options' => array (
'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_photosize' ,
'type' => 'text' ,
'label' => __ ( 'Profile Photo Size' , 'ultimate-member' ),
'tooltip' => __ ( 'Set the profile photo size in pixels here' , 'ultimate-member' ),
2017-12-12 11:13:02 +02:00
'value' => UM () -> query () -> get_meta_value ( '_um_profile_photosize' , null , UM () -> options () -> get ( 'profile_photosize' ) ),
2017-08-03 10:52:40 +03:00
'conditional' => array ( '_um_profile_use_custom_settings' , '=' , 1 )
2017-07-26 14:57:52 +03:00
),
array (
'id' => '_um_profile_photo_required' ,
2017-09-04 16:52:42 +03:00
'type' => 'select' ,
2017-07-26 14:57:52 +03:00
'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' ),
2017-09-04 16:52:42 +03:00
'conditional' => array ( '_um_profile_use_custom_settings' , '=' , 1 ),
'options' => array (
0 => __ ( 'No' , 'ultimate-member' ),
1 => __ ( 'Yes' , 'ultimate-member' ),
),
2017-07-26 14:57:52 +03:00
),
array (
'id' => '_um_profile_show_name' ,
2017-09-04 16:52:42 +03:00
'type' => 'select' ,
2017-07-26 14:57:52 +03:00
'label' => __ ( 'Show display name in profile header?' , 'ultimate-member' ),
'value' => UM () -> query () -> get_meta_value ( '_um_profile_show_name' , null , 1 ),
2017-09-04 16:52:42 +03:00
'conditional' => array ( '_um_profile_use_custom_settings' , '=' , 1 ),
'options' => array (
0 => __ ( 'No' , 'ultimate-member' ),
1 => __ ( 'Yes' , 'ultimate-member' ),
),
2017-07-26 14:57:52 +03:00
),
array (
'id' => '_um_profile_show_social_links' ,
2017-09-04 16:52:42 +03:00
'type' => 'select' ,
2017-07-26 14:57:52 +03:00
'label' => __ ( 'Show social links in profile header?' , 'ultimate-member' ),
2017-12-12 11:13:02 +02:00
'value' => UM () -> query () -> get_meta_value ( '_um_profile_show_social_links' , null , UM () -> options () -> get ( 'profile_show_social_links' ) ),
2017-09-04 16:52:42 +03:00
'conditional' => array ( '_um_profile_use_custom_settings' , '=' , 1 ),
'options' => array (
0 => __ ( 'No' , 'ultimate-member' ),
1 => __ ( 'Yes' , 'ultimate-member' ),
),
2017-07-26 14:57:52 +03:00
),
array (
'id' => '_um_profile_show_bio' ,
2017-09-04 16:52:42 +03:00
'type' => 'select' ,
2017-07-26 14:57:52 +03:00
'label' => __ ( 'Show user description in profile header?' , 'ultimate-member' ),
'value' => UM () -> query () -> get_meta_value ( '_um_profile_show_bio' , null , 1 ),
2017-09-04 16:52:42 +03:00
'conditional' => array ( '_um_profile_use_custom_settings' , '=' , 1 ),
'options' => array (
0 => __ ( 'No' , 'ultimate-member' ),
1 => __ ( 'Yes' , 'ultimate-member' ),
),
2017-07-26 14:57:52 +03:00
),
)
) ) -> render_form (); ?>
<div class="um-admin-clear"></div>
</div>