| @@ -1,105 +1,116 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | -/** | |
| 4 | - * User Details | |
| 5 | - * | |
| 6 | - * @package bbPress | |
| 7 | - * @subpackage Theme | |
| 8 | - */ | |
| 9 | - | |
| 10 | -// Exit if accessed directly | |
| 11 | -defined( 'ABSPATH' ) || exit; | |
| 12 | - | |
| 13 | -do_action( 'bbp_template_before_user_details' ); ?> | |
| 14 | - | |
| 15 | -<div class="column-md-3 user-details-box"> | |
| 16 | - <div class="bbp-single-user-details bg-<?php echo forumax_get_opt('user_bg') ?>"> | |
| 17 | - <div id="bbp-user-avatar"> | |
| 18 | - <span class="vcard"> | |
| 19 | - <?php | |
| 20 | - // get bbpress user avatar url | |
| 21 | - $user = bbp_get_displayed_user_field( 'user_email', 'raw' ); | |
| 22 | - ?> | |
| 23 | - <a class="url fn n" href="<?php echo get_avatar_url( $user, 500 ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?>" rel="me"> | |
| 24 | - <?php echo get_avatar( $user, apply_filters( 'bbp_single_user_details_avatar_size', 250 ) ); ?> | |
| 25 | - </a> | |
| 26 | - </span> | |
| 27 | - </div> | |
| 28 | - | |
| 29 | - <?php do_action( 'bbp_template_before_user_details_menu_items' ); ?> | |
| 30 | - | |
| 31 | - <div id="bbp-user-navigation"> | |
| 32 | - <ul> | |
| 33 | - <li class="<?php if ( bbp_is_single_user_profile() ) : ?>current<?php endif; ?>"> | |
| 34 | - <span class="vcard bbp-user-profile-link"> | |
| 35 | - <a class="url fn n" href="<?php bbp_user_profile_url(); ?>" title="<?php printf( esc_attr__( "%s's Profile", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>" rel="me"> | |
| 36 | - <?php esc_html_e( 'Profile', 'forumax' ); ?> | |
| 37 | - </a> | |
| 38 | - </span> | |
| 39 | - </li> | |
| 40 | - | |
| 41 | - <li class="<?php if ( bbp_is_single_user_topics() ) : ?>current<?php endif; ?>"> | |
| 42 | - <span class="bbp-user-topics-created-link"> | |
| 43 | - <a href="<?php bbp_user_topics_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Topics Started", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"> | |
| 44 | - <?php esc_html_e( 'Topics Started', 'forumax' ); ?> | |
| 45 | - </a> | |
| 46 | - </span> | |
| 47 | - </li> | |
| 48 | - | |
| 49 | - <li class="<?php if ( bbp_is_single_user_replies() ) : ?>current<?php endif; ?>"> | |
| 50 | - <span class="bbp-user-replies-created-link"> | |
| 51 | - <a href="<?php bbp_user_replies_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Replies Created", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"> | |
| 52 | - <?php esc_html_e( 'Replies Created', 'forumax' ); ?> | |
| 53 | - </a> | |
| 54 | - </span> | |
| 55 | - </li> | |
| 56 | - | |
| 57 | - <?php if ( bbp_is_engagements_active() ) : ?> | |
| 58 | - <li class="<?php if ( bbp_is_single_user_engagements() ) : ?>current<?php endif; ?>"> | |
| 59 | - <span class="bbp-user-engagements-created-link"> | |
| 60 | - <a href="<?php bbp_user_engagements_url(); ?>" title="<?php printf( esc_attr__( "%s's Engagements", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"> | |
| 61 | - <?php esc_html_e( 'Engagements', 'forumax' ); ?> | |
| 62 | - </a> | |
| 63 | - </span> | |
| 64 | - </li> | |
| 65 | - <?php endif; ?> | |
| 66 | - | |
| 67 | - <?php if ( bbp_is_favorites_active() ) : ?> | |
| 68 | - <li class="<?php if ( bbp_is_favorites() ) : ?>current<?php endif; ?>"> | |
| 69 | - <span class="bbp-user-favorites-link"> | |
| 70 | - <a href="<?php bbp_favorites_permalink(); ?>" title="<?php printf( esc_attr__( "%s's Favorites", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"> | |
| 71 | - <?php esc_html_e( 'Favorites', 'forumax' ); ?> | |
| 72 | - </a> | |
| 73 | - </span> | |
| 74 | - </li> | |
| 75 | - <?php endif; ?> | |
| 76 | - | |
| 77 | - <?php if ( bbp_is_user_home() || current_user_can( 'edit_user', bbp_get_displayed_user_id() ) ) : ?> | |
| 78 | - | |
| 79 | - <?php if ( bbp_is_subscriptions_active() ) : ?> | |
| 80 | - <li class="<?php if ( bbp_is_subscriptions() ) : ?>current<?php endif; ?>"> | |
| 81 | - <span class="bbp-user-subscriptions-link"> | |
| 82 | - <a href="<?php bbp_subscriptions_permalink(); ?>" title="<?php printf( esc_attr__( "%s's Subscriptions", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"> | |
| 83 | - <?php esc_html_e( 'Subscriptions', 'forumax' ); ?> | |
| 84 | - </a> | |
| 85 | - </span> | |
| 86 | - </li> | |
| 87 | - <?php endif; ?> | |
| 88 | - | |
| 89 | - <li class="<?php if ( bbp_is_single_user_edit() ) : ?>current<?php endif; ?>"> | |
| 90 | - <span class="bbp-user-edit-link"> | |
| 91 | - <a href="<?php bbp_user_profile_edit_url(); ?>" title="<?php printf( esc_attr__( "Edit %s's Profile", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"> | |
| 92 | - <?php esc_html_e( 'Edit', 'forumax' ); ?> | |
| 93 | - </a> | |
| 94 | - </span> | |
| 95 | - </li> | |
| 96 | - | |
| 97 | - <?php endif; ?> | |
| 98 | - </ul> | |
| 99 | - | |
| 100 | - <?php do_action( 'bbp_template_after_user_details_menu_items' ); ?> | |
| 101 | - </div> | |
| 102 | - </div> | |
| 103 | -</div> | |
| 104 | - | |
| 105 | -<?php do_action( 'bbp_template_after_user_details' ); | |
| 1 | +<?php | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * User Details | |
| 5 | + * | |
| 6 | + * @package bbPress | |
| 7 | + * @subpackage Theme | |
| 8 | + */ | |
| 9 | + | |
| 10 | +// Exit if accessed directly | |
| 11 | +defined( 'ABSPATH' ) || exit; | |
| 12 | + | |
| 13 | +do_action( 'bbp_template_before_user_details' ); ?> | |
| 14 | + | |
| 15 | +<div class="frmx-col-md-3 user-details-box"> | |
| 16 | + <div class="bbp-single-user-details bg-<?php echo forumax_get_opt('user_bg') ?>"> | |
| 17 | + <div id="bbp-user-avatar"> | |
| 18 | + <span class="vcard"> | |
| 19 | + <?php | |
| 20 | + // get bbpress user avatar url | |
| 21 | + $user = bbp_get_displayed_user_field( 'user_email', 'raw' ); | |
| 22 | + ?> | |
| 23 | + <a class="url fn n" href="<?php echo get_avatar_url( $user, 500 ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?>" rel="me"> | |
| 24 | + <?php echo get_avatar( $user, apply_filters( 'bbp_single_user_details_avatar_size', 250 ) ); ?> | |
| 25 | + </a> | |
| 26 | + </span> | |
| 27 | + </div> | |
| 28 | + | |
| 29 | + <?php do_action( 'bbp_template_before_user_details_menu_items' ); ?> | |
| 30 | + | |
| 31 | + <div id="bbp-user-navigation"> | |
| 32 | + <ul> | |
| 33 | + <li class="<?php if ( bbp_is_single_user_profile() && ! isset( $_GET['frmx_tab'] ) ) : ?>current<?php endif; ?>"> | |
| 34 | + <span class="vcard bbp-user-profile-link"> | |
| 35 | + <a class="url fn n" href="<?php bbp_user_profile_url(); ?>" title="<?php printf( esc_attr__( "%s's Profile", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>" rel="me"> | |
| 36 | + <?php esc_html_e( 'Profile', 'forumax' ); ?> | |
| 37 | + </a> | |
| 38 | + </span> | |
| 39 | + </li> | |
| 40 | + | |
| 41 | + <?php if ( class_exists( 'Frmx_Badges' ) ) : ?> | |
| 42 | + <li class="<?php if ( isset( $_GET['frmx_tab'] ) && 'badges' === $_GET['frmx_tab'] ) : ?>current<?php endif; ?>"> | |
| 43 | + <span class="bbp-user-badges-link"> | |
| 44 | + <a href="<?php echo esc_url( add_query_arg( 'frmx_tab', 'badges', bbp_get_user_profile_url( bbp_get_displayed_user_id() ) ) ); ?>" title="<?php printf( esc_attr__( "%s's Badges", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"> | |
| 45 | + <?php esc_html_e( 'Badges', 'forumax' ); ?> | |
| 46 | + </a> | |
| 47 | + </span> | |
| 48 | + </li> | |
| 49 | + <?php endif; ?> | |
| 50 | + | |
| 51 | + <li class="<?php if ( bbp_is_single_user_topics() ) : ?>current<?php endif; ?>"> | |
| 52 | + <span class="bbp-user-topics-created-link"> | |
| 53 | + <a href="<?php bbp_user_topics_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Topics Started", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"> | |
| 54 | + <?php esc_html_e( 'Topics Started', 'forumax' ); ?> | |
| 55 | + </a> | |
| 56 | + </span> | |
| 57 | + </li> | |
| 58 | + | |
| 59 | + <li class="<?php if ( bbp_is_single_user_replies() ) : ?>current<?php endif; ?>"> | |
| 60 | + <span class="bbp-user-replies-created-link"> | |
| 61 | + <a href="<?php bbp_user_replies_created_url(); ?>" title="<?php printf( esc_attr__( "%s's Replies Created", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"> | |
| 62 | + <?php esc_html_e( 'Replies Created', 'forumax' ); ?> | |
| 63 | + </a> | |
| 64 | + </span> | |
| 65 | + </li> | |
| 66 | + | |
| 67 | + <?php if ( bbp_is_engagements_active() ) : ?> | |
| 68 | + <li class="<?php if ( bbp_is_single_user_engagements() ) : ?>current<?php endif; ?>"> | |
| 69 | + <span class="bbp-user-engagements-created-link"> | |
| 70 | + <a href="<?php bbp_user_engagements_url(); ?>" title="<?php printf( esc_attr__( "%s's Engagements", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"> | |
| 71 | + <?php esc_html_e( 'Engagements', 'forumax' ); ?> | |
| 72 | + </a> | |
| 73 | + </span> | |
| 74 | + </li> | |
| 75 | + <?php endif; ?> | |
| 76 | + | |
| 77 | + <?php if ( bbp_is_favorites_active() ) : ?> | |
| 78 | + <li class="<?php if ( bbp_is_favorites() ) : ?>current<?php endif; ?>"> | |
| 79 | + <span class="bbp-user-favorites-link"> | |
| 80 | + <a href="<?php bbp_favorites_permalink(); ?>" title="<?php printf( esc_attr__( "%s's Favorites", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"> | |
| 81 | + <?php esc_html_e( 'Favorites', 'forumax' ); ?> | |
| 82 | + </a> | |
| 83 | + </span> | |
| 84 | + </li> | |
| 85 | + <?php endif; ?> | |
| 86 | + | |
| 87 | + <?php if ( bbp_is_user_home() || current_user_can( 'edit_user', bbp_get_displayed_user_id() ) ) : ?> | |
| 88 | + | |
| 89 | + <?php if ( bbp_is_subscriptions_active() ) : ?> | |
| 90 | + <li class="<?php if ( bbp_is_subscriptions() ) : ?>current<?php endif; ?>"> | |
| 91 | + <span class="bbp-user-subscriptions-link"> | |
| 92 | + <a href="<?php bbp_subscriptions_permalink(); ?>" title="<?php printf( esc_attr__( "%s's Subscriptions", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"> | |
| 93 | + <?php esc_html_e( 'Subscriptions', 'forumax' ); ?> | |
| 94 | + </a> | |
| 95 | + </span> | |
| 96 | + </li> | |
| 97 | + <?php endif; ?> | |
| 98 | + | |
| 99 | + <li class="<?php if ( bbp_is_single_user_edit() ) : ?>current<?php endif; ?>"> | |
| 100 | + <span class="bbp-user-edit-link"> | |
| 101 | + <a href="<?php bbp_user_profile_edit_url(); ?>" title="<?php printf( esc_attr__( "Edit %s's Profile", 'forumax' ), bbp_get_displayed_user_field( 'display_name' ) ); ?>"> | |
| 102 | + <?php esc_html_e( 'Edit', 'forumax' ); ?> | |
| 103 | + </a> | |
| 104 | + </span> | |
| 105 | + </li> | |
| 106 | + | |
| 107 | + <?php endif; ?> | |
| 108 | + | |
| 109 | + </ul> | |
| 110 | + | |
| 111 | + <?php do_action( 'bbp_template_after_user_details_menu_items' ); ?> | |
| 112 | + </div> | |
| 113 | + </div> | |
| 114 | +</div> | |
| 115 | + | |
| 116 | +<?php do_action( 'bbp_template_after_user_details' ); | |