From 00ae6e02b2904403dd94d26cc1f0d757e72cad31 Mon Sep 17 00:00:00 2001 From: jonfalcon Date: Mon, 28 Dec 2015 15:00:30 -0800 Subject: [PATCH] Enable html support for user bio --- core/um-actions-profile.php | 438 ++++++++++++++++++------------------ core/um-setup.php | 133 +++++------ um-config.php | 348 ++++++++++++++-------------- 3 files changed, 468 insertions(+), 451 deletions(-) diff --git a/core/um-actions-profile.php b/core/um-actions-profile.php index aa7580a5..90a6eed2 100644 --- a/core/um-actions-profile.php +++ b/core/um-actions-profile.php @@ -6,49 +6,49 @@ add_action('um_profile_content_main','um_profile_content_main'); function um_profile_content_main( $args ) { extract( $args ); - + if ( !um_get_option('profile_tab_main') && !isset( $_REQUEST['um_action'] ) ) return; - + $can_view = apply_filters('um_profile_can_view_main', -1, um_profile_id() ); - + if ( $can_view == -1 ) { - + do_action("um_before_form", $args); - + do_action("um_before_{$mode}_fields", $args); - + do_action("um_main_{$mode}_fields", $args); - + do_action("um_after_form_fields", $args); - + do_action("um_after_{$mode}_fields", $args); - + do_action("um_after_form", $args); - + } else { - + ?> - +
- + user->set( $args['user_id'] ); @@ -58,27 +58,27 @@ } else if ( isset( $args['_user_id'] ) ) { $ultimatemember->user->set( $args['_user_id'] ); } - + $userinfo = $ultimatemember->user->profile; - + $fields = unserialize( $args['custom_fields'] ); - + do_action('um_user_before_updating_profile', $userinfo ); - + // loop through fields if ( isset( $fields ) && is_array( $fields ) ) { foreach( $fields as $key => $array ) { - + if ( $fields[$key]['type'] == 'multiselect' || $fields[$key]['type'] == 'checkbox' && !isset($args['submitted'][$key]) ) { delete_user_meta( um_user('ID'), $key ); } - + if ( isset( $args['submitted'][ $key ] ) ) { if ( isset( $fields[$key]['type'] ) && in_array( $fields[$key]['type'], array('image','file') ) && um_is_temp_upload( $args['submitted'][ $key ] ) ) { - + $files[ $key ] = $args['submitted'][ $key ]; - + } else { if ( isset( $userinfo[$key]) && $args['submitted'][$key] != $userinfo[$key] ) { @@ -86,23 +86,23 @@ } else if ( $args['submitted'][$key] ) { $to_update[ $key ] = $args['submitted'][ $key ]; } - + } - + } } } - + if ( isset( $args['submitted']['description'] ) ) { $to_update['description'] = $args['submitted']['description']; } - + if ( isset( $args['submitted']['role'] ) && !empty( $args['submitted']['role'] ) ) { $to_update['role'] = $args['submitted']['role']; } - + do_action('um_user_pre_updating_profile', $to_update ); - + $to_update = apply_filters('um_user_pre_updating_profile_array', $to_update); if ( is_array( $to_update ) ) { @@ -112,78 +112,78 @@ if ( is_array( $files ) ) { $ultimatemember->user->update_files( $files ); } - + do_action('um_after_user_updated', um_user('ID') ); do_action('um_after_user_upload', um_user('ID') ); do_action('um_user_after_updating_profile', $to_update ); - + if ( !isset( $args['is_signup'] ) ) { exit( wp_redirect( um_edit_my_profile_cancel_uri() ) ); } - + } - + /*** *** @if editing another user ***/ add_action('um_after_form_fields', 'um_editing_user_id_input'); - function um_editing_user_id_input($args){ + function um_editing_user_id_input($args){ global $ultimatemember; if ( $ultimatemember->fields->editing == 1 && $ultimatemember->fields->set_mode == 'profile' && $ultimatemember->user->target_id ) { ?> - + - + - + - + @@ -192,36 +192,36 @@ '; - + ?>
- + fields->editing ) { - + $items = array( ''.__('Change cover photo','ultimatemember').'', ''.__('Remove','ultimatemember').'', ''.__('Cancel','ultimatemember').'', ); - + echo $ultimatemember->menu->new_ui( 'bc', 'div.um-cover', 'click', $items ); - + } ?> - + fields->add_hidden_field( 'cover_photo' ); ?> - + - +
- + - + mobile->isMobile() ){ if ( $ultimatemember->mobile->isTablet() ) { echo um_user('cover_photo', 1000); @@ -231,35 +231,35 @@ } else { echo um_user('cover_photo', 1000); } - + ?> - + '; - + } else { - + if ( !isset( $ultimatemember->user->cannot_edit ) ) { ?> - + - + - +
- +
- + @@ -297,115 +297,121 @@ '; - + ?> - +
- + - +
- + user->cannot_edit ) ) { - + + if ( !isset( $ultimatemember->user->cannot_edit ) ) { + $ultimatemember->fields->add_hidden_field( 'profile_photo' ); - + if ( !um_profile('profile_photo') ) { // has profile photo - + $items = array( ''.__('Upload photo','ultimatemember').'', ''.__('Cancel','ultimatemember').'', ); - + $items = apply_filters('um_user_photo_menu_view', $items ); - + echo $ultimatemember->menu->new_ui( 'bc', 'div.um-profile-photo', 'click', $items ); - + } else if ( $ultimatemember->fields->editing == true ) { - + $items = array( ''.__('Change photo','ultimatemember').'', ''.__('Remove photo','ultimatemember').'', ''.__('Cancel','ultimatemember').'', ); - + $items = apply_filters('um_user_photo_menu_edit', $items ); - + echo $ultimatemember->menu->new_ui( 'bc', 'div.um-profile-photo', 'click', $items ); - + } - + } - + ?> - +
- +
- + - +
- + fields->editing == false ) { $ultimatemember->fields->viewing = 1; - + if ( um_get_requested_user() ) { if ( !um_can_view_profile( um_get_requested_user() ) ) um_redirect_home(); if ( !um_current_user_can('edit', um_get_requested_user() ) ) $ultimatemember->user->cannot_edit = 1; @@ -425,21 +431,21 @@ if ( !is_user_logged_in() ) um_redirect_home(); if ( !um_user('can_edit_profile') ) $ultimatemember->user->cannot_edit = 1; } - + } if ( $mode == 'profile' && $ultimatemember->fields->editing == true ) { $ultimatemember->fields->editing = 1; - + if ( um_get_requested_user() ) { if ( !um_current_user_can('edit', um_get_requested_user() ) ) um_redirect_home(); um_fetch_user( um_get_requested_user() ); } - + } - + } - + /*** *** @display the edit profile icon ***/ @@ -447,160 +453,160 @@ function um_add_edit_icon( $args ) { global $ultimatemember; $output = ''; - + if ( !is_user_logged_in() ) return; // not allowed for guests - + if ( isset( $ultimatemember->user->cannot_edit ) && $ultimatemember->user->cannot_edit == 1 ) return; // do not proceed if user cannot edit - + if ( $ultimatemember->fields->editing == true ) { - + ?> - +
- + - +
- + - +
- + - + ''.__('Edit Profile','ultimatemember').'', 'myaccount' => ''.__('My Account','ultimatemember').'', 'logout' => ''.__('Logout','ultimatemember').'', 'cancel' => ''.__('Cancel','ultimatemember').'', ); - + $cancel = $items['cancel']; - + if ( !um_is_myprofile() ) { - + $actions = $ultimatemember->user->get_admin_actions(); - + unset( $items['myaccount'] ); unset( $items['logout'] ); unset( $items['cancel'] ); - + if ( is_array( $actions ) ) { $items = array_merge( $items, $actions ); } - + $items = apply_filters('um_profile_edit_menu_items', $items, um_profile_id() ); - + $items['cancel'] = $cancel; } else { - + $items = apply_filters('um_myprofile_edit_menu_items', $items ); - + } - + echo $ultimatemember->menu->new_ui( $args['header_menu'], 'div.um-profile-edit', 'click', $items ); - + ?> - +
- + fields->editing == true ) { - + echo $ultimatemember->fields->display( 'profile', $args ); - + } else { - + $ultimatemember->fields->viewing = true; - + echo $ultimatemember->fields->display_view( 'profile', $args ); - + } - + } - + /*** *** @form processing ***/ add_action('um_submit_form_profile', 'um_submit_form_profile', 10); function um_submit_form_profile($args){ global $ultimatemember; - + if ( !isset($ultimatemember->form->errors) ) do_action('um_user_edit_profile', $args); do_action('um_user_profile_extra_hook', $args ); - + } - + /*** *** @Show the submit button (highest priority) ***/ add_action('um_after_profile_fields', 'um_add_submit_button_to_profile', 1000); function um_add_submit_button_to_profile($args){ global $ultimatemember; - + // DO NOT add when reviewing user's details if ( $ultimatemember->user->preview == true && is_admin() ) return; - + // only when editing if ( $ultimatemember->fields->editing == false ) return; - + ?> - +
- + - +
- + - +
- + - +
- +
- + profile->tabs_active(); $tabs = apply_filters('um_user_profile_tabs', $tabs ); $ultimatemember->user->tabs = $tabs; - + // need enough tabs to continue if ( count( $tabs ) <= 1 ) return; - + $active_tab = $ultimatemember->profile->active_tab(); if ( !isset( $tabs[$active_tab] ) ) { @@ -608,7 +614,7 @@ $ultimatemember->profile->active_tab = $active_tab; $ultimatemember->profile->active_subnav = null; } - + // Move default tab priority $default_tab = um_get_option('profile_menu_default_tab'); $dtab = ( isset( $tabs[$default_tab] ) )? $tabs[$default_tab] : 'main'; @@ -617,63 +623,63 @@ $dtabs[$default_tab] = $dtab; $tabs = $dtabs + $tabs; } - + ?> - +
- + $tab ) { - + if ( isset( $tab['hidden'] ) ) continue; - + $nav_link = $ultimatemember->permalinks->get_current_url( get_option('permalink_structure') ); $nav_link = remove_query_arg( 'um_action', $nav_link ); $nav_link = remove_query_arg( 'subnav', $nav_link ); $nav_link = add_query_arg('profiletab', $id, $nav_link ); - + $nav_link = apply_filters("um_profile_menu_link_{$id}", $nav_link); - + ?> - + - + - +
- +
- + $tab ) { - + if ( isset( $tab['subnav'] ) && $active_tab == $id ) { - + $active_subnav = ( $ultimatemember->profile->active_subnav() ) ? $ultimatemember->profile->active_subnav() : $tab['subnav_default']; echo '
'; foreach( $tab['subnav'] as $id => $subtab ) { - + ?> - + - + '; } - + } - - } \ No newline at end of file + + } diff --git a/core/um-setup.php b/core/um-setup.php index f6a47540..d0729567 100644 --- a/core/um-setup.php +++ b/core/um-setup.php @@ -5,11 +5,11 @@ class UM_Setup { function __construct() { add_action('init', array(&$this, 'install_basics'), 9); - + add_action('init', array(&$this, 'install_default_forms'), 9); - + add_action('init', array(&$this, 'install_default_roles'), 9); - + add_action('init', array(&$this, 'install_posts_roles'), 9); $this->core_forms = array( @@ -17,7 +17,7 @@ class UM_Setup { 'login', 'profile', ); - + $this->core_directories = array( 'members', ); @@ -53,7 +53,7 @@ class UM_Setup { '_um_profiles_per_page_mobile' => 6, '_um_core' => 'members', ); - + $this->core_global_meta_all = array( '_um_primary_btn_color', '_um_primary_btn_hover', @@ -74,7 +74,7 @@ class UM_Setup { '_um_help_tip_color', '_um_secondary_color', ); - + $this->core_form_meta_all = array( '_um_help_tip_color' => '#ccc', '_um_active_color' => '#3ba1da', @@ -97,6 +97,7 @@ class UM_Setup { '_um_profile_show_name' => 1, '_um_profile_show_social_links' => 0, '_um_profile_show_bio' => 1, + 'profile_show_html_bio' => 0, '_um_profile_bio_maxchars' => 180, '_um_profile_header_menu' => 'bc', '_um_profile_empty_text' => 1, @@ -162,9 +163,9 @@ class UM_Setup { '_um_directory_header' => __('{total_users} Members','ultimatemember'), '_um_directory_header_single' => __('{total_users} Member','ultimatemember'), ); - + $this->core_form_meta_all = apply_filters('um_core_form_meta_all', $this->core_form_meta_all ); - + $this->core_form_meta['register'] = array( '_um_custom_fields' => 'a:6:{s:10:"user_login";a:15:{s:5:"title";s:8:"Username";s:7:"metakey";s:10:"user_login";s:4:"type";s:4:"text";s:5:"label";s:8:"Username";s:8:"required";i:1;s:6:"public";i:1;s:8:"editable";i:0;s:8:"validate";s:15:"unique_username";s:9:"min_chars";i:3;s:9:"max_chars";i:24;s:8:"position";s:1:"1";s:6:"in_row";s:9:"_um_row_1";s:10:"in_sub_row";s:1:"0";s:9:"in_column";s:1:"1";s:8:"in_group";s:0:"";}s:10:"user_email";a:13:{s:5:"title";s:14:"E-mail Address";s:7:"metakey";s:10:"user_email";s:4:"type";s:4:"text";s:5:"label";s:14:"E-mail Address";s:8:"required";i:0;s:6:"public";i:1;s:8:"editable";i:1;s:8:"validate";s:12:"unique_email";s:8:"position";s:1:"4";s:6:"in_row";s:9:"_um_row_1";s:10:"in_sub_row";s:1:"0";s:9:"in_column";s:1:"1";s:8:"in_group";s:0:"";}s:13:"user_password";a:16:{s:5:"title";s:8:"Password";s:7:"metakey";s:13:"user_password";s:4:"type";s:8:"password";s:5:"label";s:8:"Password";s:8:"required";i:1;s:6:"public";i:1;s:8:"editable";i:1;s:9:"min_chars";i:8;s:9:"max_chars";i:30;s:15:"force_good_pass";i:1;s:18:"force_confirm_pass";i:1;s:8:"position";s:1:"5";s:6:"in_row";s:9:"_um_row_1";s:10:"in_sub_row";s:1:"0";s:9:"in_column";s:1:"1";s:8:"in_group";s:0:"";}s:10:"first_name";a:12:{s:5:"title";s:10:"First Name";s:7:"metakey";s:10:"first_name";s:4:"type";s:4:"text";s:5:"label";s:10:"First Name";s:8:"required";i:0;s:6:"public";i:1;s:8:"editable";i:1;s:8:"position";s:1:"2";s:6:"in_row";s:9:"_um_row_1";s:10:"in_sub_row";s:1:"0";s:9:"in_column";s:1:"1";s:8:"in_group";s:0:"";}s:9:"last_name";a:12:{s:5:"title";s:9:"Last Name";s:7:"metakey";s:9:"last_name";s:4:"type";s:4:"text";s:5:"label";s:9:"Last Name";s:8:"required";i:0;s:6:"public";i:1;s:8:"editable";i:1;s:8:"position";s:1:"3";s:6:"in_row";s:9:"_um_row_1";s:10:"in_sub_row";s:1:"0";s:9:"in_column";s:1:"1";s:8:"in_group";s:0:"";}s:9:"_um_row_1";a:4:{s:4:"type";s:3:"row";s:2:"id";s:9:"_um_row_1";s:8:"sub_rows";s:1:"1";s:4:"cols";s:1:"1";}}', '_um_mode' => 'register', @@ -204,7 +205,7 @@ class UM_Setup { 'after_login' => 'redirect_admin', 'after_logout' => 'redirect_home', ); - + // non-admin permissions $this->nonadmin_perms = array( 'core' => 'member', @@ -216,9 +217,9 @@ class UM_Setup { 'can_access_private_profile' => 0, 'after_login' => 'redirect_profile', ); - + } - + /*** *** @Get default permissions ***/ @@ -232,7 +233,7 @@ class UM_Setup { return $perms; } } - + /*** *** @Basics ***/ @@ -240,7 +241,7 @@ class UM_Setup { if ( !get_option('__ultimatemember_sitekey') ) update_option('__ultimatemember_sitekey', str_replace( array('http://','https://'), '', sanitize_user( get_bloginfo('url') ) ) . '-' . wp_generate_password( 20, false ) ); } - + /*** *** @Default Forms ***/ @@ -248,19 +249,19 @@ class UM_Setup { global $wpdb, $ultimatemember; if ( current_user_can('manage_options') && um_user('ID') && !get_option('um_is_installed') ) { - + update_option('um_is_installed', 1); - + // Install Core Forms foreach($this->core_forms as $id ) { - + /** If page does not exist Create it **/ $page_exists = $ultimatemember->query->find_post_id('um_form','_um_core', $id); if ( !$page_exists ) { - + if ( $id == 'register' ) { $title = 'Default Registration'; } else if ( $id == 'login' ) { @@ -268,16 +269,16 @@ class UM_Setup { } else { $title = 'Default Profile'; } - + $form = array( 'post_type' => 'um_form', 'post_title' => $title, 'post_status' => 'publish', 'post_author' => um_user('ID'), ); - + $form_id = wp_insert_post( $form ); - + foreach( $this->core_form_meta[$id] as $key => $value ) { if ( $key == '_um_custom_fields' ) { $array = unserialize( $value ); @@ -286,38 +287,38 @@ class UM_Setup { update_post_meta($form_id, $key, $value); } } - + $this->setup_shortcode[$id] = '[ultimatemember form_id='.$form_id.']'; $core_forms[ $form_id ] = $form_id; - + } /** DONE **/ - + } if ( isset( $core_forms ) ) update_option('um_core_forms', $core_forms); - + // Install Core Directories foreach($this->core_directories as $id ) { - + /** If page does not exist Create it **/ $page_exists = $ultimatemember->query->find_post_id('um_directory','_um_core', $id); if ( !$page_exists ) { - + $title = 'Members'; - + $form = array( 'post_type' => 'um_directory', 'post_title' => $title, 'post_status' => 'publish', 'post_author' => um_user('ID'), ); - + $form_id = wp_insert_post( $form ); - + foreach( $this->core_directory_meta[$id] as $key => $value ) { if ( $key == '_um_custom_fields' ) { $array = unserialize( $value ); @@ -326,17 +327,17 @@ class UM_Setup { update_post_meta($form_id, $key, $value); } } - + $this->setup_shortcode[$id] = '[ultimatemember form_id='.$form_id.']'; $core_directories[ $form_id ] = $form_id; - + } /** DONE **/ - + } if ( isset( $core_directories ) ) update_option('um_core_directories', $core_directories); - + // Install Core Pages foreach($this->core_pages as $slug => $array ) { @@ -346,7 +347,7 @@ class UM_Setup { **/ $page_exists = $ultimatemember->query->find_post_id('page','_um_core', $slug); if ( !$page_exists ) { - + if ( $slug == 'logout' ) { $content = ''; } else if ( $slug == 'account' ) { @@ -358,7 +359,7 @@ class UM_Setup { } else { $content = $this->setup_shortcode[$slug]; } - + $user_page = array( 'post_title' => $array['title'], 'post_content' => $content, @@ -368,17 +369,17 @@ class UM_Setup { 'post_author' => um_user('ID'), 'comment_status' => 'closed' ); - + $post_id = wp_insert_post( $user_page ); wp_update_post( array('ID' => $post_id, 'post_type' => 'page' ) ); - + update_post_meta($post_id, '_um_core', $slug); - + $core_pages[ $slug ] = $post_id; - + } /** DONE **/ - + } if ( isset( $core_pages ) ) { update_option('um_core_pages', $core_pages); @@ -390,28 +391,28 @@ class UM_Setup { update_option('um_options', $options ); } } - + } - + } - + /*** *** @First setup of core roles ***/ function install_default_roles(){ - + if ( !get_option('um_first_setup_roles') ) { update_option('um_first_setup_roles', 1); - + $users = get_users( array('fields' => 'ID') ); foreach( $users as $id ) { delete_user_meta( $id, 'account_status' ); delete_user_meta( $id, 'role' ); - + update_user_meta( $id, 'account_status', 'approved' ); - + if ( !is_super_admin( $id ) ) { if ( is_numeric( $id ) ) { update_user_meta( $id, 'role', 'member' ); @@ -421,11 +422,11 @@ class UM_Setup { update_user_meta( $id, 'role', 'admin' ); } } - + } } - + if ( !get_option('um_hashed_passwords_fix') ) { update_option('um_hashed_passwords_fix', 1); $users = get_users( array('fields' => 'ID') ); @@ -433,26 +434,26 @@ class UM_Setup { delete_user_meta( $id, '_um_cool_but_hard_to_guess_plain_pw' ); } } - + } - + /*** *** @Build default roles ***/ function install_posts_roles(){ - + global $wpdb, $ultimatemember; - + if ( !isset( $ultimatemember->query ) || ! method_exists( $ultimatemember->query, 'get_roles' ) ) { return; } else { //die('Method loaded!'); } - + $admin = $ultimatemember->query->find_post_id('um_role','_um_core','admin'); if ( !$admin && current_user_can('manage_options') && um_user('ID') ){ - + $admin_role = array( 'post_title' => 'Admin', 'post_name' => 'admin', @@ -460,17 +461,17 @@ class UM_Setup { 'post_status' => 'publish', 'post_author' => um_user('ID'), ); - + $post_id = wp_insert_post( $admin_role ); - + foreach( $this->get_initial_permissions('admin') as $key => $value ) update_post_meta($post_id, "_um_" . $key, $value); - + } - + $member = $ultimatemember->query->find_post_id('um_role','_um_core','member'); - + if ( !$member && current_user_can('manage_options') && um_user('ID') ){ - + $member_role = array( 'post_title' => 'Member', 'post_name' => 'member', @@ -478,13 +479,13 @@ class UM_Setup { 'post_status' => 'publish', 'post_author' => um_user('ID'), ); - + $post_id = wp_insert_post( $member_role ); - + foreach( $this->get_initial_permissions('member') as $key => $value ) update_post_meta($post_id, "_um_" . $key, $value); - + } - + } -} \ No newline at end of file +} diff --git a/um-config.php b/um-config.php index 5caba687..d598282b 100644 --- a/um-config.php +++ b/um-config.php @@ -22,7 +22,7 @@ $core_pages = apply_filters('um_core_pages', $core_pages ); foreach( $core_pages as $page_s => $page ) { $have_pages = $ultimatemember->query->wp_pages(); - + if( ! empty( $have_pages ) ){ $page_setup[] = array( 'id' => 'core_' . $page_s, @@ -70,7 +70,7 @@ function um_core_page_setting_saved($options, $css, $changed_values) { 'password-reset' => __('Password reset page','ultimatemember'), ); $pages = get_option('um_core_pages'); - + $core_pages = apply_filters('um_core_pages', $core_pages ); foreach( $core_pages as $slug => $page ) { @@ -82,13 +82,13 @@ function um_core_page_setting_saved($options, $css, $changed_values) { /*** *** @ ***/ - + $this->sections[] = array( 'icon' => 'um-faicon-user', 'title' => __( 'Users','ultimatemember'), 'fields' => array( - + array( 'id' => 'default_role', 'type' => 'select', @@ -99,7 +99,7 @@ $this->sections[] = array( 'options' => $ultimatemember->query->get_roles(), 'placeholder' => __('Choose user role...','ultimatemember'), ), - + array( 'id' => 'permalink_base', 'type' => 'select', @@ -115,7 +115,7 @@ $this->sections[] = array( ), 'placeholder' => __('Select...','ultimatemember') ), - + array( 'id' => 'display_name', 'type' => 'select', @@ -136,7 +136,7 @@ $this->sections[] = array( ), 'placeholder' => __('Select...') ), - + array( 'id' => 'display_name_field', 'type' => 'text', @@ -144,7 +144,7 @@ $this->sections[] = array( 'desc' => __('Specify the custom field meta key or custom fields seperated by comma that you want to use to display users name on the frontend of your site','ultimatemember'), 'required' => array( 'display_name', '=', 'field' ), ), - + array( 'id' => 'author_redirect', 'type' => 'switch', @@ -154,7 +154,7 @@ $this->sections[] = array( 'on' => __('Yes','ultimatemember'), 'off' => __('No','ultimatemember'), ), - + array( 'id' => 'members_page', 'type' => 'switch', @@ -164,7 +164,7 @@ $this->sections[] = array( 'on' => __('Yes','ultimatemember'), 'off' => __('No','ultimatemember'), ), - + array( 'id' => 'use_gravatars', 'type' => 'switch', @@ -174,7 +174,7 @@ $this->sections[] = array( 'on' => __('Yes','ultimatemember'), 'off' => __('No','ultimatemember'), ), - + array( 'id' => 'reset_require_strongpass', 'type' => 'switch', @@ -184,7 +184,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + ) ); @@ -192,13 +192,13 @@ $this->sections[] = array( /*** *** @ ***/ - + $this->sections[] = array( 'icon' => 'um-faicon-cog', 'title' => __( 'Account','ultimatemember'), 'fields' => array( - + array( 'id' => 'account_tab_password', 'type' => 'switch', @@ -208,7 +208,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'account_tab_privacy', 'type' => 'switch', @@ -218,7 +218,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'account_tab_notifications', 'type' => 'switch', @@ -228,7 +228,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'account_tab_delete', 'type' => 'switch', @@ -238,7 +238,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'delete_account_text', 'type' => 'textarea', // bug with wp 4.4? should be editor @@ -251,7 +251,7 @@ $this->sections[] = array( 'textarea_rows' => 6 ), ), - + array( 'id' => 'account_name', 'type' => 'switch', @@ -261,7 +261,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'account_email', 'type' => 'switch', @@ -271,7 +271,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'account_require_strongpass', 'type' => 'switch', @@ -304,7 +304,7 @@ $this->sections[] = array( 'default' => $ultimatemember->validation->randomize(), 'desc' => trailingslashit( get_bloginfo('url') ).'wp-admin/?um_panic_key=your_panic_key' ), - + array( 'id' => 'accessible', 'type' => 'select', @@ -325,7 +325,7 @@ $this->sections[] = array( 'desc' => __('A logged out user will be redirected to this url If he is not permitted to access the site','ultimatemember'), 'required' => array( 'accessible', '=', 2 ), ), - + array( 'id' => 'access_exclude_uris', 'type' => 'multi_text', @@ -335,7 +335,7 @@ $this->sections[] = array( 'add_text' => __('Add New URL','ultimatemember'), 'required' => array( 'accessible', '=', 2 ), ), - + array( 'id' => 'wpadmin_login', 'type' => 'switch', @@ -345,7 +345,7 @@ $this->sections[] = array( 'on' => __('Yes','ultimatemember'), 'off' => __('No','ultimatemember'), ), - + array( 'id' => 'deny_admin_frontend_login', 'type' => 'switch', @@ -355,7 +355,7 @@ $this->sections[] = array( 'on' => __('Yes','ultimatemember'), 'off' => __('No','ultimatemember'), ), - + array( 'id' => 'wpadmin_login_redirect', 'type' => 'select', @@ -369,7 +369,7 @@ $this->sections[] = array( 'custom_url' => 'Custom URL', ) ), - + array( 'id' => 'wpadmin_login_redirect_url', 'type' => 'text', @@ -377,7 +377,7 @@ $this->sections[] = array( 'desc' => __('Enter an alternate url here to redirect a user If they try to access the backend register screen','ultimatemember'), 'required' => array( 'wpadmin_login_redirect', '=', 'custom_url' ), ), - + array( 'id' => 'wpadmin_register', 'type' => 'switch', @@ -387,7 +387,7 @@ $this->sections[] = array( 'on' => __('Yes','ultimatemember'), 'off' => __('No','ultimatemember'), ), - + array( 'id' => 'wpadmin_register_redirect', 'type' => 'select', @@ -401,7 +401,7 @@ $this->sections[] = array( 'custom_url' => 'Custom URL', ) ), - + array( 'id' => 'wpadmin_register_redirect_url', 'type' => 'text', @@ -409,7 +409,7 @@ $this->sections[] = array( 'desc' => __('Enter an alternate url here to redirect a user If they try to access the backend register screen','ultimatemember'), 'required' => array( 'wpadmin_register_redirect', '=', 'custom_url' ), ), - + array( 'id' => 'access_widget_admin_only', 'type' => 'switch', @@ -418,28 +418,28 @@ $this->sections[] = array( 'on' => __('Yes','ultimatemember'), 'off' => __('No','ultimatemember'), ), - + array( 'id' => 'wpadmin_allow_ips', 'type' => 'textarea', 'title' => __( 'Whitelisted Backend IPs','ultimatemember' ), 'desc' => __('Always allow the specified IP addresses to access the backend login screen and WP-admin to avoid being locked from site backend.','ultimatemember'), ), - + array( 'id' => 'blocked_ips', 'type' => 'textarea', 'title' => __( 'Blocked IP Addresses','ultimatemember' ), 'desc' => __('This will block the listed IPs from signing up or signing in to the site, you can use full IP numbers or target specific range with a wildcard','ultimatemember'), ), - + array( 'id' => 'blocked_emails', 'type' => 'textarea', 'title' => __( 'Blocked Email Addresses','ultimatemember' ), 'desc' => __('This will block the specified e-mail addresses from being able to sign up or sign in to your site. To block an entire domain, use something like *@domain.com','ultimatemember'), ), - + array( 'id' => 'blocked_words', 'type' => 'textarea', @@ -447,7 +447,7 @@ $this->sections[] = array( 'desc' => __('This option lets you specify blacklist of words to prevent anyone from signing up with such a word as their username','ultimatemember'), 'default' => 'admin' . "\r\n" . 'administrator' . "\r\n" . 'webmaster' . "\r\n" . 'support' . "\r\n" . 'staff' ), - + ) ); @@ -455,7 +455,7 @@ $this->sections[] = array( /*** *** @ ***/ - + $this->sections[] = array( 'icon' => 'um-faicon-envelope-o', @@ -485,7 +485,7 @@ $this->sections[] = array( 'default' => 0, 'desc' => __('If you enable HTML for e-mails, you can customize the HTML e-mail templates found in templates/email folder.','ultimatemember'), ), - + array( 'id' => 'welcome_email_on', 'type' => 'switch', @@ -493,7 +493,7 @@ $this->sections[] = array( 'default' => 1, 'desc' => __('Whether to send the user an email when his account is automatically approved','ultimatemember'), ), - + array( 'id' => 'welcome_email_sub', 'type' => 'text', @@ -521,7 +521,7 @@ $this->sections[] = array( 'Thanks,' . "\r\n" . '{site_name}', ), - + array( 'id' => 'checkmail_email_on', 'type' => 'switch', @@ -529,7 +529,7 @@ $this->sections[] = array( 'default' => 1, 'desc' => __('Whether to send the user an email when his account needs e-mail activation','ultimatemember'), ), - + array( 'id' => 'checkmail_email_sub', 'type' => 'text', @@ -553,7 +553,7 @@ $this->sections[] = array( 'Thanks,' . "\r\n" . '{site_name}', ), - + array( 'id' => 'pending_email_on', 'type' => 'switch', @@ -561,7 +561,7 @@ $this->sections[] = array( 'default' => 1, 'desc' => __('Whether to send the user an email when his account needs admin review','ultimatemember'), ), - + array( 'id' => 'pending_email_sub', 'type' => 'text', @@ -585,7 +585,7 @@ $this->sections[] = array( 'Thanks,' . "\r\n" . '{site_name}', ), - + array( 'id' => 'approved_email_on', 'type' => 'switch', @@ -593,7 +593,7 @@ $this->sections[] = array( 'default' => 1, 'desc' => __('Whether to send the user an email when his account is approved','ultimatemember'), ), - + array( 'id' => 'approved_email_sub', 'type' => 'text', @@ -621,7 +621,7 @@ $this->sections[] = array( 'Thanks,' . "\r\n" . '{site_name}', ), - + array( 'id' => 'rejected_email_on', 'type' => 'switch', @@ -629,7 +629,7 @@ $this->sections[] = array( 'default' => 1, 'desc' => __('Whether to send the user an email when his account is rejected','ultimatemember'), ), - + array( 'id' => 'rejected_email_sub', 'type' => 'text', @@ -660,7 +660,7 @@ $this->sections[] = array( 'default' => 1, 'desc' => __('Whether to send the user an email when his account is deactivated','ultimatemember'), ), - + array( 'id' => 'inactive_email_sub', 'type' => 'text', @@ -670,7 +670,7 @@ $this->sections[] = array( 'required' => array( 'inactive_email_on', '=', 1 ), 'desc' => __('This is the subject line of the e-mail','ultimatemember'), ), - + array( 'id' => 'inactive_email', 'type' => 'textarea', @@ -691,7 +691,7 @@ $this->sections[] = array( 'default' => 1, 'desc' => __('Whether to send the user an email when his account is deleted','ultimatemember'), ), - + array( 'id' => 'deletion_email_sub', 'type' => 'text', @@ -714,7 +714,7 @@ $this->sections[] = array( 'Thanks,' . "\r\n" . '{site_name}', ), - + array( 'id' => 'resetpw_email_on', 'type' => 'switch', @@ -722,7 +722,7 @@ $this->sections[] = array( 'default' => 1, 'desc' => __('Whether to send the user an email when he request to reset password (Recommended, please keep on)','ultimatemember'), ), - + array( 'id' => 'resetpw_email_sub', 'type' => 'text', @@ -741,12 +741,12 @@ $this->sections[] = array( 'required' => array( 'resetpw_email_on', '=', 1 ), 'default' => 'Hi {display_name},' . "\r\n\r\n" . 'We received a request to reset the password for your account. If you made this request, click the link below to change your password:' . "\r\n\r\n" . - '{password_reset_link}' . "\r\n\r\n" . + '{password_reset_link}' . "\r\n\r\n" . 'If you didn\'t make this request, you can ignore this email' . "\r\n\r\n" . 'Thanks,' . "\r\n" . '{site_name}', ), - + array( 'id' => 'changedpw_email_on', 'type' => 'switch', @@ -754,7 +754,7 @@ $this->sections[] = array( 'default' => 1, 'desc' => __('Whether to send the user an email when he request to reset password (Recommended, please keep on)','ultimatemember'), ), - + array( 'id' => 'changedpw_email_sub', 'type' => 'text', @@ -773,7 +773,7 @@ $this->sections[] = array( 'required' => array( 'changedpw_email_on', '=', 1 ), 'default' => 'Hi {display_name},' . "\r\n\r\n" . 'You recently changed the password associated with your {site_name} account.' . "\r\n\r\n" . - 'If you did not make this change and believe your {site_name} account has been compromised, please contact us at the following email address: {admin_email}' . "\r\n\r\n" . + 'If you did not make this change and believe your {site_name} account has been compromised, please contact us at the following email address: {admin_email}' . "\r\n\r\n" . 'Thanks,' . "\r\n" . '{site_name}', ), @@ -787,7 +787,7 @@ $this->sections[] = array( ***/ $this->sections[] = array( - + 'icon' => 'um-faicon-bell-o', 'title' => __( 'Notifications','ultimatemember' ), 'fields' => array( @@ -898,19 +898,19 @@ $this->sections[] = array( ), ) - + ); /*** *** @ ***/ - + $this->sections[] = array( 'icon' => 'um-faicon-cloud-upload', 'title' => __( 'Uploads','ultimatemember'), 'fields' => array( - + array( 'id' => 'profile_photo_max_size', 'type' => 'text', @@ -918,7 +918,7 @@ $this->sections[] = array( 'desc' => __( 'Sets a maximum size for the uploaded photo','ultimatemember' ), 'validate' => 'numeric', ), - + array( 'id' => 'cover_photo_max_size', 'type' => 'text', @@ -926,7 +926,7 @@ $this->sections[] = array( 'desc' => __( 'Sets a maximum size for the uploaded cover','ultimatemember' ), 'validate' => 'numeric', ), - + array( 'id' => 'photo_thumb_sizes', 'type' => 'multi_text', @@ -936,7 +936,7 @@ $this->sections[] = array( 'validate' => 'numeric', 'add_text' => __('Add New Size','ultimatemember'), ), - + array( 'id' => 'cover_thumb_sizes', 'type' => 'multi_text', @@ -946,7 +946,7 @@ $this->sections[] = array( 'validate' => 'numeric', 'add_text' => __('Add New Size','ultimatemember'), ), - + array( 'id' => 'image_compression', 'type' => 'text', @@ -955,7 +955,7 @@ $this->sections[] = array( 'default' => 60, 'validate' => 'numeric', ), - + array( 'id' => 'image_max_width', 'type' => 'text', @@ -964,7 +964,7 @@ $this->sections[] = array( 'default' => 1000, 'validate' => 'numeric', ), - + array( 'id' => 'cover_min_width', 'type' => 'text', @@ -981,7 +981,7 @@ $this->sections[] = array( /*** *** @ ***/ - + $this->sections[] = array( 'icon' => 'um-faicon-search', @@ -1003,7 +1003,7 @@ $this->sections[] = array( 'title' => __( 'User Profile Dynamic Meta Description','ultimatemember' ), 'desc' => __('This will be used in the meta description that is available for search-engines.','ultimatemember') ), - + ) ); @@ -1011,13 +1011,13 @@ $this->sections[] = array( /*** *** @ ***/ - + $this->sections[] = array( 'icon' => 'um-faicon-paint-brush', 'title' => __( 'Appearance','ultimatemember'), 'fields' => array( - + ) ); @@ -1027,7 +1027,7 @@ $this->sections[] = array( 'subsection' => true, 'title' => __( 'General','ultimatemember'), 'fields' => array( - + array( 'id' => 'directory_template', 'type' => 'select', @@ -1038,7 +1038,7 @@ $this->sections[] = array( 'options' => $ultimatemember->shortcodes->get_templates( 'members' ), 'required' => array( 'xxxxxxxxxxxxx', '=', 'sssssssssssssssss' ), ), - + array( 'id' => 'active_color', 'type' => 'color', @@ -1048,7 +1048,7 @@ $this->sections[] = array( 'desc' => __('Active color is used commonly with many plugin elements as highlighted color or active selection for example. This color demonstrates the primary active color of the plugin','ultimatemember'), 'transparent' => false, ), - + array( 'id' => 'secondary_color', 'type' => 'color', @@ -1058,7 +1058,7 @@ $this->sections[] = array( 'desc' => __('Secondary color is used for hovers, or active state for some elements of the plugin','ultimatemember'), 'transparent' => false, ), - + array( 'id' => 'primary_btn_color', 'type' => 'color', @@ -1067,7 +1067,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'primary_btn_hover', 'type' => 'color', @@ -1076,7 +1076,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'primary_btn_text', 'type' => 'color', @@ -1085,7 +1085,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'secondary_btn_color', 'type' => 'color', @@ -1094,7 +1094,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'secondary_btn_hover', 'type' => 'color', @@ -1103,7 +1103,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'secondary_btn_text', 'type' => 'color', @@ -1112,7 +1112,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'help_tip_color', 'type' => 'color', @@ -1121,9 +1121,9 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + ) - + ); $this->sections[] = array( @@ -1131,7 +1131,7 @@ $this->sections[] = array( 'subsection' => true, 'title' => __( 'Form Inputs','ultimatemember'), 'fields' => array( - + array( 'id' => 'form_field_label', 'type' => 'color', @@ -1140,7 +1140,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'form_border', 'type' => 'text', @@ -1148,7 +1148,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('form_border'), 'desc' => __('The default border-style for input/fields in UM forms','ultimatemember'), ), - + array( 'id' => 'form_border_hover', 'type' => 'text', @@ -1156,7 +1156,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('form_border_hover'), 'desc' => __('The default border style for fields on hover state','ultimatemember'), ), - + array( 'id' => 'form_bg_color', 'type' => 'color', @@ -1165,7 +1165,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'form_bg_color_focus', 'type' => 'color', @@ -1174,7 +1174,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'form_text_color', 'type' => 'color', @@ -1183,7 +1183,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'form_placeholder', 'type' => 'color', @@ -1192,7 +1192,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'form_icon_color', 'type' => 'color', @@ -1201,7 +1201,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'form_asterisk', 'type' => 'switch', @@ -1210,7 +1210,7 @@ $this->sections[] = array( 'on' => __('Yes','ultimatemember'), 'off' => __('No','ultimatemember'), ), - + array( 'id' => 'form_asterisk_color', 'type' => 'color', @@ -1220,13 +1220,13 @@ $this->sections[] = array( 'transparent' => false, 'required' => array( 'form_asterisk', '=', '1' ), ), - + ) - + ); $this->sections[] = array( - + 'subsection' => true, 'title' => __( 'Profile','ultimatemember'), 'fields' => array( @@ -1240,7 +1240,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('profile_template'), 'options' => $ultimatemember->shortcodes->get_templates( 'profile' ), ), - + array( 'id' => 'profile_max_width', 'type' => 'text', @@ -1248,7 +1248,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('profile_max_width'), 'desc' => 'The maximum width this shortcode can take from the page width', ), - + array( 'id' => 'profile_area_max_width', 'type' => 'text', @@ -1256,7 +1256,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('profile_area_max_width'), 'desc' => __('The maximum width of the profile area inside profile (below profile header)','ultimatemember'), ), - + array( 'id' => 'profile_align', 'type' => 'select', @@ -1270,7 +1270,7 @@ $this->sections[] = array( 'right' => __('Right aligned','ultimatemember'), ), ), - + array( 'id' => 'profile_icons', 'type' => 'select', @@ -1284,7 +1284,7 @@ $this->sections[] = array( 'off' => __('Turn off','ultimatemember'), ), ), - + array( 'id' => 'profile_primary_btn_word', 'type' => 'text', @@ -1292,7 +1292,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('profile_primary_btn_word'), 'desc' => __('The text that is used for updating profile button','ultimatemember'), ), - + array( 'id' => 'profile_secondary_btn', 'type' => 'switch', @@ -1302,7 +1302,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'profile_secondary_btn_word', 'type' => 'text', @@ -1311,7 +1311,7 @@ $this->sections[] = array( 'desc' => __('The text that is used for cancelling update profile button','ultimatemember'), 'required' => array( 'profile_secondary_btn', '=', 1 ), ), - + array( 'id' => 'profile_role', 'type' => 'select', @@ -1321,7 +1321,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('profile_role'), 'options' => $ultimatemember->query->get_roles( $add_default = 'Not specific' ), ), - + array( 'id' => 'profile_main_bg', 'type' => 'color', @@ -1330,7 +1330,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'profile_header_bg', 'type' => 'color', @@ -1339,7 +1339,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'default_avatar', 'type' => 'media', @@ -1349,7 +1349,7 @@ $this->sections[] = array( 'url' => um_url . 'assets/img/default_avatar.jpg', ), ), - + array( 'id' => 'default_cover', 'type' => 'media', @@ -1358,7 +1358,7 @@ $this->sections[] = array( 'title' => __('Default Cover Photo', 'ultimatemember'), 'desc' => __('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.', 'ultimatemember'), ), - + array( 'id' => 'profile_photosize', 'type' => 'text', @@ -1366,7 +1366,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('profile_photosize'), 'desc' => __('The global default of profile photo size. This can be overridden by individual form settings','ultimatemember'), ), - + array( 'id' => 'profile_photocorner', 'type' => 'select', @@ -1380,7 +1380,7 @@ $this->sections[] = array( '3' => __('Square','ultimatemember'), ), ), - + array( 'id' => 'profile_cover_enabled', 'type' => 'switch', @@ -1390,7 +1390,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'profile_cover_ratio', 'type' => 'select', @@ -1405,7 +1405,7 @@ $this->sections[] = array( ), 'required' => array( 'profile_cover_enabled', '=', 1 ), ), - + array( 'id' => 'profile_show_metaicon', 'type' => 'switch', @@ -1415,7 +1415,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'profile_header_text', 'type' => 'color', @@ -1424,7 +1424,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'profile_header_link_color', 'type' => 'color', @@ -1433,7 +1433,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'profile_header_link_hcolor', 'type' => 'color', @@ -1442,7 +1442,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'profile_header_icon_color', 'type' => 'color', @@ -1451,7 +1451,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'profile_header_icon_hcolor', 'type' => 'color', @@ -1460,7 +1460,7 @@ $this->sections[] = array( 'validate' => 'color', 'transparent' => false, ), - + array( 'id' => 'profile_show_name', 'type' => 'switch', @@ -1470,7 +1470,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'profile_show_social_links', 'type' => 'switch', @@ -1480,7 +1480,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'profile_show_bio', 'type' => 'switch', @@ -1490,7 +1490,17 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + + array( + 'id' => 'profile_show_html_bio', + 'type' => 'switch', + 'title' => __( 'Enable html support for user description','ultimatemember' ), + 'default' => um_get_metadefault('profile_show_html_bio'), + 'desc' => __('Switch on/off to enable/disable support for html tags on user description.','ultimatemember'), + 'on' => __('On','ultimatemember'), + 'off' => __('Off','ultimatemember'), + ), + array( 'id' => 'profile_bio_maxchars', 'type' => 'text', @@ -1499,7 +1509,7 @@ $this->sections[] = array( 'desc' => __('Maximum number of characters to allow in user description field in header.','ultimatemember'), 'required' => array( 'profile_show_bio', '=', 1 ), ), - + array( 'id' => 'profile_header_menu', 'type' => 'select', @@ -1512,7 +1522,7 @@ $this->sections[] = array( 'lc' => 'Left of Icon', ), ), - + array( 'id' => 'profile_empty_text', 'type' => 'switch', @@ -1522,7 +1532,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'profile_empty_text_emo', 'type' => 'switch', @@ -1533,9 +1543,9 @@ $this->sections[] = array( 'off' => __('Off','ultimatemember'), 'required' => array( 'profile_empty_text', '=', 1 ), ), - + ) - + ); $tabs = $ultimatemember->profile->tabs_primary(); @@ -1584,19 +1594,19 @@ $tab_options[] = array( ); $this->sections[] = array( - + 'subsection' => true, 'title' => __( 'Profile Menu','ultimatemember'), 'fields' => $tab_options - + ); $this->sections[] = array( - + 'subsection' => true, 'title' => __( 'Registration Form','ultimatemember'), 'fields' => array( - + array( 'id' => 'register_template', 'type' => 'select', @@ -1606,7 +1616,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('register_template'), 'options' => $ultimatemember->shortcodes->get_templates( 'register' ), ), - + array( 'id' => 'register_max_width', 'type' => 'text', @@ -1614,7 +1624,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('register_max_width'), 'desc' => __('The maximum width this shortcode can take from the page width','ultimatemember'), ), - + array( 'id' => 'register_align', 'type' => 'select', @@ -1628,7 +1638,7 @@ $this->sections[] = array( 'right' => __('Right aligned'), ), ), - + array( 'id' => 'register_icons', 'type' => 'select', @@ -1642,7 +1652,7 @@ $this->sections[] = array( 'off' => __('Turn off'), ), ), - + array( 'id' => 'register_primary_btn_word', 'type' => 'text', @@ -1650,7 +1660,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('register_primary_btn_word'), 'desc' => __('The text that is used for primary button text','ultimatemember'), ), - + array( 'id' => 'register_secondary_btn', 'type' => 'switch', @@ -1660,7 +1670,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'register_secondary_btn_word', 'type' => 'text', @@ -1669,7 +1679,7 @@ $this->sections[] = array( 'desc' => __('The text that is used for the secondary button text','ultimatemember'), 'required' => array( 'register_secondary_btn', '=', 1 ), ), - + array( 'id' => 'register_secondary_btn_url', 'type' => 'text', @@ -1678,7 +1688,7 @@ $this->sections[] = array( 'desc' => __('You can replace default link for this button by entering custom URL','ultimatemember'), 'required' => array( 'login_secondary_btn', '=', 1 ), ), - + array( 'id' => 'register_role', 'type' => 'select', @@ -1688,17 +1698,17 @@ $this->sections[] = array( 'default' => um_get_metadefault('register_role'), 'options' => $ultimatemember->query->get_roles( $add_default = 'Default' ), ), - + ) - + ); $this->sections[] = array( - + 'subsection' => true, 'title' => __( 'Login Form','ultimatemember'), 'fields' => array( - + array( 'id' => 'login_template', 'type' => 'select', @@ -1708,7 +1718,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('login_template'), 'options' => $ultimatemember->shortcodes->get_templates( 'login' ), ), - + array( 'id' => 'login_max_width', 'type' => 'text', @@ -1716,7 +1726,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('login_max_width'), 'desc' => __('The maximum width this shortcode can take from the page width','ultimatemember'), ), - + array( 'id' => 'login_align', 'type' => 'select', @@ -1730,7 +1740,7 @@ $this->sections[] = array( 'right' => __('Right aligned','ultimatemember'), ), ), - + array( 'id' => 'login_icons', 'type' => 'select', @@ -1744,7 +1754,7 @@ $this->sections[] = array( 'off' => __('Turn off','ultimatemember'), ), ), - + array( 'id' => 'login_primary_btn_word', 'type' => 'text', @@ -1752,7 +1762,7 @@ $this->sections[] = array( 'default' => um_get_metadefault('login_primary_btn_word'), 'desc' => __('The text that is used for primary button text','ultimatemember'), ), - + array( 'id' => 'login_secondary_btn', 'type' => 'switch', @@ -1762,7 +1772,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'login_secondary_btn_word', 'type' => 'text', @@ -1771,7 +1781,7 @@ $this->sections[] = array( 'desc' => __('The text that is used for the secondary button text','ultimatemember'), 'required' => array( 'login_secondary_btn', '=', 1 ), ), - + array( 'id' => 'login_secondary_btn_url', 'type' => 'text', @@ -1780,7 +1790,7 @@ $this->sections[] = array( 'desc' => __('You can replace default link for this button by entering custom URL','ultimatemember'), 'required' => array( 'login_secondary_btn', '=', 1 ), ), - + array( 'id' => 'login_forgot_pass_link', 'type' => 'switch', @@ -1790,7 +1800,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'login_show_rememberme', 'type' => 'switch', @@ -1800,14 +1810,14 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + ) - + ); if ( um_get_option('enable_custom_css') ) { $this->sections[] = array( - + 'subsection' => true, 'title' => __( 'Custom CSS','ultimatemember'), 'fields' => array( @@ -1819,22 +1829,22 @@ $this->sections[] = array( 'desc' => __('Any custom css rules that you specify here will be applied globally to the plugin.','ultimatemember'), 'rows' => 20, ), - + ) - + ); } /*** *** @ ***/ - + $this->sections[] = array( 'icon' => 'um-faicon-wrench', 'title' => __('Advanced','ultimatemember'), 'fields' => array( - + array( 'id' => 'import_export', 'type' => 'import_export', @@ -1851,7 +1861,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'current_url_method', 'type' => 'select', @@ -1864,7 +1874,7 @@ $this->sections[] = array( 'HTTP_HOST' => __('Use HTTP_HOST','ultimatemember'), ), ), - + array( 'id' => 'advanced_denied_roles', 'type' => 'text', @@ -1872,7 +1882,7 @@ $this->sections[] = array( 'default' => '', 'desc' => __('Comma seperate roles (role slugs) that can not be registered from frontend ever for security.','ultimatemember'), ), - + array( 'id' => 'enable_timebot', 'type' => 'switch', @@ -1882,7 +1892,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'disable_minify', 'type' => 'switch', @@ -1892,7 +1902,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'disable_menu', 'type' => 'switch', @@ -1902,7 +1912,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'js_css_exlcude_home', 'type' => 'switch', @@ -1912,7 +1922,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'js_css_exclude', 'type' => 'multi_text', @@ -1921,7 +1931,7 @@ $this->sections[] = array( 'desc' => __( 'Enter a url or page slug (e.g /about/) to disable loading the plugin\'s css and js on that page.','ultimatemember' ), 'add_text' => __('Add New Page','ultimatemember'), ), - + array( 'id' => 'js_css_include', 'type' => 'multi_text', @@ -1930,7 +1940,7 @@ $this->sections[] = array( 'desc' => __( 'Enter a url or page slug (e.g /about/) to enable loading the plugin\'s css and js on that page.','ultimatemember' ), 'add_text' => __('Add New Page','ultimatemember'), ), - + array( 'id' => 'enable_custom_css', 'type' => 'switch', @@ -1939,7 +1949,7 @@ $this->sections[] = array( 'on' => __('On','ultimatemember'), 'off' => __('Off','ultimatemember'), ), - + array( 'id' => 'allow_tracking', 'type' => 'switch', @@ -1951,4 +1961,4 @@ $this->sections[] = array( ) -); \ No newline at end of file +);