mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
* fixed #1434;
This commit is contained in:
@@ -758,6 +758,10 @@ if ( ! class_exists( 'um\core\Form' ) ) {
|
||||
break;
|
||||
case 'textarea':
|
||||
if ( ! empty( $field['html'] ) || ( UM()->profile()->get_show_bio_key( $form ) === $k && UM()->options()->get( 'profile_show_html_bio' ) ) ) {
|
||||
$form[ $k ] = html_entity_decode( $form[ $k ] ); // required because WP_Editor send sometimes encoded content.
|
||||
preg_match('/^<p>(.*?)<\/p>$/', $form[ $k ], $match );
|
||||
$form[ $k ] = $match[1]; // required because WP_Editor send content wrapped to <p></p>
|
||||
|
||||
$allowed_html = UM()->get_allowed_html( 'templates' );
|
||||
if ( empty( $allowed_html['iframe'] ) ) {
|
||||
$allowed_html['iframe'] = array(
|
||||
|
||||
@@ -306,7 +306,7 @@ function um_user_edit_profile( $args, $form_data ) {
|
||||
//validation of correct values from options in wp-admin
|
||||
$stripslashes = '';
|
||||
if ( isset( $args['submitted'][ $key ] ) && is_string( $args['submitted'][ $key ] ) ) {
|
||||
$stripslashes = stripslashes( $args['submitted'][ $key ] );
|
||||
$stripslashes = wp_unslash( $args['submitted'][ $key ] );
|
||||
}
|
||||
|
||||
if ( 'select' === $array['type'] ) {
|
||||
@@ -361,7 +361,7 @@ function um_user_edit_profile( $args, $form_data ) {
|
||||
// translators: %s: title.
|
||||
$args['submitted'][ $key ] = sprintf( __( 'Your choosed %s', 'ultimate-member' ), $array['title'] );
|
||||
} else {
|
||||
if ( isset( $userinfo[ $key ] ) && $args['submitted'][ $key ] != $userinfo[ $key ] ) {
|
||||
if ( isset( $userinfo[ $key ] ) && $args['submitted'][ $key ] !== $userinfo[ $key ] ) {
|
||||
$to_update[ $key ] = $args['submitted'][ $key ];
|
||||
} elseif ( '' !== $args['submitted'][ $key ] ) {
|
||||
$to_update[ $key ] = $args['submitted'][ $key ];
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Profile name update
|
||||
|
||||
Reference in New Issue
Block a user