diff --git a/includes/core/class-user.php b/includes/core/class-user.php index aa851a47..a68b2e70 100644 --- a/includes/core/class-user.php +++ b/includes/core/class-user.php @@ -836,11 +836,11 @@ if ( ! class_exists( 'um\core\User' ) ) { } // add user meta - foreach( $this->usermeta as $k=>$v ) { + foreach ( $this->usermeta as $k => $v ) { if ( $k == 'display_name') { continue; } - $this->profile[$k] = $v[0]; + $this->profile[ $k ] = $v[0]; } // add permissions diff --git a/includes/core/um-actions-profile.php b/includes/core/um-actions-profile.php index af685665..42f67788 100644 --- a/includes/core/um-actions-profile.php +++ b/includes/core/um-actions-profile.php @@ -567,7 +567,7 @@ function um_profile_header_cover_area( $args ) { ?> -
fields()->editing ) { - $hide_remove = um_profile( 'cover_photo' ) ? false : ' style="display:none;"'; + $hide_remove = um_user( 'cover_photo' ) ? false : ' style="display:none;"'; - $text = ! um_profile( 'cover_photo' ) ? __( 'Upload a cover photo', 'ultimate-member' ) : __( 'Change cover photo', 'ultimate-member' ) ; + $text = ! um_user( 'cover_photo' ) ? __( 'Upload a cover photo', 'ultimate-member' ) : __( 'Change cover photo', 'ultimate-member' ) ; $items = array( '' . $text . '', @@ -608,7 +608,7 @@ function um_profile_header_cover_area( $args ) { UM()->profile()->new_ui( 'bc', 'div.um-cover', 'click', $items ); } else { - if ( ! isset( UM()->user()->cannot_edit ) && ! um_profile( 'cover_photo' ) ) { + if ( ! isset( UM()->user()->cannot_edit ) && ! um_user( 'cover_photo' ) ) { $items = array( '' . __( 'Upload a cover photo', 'ultimate-member' ) . '', @@ -627,7 +627,7 @@ function um_profile_header_cover_area( $args ) {
- mobile()->isMobile() ) { if ( UM()->mobile()->isTablet() ) { diff --git a/includes/um-short-functions.php b/includes/um-short-functions.php index c4cbe4b7..6ba6e8ed 100644 --- a/includes/um-short-functions.php +++ b/includes/um-short-functions.php @@ -1697,10 +1697,9 @@ function um_fetch_user( $user_id ) { * * @param $key * - * @return mixed|void + * @return bool|string */ function um_profile( $key ) { - if ( ! empty( UM()->user()->profile[ $key ] ) ) { /** * UM hook