diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index c4a05f35..50efd958 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -4346,14 +4346,14 @@ if ( ! class_exists( 'um\core\Fields' ) ) { if ( UM()->options()->get( 'profile_empty_text' ) ) { $emo = UM()->options()->get( 'profile_empty_text_emo' ); - if ($emo) { + if ( $emo ) { $emo = ''; } else { $emo = false; } - if (um_is_myprofile()) { - $output .= '

' . $emo . '' . sprintf( __( 'Your profile is looking a little empty. Why not add some information!', 'ultimate-member' ), um_edit_profile_url() ) . '

'; + if ( um_is_myprofile() ) { + $output .= '

' . $emo . '' . sprintf( __( 'Your profile is looking a little empty. Why not add some information!', 'ultimate-member' ), esc_url( um_edit_profile_url() ) ) . '

'; } else { $output .= '

' . $emo . '' . __( 'This user has not added any information to their profile yet.', 'ultimate-member' ) . '

'; } diff --git a/includes/core/class-permalinks.php b/includes/core/class-permalinks.php index b22185c5..95a82936 100644 --- a/includes/core/class-permalinks.php +++ b/includes/core/class-permalinks.php @@ -88,14 +88,14 @@ if ( ! class_exists( 'um\core\Permalinks' ) ) { if ( !$id = $wp_the_query->get_queried_object_id() ) return; - if( UM()->config()->permalinks['user'] == $id ) { - $link = $this->get_current_url(); + if ( UM()->config()->permalinks['user'] == $id ) { + $link = esc_url( $this->get_current_url() ); echo "\n"; return; } $link = get_permalink( $id ); - if ( $page = get_query_var('cpage') ){ + if ( $page = get_query_var( 'cpage' ) ){ $link = get_comments_pagenum_link( $page ); echo "\n"; } @@ -303,7 +303,7 @@ if ( ! class_exists( 'um\core\Permalinks' ) ) { * @return string */ function add_query( $key, $value ) { - $this->current_url = add_query_arg( $key, $value, $this->get_current_url() ); + $this->current_url = add_query_arg( $key, $value, $this->get_current_url() ); return $this->current_url; } diff --git a/includes/um-short-functions.php b/includes/um-short-functions.php index 5960e2ce..4c16b052 100644 --- a/includes/um-short-functions.php +++ b/includes/um-short-functions.php @@ -31,7 +31,7 @@ function um_dynamic_login_page_redirect( $redirect_to = '' ) { $uri = um_get_core_page( 'login' ); - if (!$redirect_to) { + if ( ! $redirect_to ) { $redirect_to = UM()->permalinks()->get_current_url(); }