mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- added ability to set cover/avatar size from predefined sizes in Ultimate Member -> Settings -> General -> Uploads;
This commit is contained in:
@@ -699,193 +699,204 @@ if ( ! class_exists( 'um\admin\core\Admin_Settings' ) ) {
|
||||
'title' => __( 'Profile', 'ultimate-member' ),
|
||||
'fields' => array(
|
||||
array(
|
||||
'id' => 'profile_template',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Profile Default Template','ultimate-member' ),
|
||||
'tooltip' => __( 'This will be the default template to output profile','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_template'),
|
||||
'options' => UM()->shortcodes()->get_templates( 'profile' ),
|
||||
'size' => 'small'
|
||||
'id' => 'profile_template',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Profile Default Template', 'ultimate-member' ),
|
||||
'tooltip' => __( 'This will be the default template to output profile', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_template' ),
|
||||
'options' => UM()->shortcodes()->get_templates( 'profile' ),
|
||||
'size' => 'small'
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_max_width',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Profile Maximum Width','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_max_width'),
|
||||
'tooltip' => 'The maximum width this shortcode can take from the page width',
|
||||
'size' => 'small'
|
||||
'id' => 'profile_max_width',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Profile Maximum Width', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_max_width' ),
|
||||
'tooltip' => __( 'The maximum width this shortcode can take from the page width', 'ultimate-member' ),
|
||||
'size' => 'small'
|
||||
),
|
||||
|
||||
array(
|
||||
'id' => 'profile_area_max_width',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Profile Area Maximum Width','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_area_max_width'),
|
||||
'tooltip' => __('The maximum width of the profile area inside profile (below profile header)','ultimate-member'),
|
||||
'size' => 'small'
|
||||
'id' => 'profile_area_max_width',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Profile Area Maximum Width', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_area_max_width' ),
|
||||
'tooltip' => __( 'The maximum width of the profile area inside profile (below profile header)', 'ultimate-member' ),
|
||||
'size' => 'small'
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_icons',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Profile Field Icons','ultimate-member' ),
|
||||
'tooltip' => __( 'This is applicable for edit mode only','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_icons'),
|
||||
'options' => array(
|
||||
'field' => __('Show inside text field','ultimate-member'),
|
||||
'label' => __('Show with label','ultimate-member'),
|
||||
'off' => __('Turn off','ultimate-member'),
|
||||
'id' => 'profile_icons',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Profile Field Icons', 'ultimate-member' ),
|
||||
'tooltip' => __( 'This is applicable for edit mode only', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_icons' ),
|
||||
'options' => array(
|
||||
'field' => __( 'Show inside text field', 'ultimate-member' ),
|
||||
'label' => __( 'Show with label', 'ultimate-member' ),
|
||||
'off' => __( 'Turn off', 'ultimate-member' ),
|
||||
),
|
||||
'size' => 'small'
|
||||
'size' => 'small'
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_primary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Profile Primary Button Text','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_primary_btn_word'),
|
||||
'tooltip' => __('The text that is used for updating profile button','ultimate-member'),
|
||||
'id' => 'profile_primary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Profile Primary Button Text','ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_primary_btn_word' ),
|
||||
'tooltip' => __( 'The text that is used for updating profile button', 'ultimate-member' ),
|
||||
'size' => 'medium'
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_secondary_btn',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Profile Secondary Button', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_secondary_btn' ),
|
||||
'tooltip' => __( 'Switch on/off the secondary button display in the form', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_secondary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Profile Secondary Button Text', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_secondary_btn_word' ),
|
||||
'tooltip' => __( 'The text that is used for cancelling update profile button', 'ultimate-member' ),
|
||||
'conditional' => array( 'profile_secondary_btn', '=', 1 ),
|
||||
'size' => 'medium'
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_secondary_btn',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Profile Secondary Button','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_secondary_btn'),
|
||||
'tooltip' => __('Switch on/off the secondary button display in the form','ultimate-member'),
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_secondary_btn_word',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Profile Secondary Button Text','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_secondary_btn_word'),
|
||||
'tooltip' => __('The text that is used for cancelling update profile button','ultimate-member'),
|
||||
'conditional' => array( 'profile_secondary_btn', '=', 1 ),
|
||||
'size' => 'medium'
|
||||
),
|
||||
array(
|
||||
'id' => 'default_avatar',
|
||||
'type' => 'media',
|
||||
'label' => __('Default Profile Photo', 'ultimate-member'),
|
||||
'tooltip' => __('You can change the default profile picture globally here. Please make sure that the photo is 300x300px.', 'ultimate-member'),
|
||||
'upload_frame_title'=> __('Select Default Profile Photo', 'ultimate-member'),
|
||||
'default' => array(
|
||||
'url' => um_url . 'assets/img/default_avatar.jpg',
|
||||
'id' => 'default_avatar',
|
||||
'type' => 'media',
|
||||
'label' => __( 'Default Profile Photo', 'ultimate-member' ),
|
||||
'tooltip' => __( 'You can change the default profile picture globally here. Please make sure that the photo is 300x300px.', 'ultimate-member' ),
|
||||
'upload_frame_title' => __( 'Select Default Profile Photo', 'ultimate-member' ),
|
||||
'default' => array(
|
||||
'url' => um_url . 'assets/img/default_avatar.jpg',
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => 'default_cover',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'preview' => false,
|
||||
'label' => __('Default Cover Photo', 'ultimate-member'),
|
||||
'tooltip' => __('You can change the default cover photo globally here. Please make sure that the default cover is large enough and respects the ratio you are using for cover photos.', 'ultimate-member'),
|
||||
'upload_frame_title'=> __('Select Default Cover Photo', 'ultimate-member'),
|
||||
'id' => 'default_cover',
|
||||
'type' => 'media',
|
||||
'url' => true,
|
||||
'preview' => false,
|
||||
'label' => __( 'Default Cover Photo', 'ultimate-member' ),
|
||||
'tooltip' => __( 'You can change the default cover photo globally here. Please make sure that the default cover is large enough and respects the ratio you are using for cover photos.', 'ultimate-member'),
|
||||
'upload_frame_title' => __( 'Select Default Cover Photo', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'disable_profile_photo_upload',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Disable Profile Photo Upload', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Switch on/off the profile photo uploader', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'disable_profile_photo_upload' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_photosize',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Profile Photo Size','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_photosize'),
|
||||
'tooltip' => __('The global default of profile photo size. This can be overridden by individual form settings','ultimate-member'),
|
||||
'id' => 'profile_photosize',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Profile Photo Size', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_photosize' ),
|
||||
'options' => UM()->files()->get_profile_photo_size( 'photo_thumb_sizes' ),
|
||||
'tooltip' => __( 'The global default of profile photo size. This can be overridden by individual form settings', 'ultimate-member' ),
|
||||
'size' => 'small'
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_cover_enabled',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Profile Cover Photos', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_cover_enabled' ),
|
||||
'tooltip' => __( 'Switch on/off the profile cover photos', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_coversize',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Profile Cover Size', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_coversize' ),
|
||||
'options' => UM()->files()->get_profile_photo_size( 'cover_thumb_sizes' ),
|
||||
'tooltip' => __( 'The global default width of cover photo size. This can be overridden by individual form settings', 'ultimate-member' ),
|
||||
'conditional' => array( 'profile_cover_enabled', '=', 1 ),
|
||||
'size' => 'small'
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_cover_enabled',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Profile Cover Photos','ultimate-member' ),
|
||||
'default' => 1,
|
||||
'tooltip' => __('Switch on/off the profile cover photos','ultimate-member'),
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_cover_ratio',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Profile Cover Ratio','ultimate-member' ),
|
||||
'tooltip' => __( 'Choose global ratio for cover photos of profiles','ultimate-member' ),
|
||||
'default' => um_get_metadefault('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',
|
||||
'id' => 'profile_cover_ratio',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Profile Cover Ratio', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Choose global ratio for cover photos of profiles', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( '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( 'profile_cover_enabled', '=', 1 ),
|
||||
'conditional' => array( 'profile_cover_enabled', '=', 1 ),
|
||||
'size' => 'small'
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_show_metaicon',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Profile Header Meta Text Icon','ultimate-member' ),
|
||||
'default' => 0,
|
||||
'tooltip' => __('Display field icons for related user meta fields in header or not','ultimate-member'),
|
||||
'id' => 'profile_show_metaicon',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Profile Header Meta Text Icon', 'ultimate-member' ),
|
||||
'default' => 0,
|
||||
'tooltip' => __( 'Display field icons for related user meta fields in header or not', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_show_name',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Show display name in profile header','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_show_name'),
|
||||
'tooltip' => __('Switch on/off the user name on profile header','ultimate-member'),
|
||||
'id' => 'profile_show_name',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Show display name in profile header', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_show_name' ),
|
||||
'tooltip' => __( 'Switch on/off the user name on profile header', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_show_social_links',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Show social links in profile header','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_show_social_links'),
|
||||
'tooltip' => __('Switch on/off the social links on profile header','ultimate-member'),
|
||||
'id' => 'profile_show_social_links',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Show social links in profile header', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_show_social_links' ),
|
||||
'tooltip' => __( 'Switch on/off the social links on profile header', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_show_bio',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Show user description in header','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_show_bio'),
|
||||
'tooltip' => __('Switch on/off the user description on profile header','ultimate-member'),
|
||||
'id' => 'profile_show_bio',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Show user description in header', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_show_bio' ),
|
||||
'tooltip' => __( 'Switch on/off the user description on profile header', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_show_html_bio',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable html support for user description','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_show_html_bio'),
|
||||
'tooltip' => __('Switch on/off to enable/disable support for html tags on user description.','ultimate-member'),
|
||||
'id' => 'profile_show_html_bio',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Enable HTML support for user description', 'ultimate-member' ),
|
||||
'tooltip' => __( 'Switch on/off to enable/disable support for html tags on user description.', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_bio_maxchars',
|
||||
'type' => 'text',
|
||||
'label' => __( 'User description maximum chars','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_bio_maxchars'),
|
||||
'tooltip' => __('Maximum number of characters to allow in user description field in header.','ultimate-member'),
|
||||
'conditional' => array( 'profile_show_bio', '=', 1 ),
|
||||
'id' => 'profile_bio_maxchars',
|
||||
'type' => 'text',
|
||||
'label' => __( 'User description maximum chars', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_bio_maxchars' ),
|
||||
'tooltip' => __( 'Maximum number of characters to allow in user description field in header.', 'ultimate-member' ),
|
||||
'conditional' => array( 'profile_show_bio', '=', 1 ),
|
||||
'size' => 'small'
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_header_menu',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Profile Header Menu Position', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_header_menu'),
|
||||
'tooltip' => __( 'For incompatible themes, please make the menu open from left instead of bottom by default.','ultimate-member'),
|
||||
'options' => array(
|
||||
'bc' => __( 'Bottom of Icon', 'ultimate-member' ),
|
||||
'lc' => __( 'Left of Icon (right for RTL)', 'ultimate-member' ),
|
||||
'id' => 'profile_header_menu',
|
||||
'type' => 'select',
|
||||
'label' => __( 'Profile Header Menu Position', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_header_menu' ),
|
||||
'tooltip' => __( 'For incompatible themes, please make the menu open from left instead of bottom by default.', 'ultimate-member' ),
|
||||
'options' => array(
|
||||
'bc' => __( 'Bottom of Icon', 'ultimate-member' ),
|
||||
'lc' => __( 'Left of Icon (right for RTL)', 'ultimate-member' ),
|
||||
),
|
||||
'size' => 'small'
|
||||
'size' => 'small'
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_empty_text',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Show a custom message if profile is empty','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_empty_text'),
|
||||
'tooltip' => __('Switch on/off the custom message that appears when the profile is empty','ultimate-member'),
|
||||
'id' => 'profile_empty_text',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Show a custom message if profile is empty', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_empty_text' ),
|
||||
'tooltip' => __( 'Switch on/off the custom message that appears when the profile is empty', 'ultimate-member' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'profile_empty_text_emo',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Show the emoticon','ultimate-member' ),
|
||||
'default' => um_get_metadefault('profile_empty_text_emo'),
|
||||
'tooltip' => __('Switch on/off the emoticon (sad face) that appears above the message','ultimate-member'),
|
||||
'conditional' => array( 'profile_empty_text', '=', 1 ),
|
||||
'id' => 'profile_empty_text_emo',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Show the emoticon', 'ultimate-member' ),
|
||||
'default' => um_get_metadefault( 'profile_empty_text_emo' ),
|
||||
'tooltip' => __( 'Switch on/off the emoticon (sad face) that appears above the message', 'ultimate-member' ),
|
||||
'conditional' => array( 'profile_empty_text', '=', 1 ),
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user