-
i edited the fields-functions around line 616 like this…
PHP12345678if (isset($array['type']) && $array['type'] == 'file'){$file = userpro_profile_data( $key, $user_id );if ($file){if(substr($file, -4) === '.mp3') {$value = '<div class="userpro-file-input">'.do_shortcode('[audio src="'.$file.'"]').'</div>';} ...But now i want to show the audio files only userrole x …
i’ve tested:
PHP1234567$value = '<div class="userpro-file-input">'.do_shortcode('[audio src="'.$file.'"]').'</div>';$user_id = get_current_user_id();$user_roles = $user_id->roles;$user_role = array_shift($user_roles);$testi = '<strong>Current User Role</strong>: ' . $user_role . ':: '.$user_id;As admin i see my user_role, but the code stopped when i logged in as another.
(sorry my bad english)
kris
$value = do_shortcode('[userpro_private restrict_to_roles=subscriber,administrator][audio src="'.$file.'"][/userpro_private]');
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.