From dd587d636bb3fe7c78b05740005d1219ce853d66 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Thu, 6 Oct 2016 00:07:37 +0800 Subject: [PATCH] Allow um_show_content to swap profile id --- core/um-shortcodes.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/um-shortcodes.php b/core/um-shortcodes.php index 68943ee3..0d562a83 100644 --- a/core/um-shortcodes.php +++ b/core/um-shortcodes.php @@ -547,9 +547,16 @@ class UM_Shortcodes { $a = shortcode_atts( array( 'roles' => '', 'not' => '', + 'is_profile' => false, ), $atts ); - um_fetch_user( $user_ID ); + if( $a['is_profile'] ){ + um_fetch_user( um_profile_id() ); + }else{ + um_fetch_user( $user_ID ); + } + + $current_user_role = um_user('role');