mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed wp_mail text/plain and text/html headers;
- fixed profile tabs without icons at mobile devices;
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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'] ) { ?>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
@@ -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 );
|
||||
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 );
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user