diff --git a/assets/css/um-profile.css b/assets/css/um-profile.css index 00a07b6a..1a316863 100644 --- a/assets/css/um-profile.css +++ b/assets/css/um-profile.css @@ -394,7 +394,7 @@ font-weight: normal; } .um-profile-nav-item.without-icon a {padding-left: 10px} -.um-profile-nav-item.without-icon span.title {padding-left: 0} +.um-profile-nav-item.without-icon span.title {display: inline;padding-left: 0;} .um-profile-nav-item.without-icon i {display: none} .um-profile-nav-item a:hover {background: #555} diff --git a/includes/core/class-account.php b/includes/core/class-account.php index 4b617404..a6fc0c67 100644 --- a/includes/core/class-account.php +++ b/includes/core/class-account.php @@ -751,7 +751,6 @@ if ( ! class_exists( 'um\core\Account' ) ) { * ?> */ do_action( "um_after_account_{$tab_id}", $args ); -// var_dump($args); if ( ! isset( $tab_data['show_button'] ) || false !== $tab_data['show_button'] ) { ?> diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index a146a9b7..40c2cb9e 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -2890,7 +2890,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) { $um_field_checkbox_item_title = $v; $option_value = $v; - if (!is_numeric( $k ) && in_array( $form_key, array( 'role' ) )) { + if ( ! is_numeric( $k ) && in_array( $form_key, array( 'role', 'role_radio' ) ) ) { $um_field_checkbox_item_title = $v; $option_value = $k; } diff --git a/includes/core/class-mail.php b/includes/core/class-mail.php index 330c8290..e92a208f 100644 --- a/includes/core/class-mail.php +++ b/includes/core/class-mail.php @@ -124,10 +124,14 @@ if ( ! class_exists( 'um\core\Mail' ) ) { $this->message = $this->prepare_template( $template, $args ); - add_filter( 'wp_mail_content_type', array( &$this, 'set_content_type' ) ); + if ( UM()->options()->get( 'email_html' ) ) { + $this->headers .= "Content-Type: text/html\r\n"; + } else { + $this->headers .= "Content-Type: text/plain\r\n"; + } + // Send mail wp_mail( $email, $this->subject, $this->message, $this->headers, $this->attachments ); - remove_filter( 'wp_mail_content_type', array( &$this, 'set_content_type' ) ); } @@ -481,22 +485,6 @@ if ( ! class_exists( 'um\core\Mail' ) ) { } - /** - * Set email content type - * - * - * @param $content_type - * @return string - */ - function set_content_type( $content_type ) { - if ( UM()->options()->get( 'email_html' ) ) { - return 'text/html'; - } else { - return 'text/plain'; - } - } - - /** * Ajax copy template to the theme * diff --git a/includes/core/um-actions-register.php b/includes/core/um-actions-register.php index 3abc44ed..e59f6040 100644 --- a/includes/core/um-actions-register.php +++ b/includes/core/um-actions-register.php @@ -726,4 +726,18 @@ function um_registration_set_profile_full_name( $user_id, $args ) { */ do_action( 'um_update_profile_full_name', $user_id, $args ); } -add_action( 'um_registration_set_extra_data', 'um_registration_set_profile_full_name', 10, 2 ); \ No newline at end of file +add_action( 'um_registration_set_extra_data', 'um_registration_set_profile_full_name', 10, 2 ); + + +/** + * Redirect from default registration to UM registration page + */ +function um_form_register_redirect() { + $page_id = UM()->options()->get( UM()->options()->get_core_page_id( 'register' ) ); + $register_post = get_post( $page_id ); + if ( ! empty( $register_post ) ) { + wp_safe_redirect( get_permalink( $page_id ) ); + exit(); + } +} +add_action( 'login_form_register', 'um_form_register_redirect', 10 ); \ No newline at end of file diff --git a/includes/core/um-navmenu.php b/includes/core/um-navmenu.php index 214e3258..00b4a8a1 100644 --- a/includes/core/um-navmenu.php +++ b/includes/core/um-navmenu.php @@ -47,7 +47,7 @@ if ( ! class_exists( 'UM_Menu_Item_Custom_Fields_Editor' ) ) { if ( empty( $_POST['menu-item-db-id'] ) || ! in_array( $menu_item_db_id, $_POST['menu-item-db-id'] ) ) { return; } - //var_dump($_POST['menu-item-um_nav_roles']); exit; + foreach ( self::$fields as $_key => $label ) { $key = sprintf( 'menu-item-%s', $_key );