| 1 |
<?php do_action('uwp_template_before', 'profile'); ?> |
| 2 |
<?php |
| 3 |
$url_type = apply_filters('uwp_profile_url_type', 'slug'); |
| 4 |
$enable_profile_header = uwp_get_option('enable_profile_header', false); |
| 5 |
$enable_profile_body = uwp_get_option('enable_profile_body', false); |
| 6 |
//$make_profile_private = uwp_can_make_profile_private(); |
| 7 |
|
| 8 |
$author_slug = get_query_var('uwp_profile'); |
| 9 |
if ($url_type == 'id') { |
| 10 |
$user = get_user_by('id', $author_slug); |
| 11 |
} else { |
| 12 |
$user = get_user_by('slug', $author_slug); |
| 13 |
} |
| 14 |
$profile_access = apply_filters('uwp_profile_access', true, $user); |
| 15 |
//$private_profile = get_user_meta($user->ID, 'uwp_make_profile_private', true); |
| 16 |
//$access_profile_private = false; |
| 17 |
//if (current_user_can('manage_options') || get_current_user_id() == $user->ID) { |
| 18 |
// $access_profile_private = true; |
| 19 |
//} |
| 20 |
//$access_profile_private = apply_filters('uwp_user_can_access_private_profiles', $access_profile_private, $user->ID); |
| 21 |
?> |
| 22 |
<div class="uwp-content-wrap"> |
| 23 |
<?php if ($profile_access) { |
| 24 |
?> |
| 25 |
<?php do_action('uwp_template_display_notices', 'profile'); ?> |
| 26 |
<?php |
| 27 |
if ($enable_profile_header == '1') { |
| 28 |
do_action('uwp_profile_header', $user ); |
| 29 |
} |
| 30 |
?> |
| 31 |
<?php if ($enable_profile_body == '1') { ?> |
| 32 |
<div class="uwp-profile-main"> |
| 33 |
<div class="uwp-profile uwp-profile-side"> |
| 34 |
<?php do_action('uwp_profile_title', $user ); ?> |
| 35 |
<?php do_action('uwp_profile_social', $user ); ?> |
| 36 |
<?php do_action('uwp_profile_bio', $user ); ?> |
| 37 |
<?php do_action('uwp_profile_buttons', $user ); ?> |
| 38 |
</div> |
| 39 |
<?php do_action('uwp_profile_content', $user); ?> |
| 40 |
</div> |
| 41 |
<?php } ?> |
| 42 |
<?php |
| 43 |
} else { |
| 44 |
do_action('uwp_profile_access_denied', $user); |
| 45 |
} ?> |
| 46 |
</div> |
| 47 |
<?php do_action('uwp_template_after', 'profile'); ?> |