From 82d574b93b14133a07bf102015bf994a4c0c3ecc Mon Sep 17 00:00:00 2001 From: ashubawork Date: Fri, 28 Jul 2023 15:25:55 +0300 Subject: [PATCH] - fix limit chars for bio --- includes/core/um-actions-profile.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/includes/core/um-actions-profile.php b/includes/core/um-actions-profile.php index 1c548ec0..93b33ed2 100644 --- a/includes/core/um-actions-profile.php +++ b/includes/core/um-actions-profile.php @@ -1251,16 +1251,22 @@ function um_profile_header( $args ) { $description_value = wp_strip_all_tags( UM()->fields()->field_value( $description_key ) ); } } + if ( array_key_exists( 'max_chars', $args['custom_fields']['description'] ) ) { + $limit = $args['custom_fields']['description']['max_chars']; + } else { + $limit = UM()->options()->get( 'profile_bio_maxchars' ); + } ?>
- options()->get( 'profile_bio_maxchars' ); ?> + + + fields()->is_error( $description_key ) ) { echo UM()->fields()->field_error( UM()->fields()->show_error( $description_key ), true );