Пример #1
0
/**
 * Display user name in profile.php template.
 *
 * @since 1.0.0
 * @param object $user_data holds WP_User object
 * @access public
 * @return void
 */
function wpum_profile_show_user_name($user_data)
{
    $output = '<div class="wpum-user-display-name">';
    $output .= '<a href="' . wpum_get_user_profile_url($user_data) . '">' . esc_attr($user_data->display_name) . '</a>';
    // Show edit account only when viewing own profile
    if ($user_data->ID == get_current_user_id()) {
        $output .= '<small><a href="' . wpum_get_core_page_url('account') . '" class="wpum-profile-account-edit">' . __(' (Edit Account)', 'wpum') . '</a></small>';
    }
    $output .= '</div>';
    echo $output;
}
Пример #2
0
<?php

/**
 * WPUM Template: Current user overview.
 *
 * @package     wp-user-manager
 * @copyright   Copyright (c) 2015, Alessandro Tesoro
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
 * @since       1.0.0
 */
$user_profile_user = wpum_get_user_profile_url($current_user);
?>

<div id="wpum-current-user-overview-<?php 
echo $current_user->ID;
?>
" class="wpum-user-overview">

	<div class="wpum_one_fourth user-avatar">
		<a href="<?php 
echo esc_url($user_profile_user);
?>
"><?php 
echo get_avatar($current_user->ID, 48);
?>
</a>
	</div>

	<div class="wpum_three_fourth user-content last">
		
		<a href="<?php 
Пример #3
0
/**
 * Returns the permalink of a profile tab.
 *
 * @since 1.0.0
 * @return bool|string
 */
function wpum_get_profile_tab_permalink($user_data, $tab)
{
    $tab_slug = $tab['slug'];
    $base_link = wpum_get_user_profile_url($user_data);
    $tab_permalink = $base_link . '/' . $tab_slug;
    return $tab_permalink;
}
Пример #4
0
?>
</h4>

		<?php 
echo wpautop($user_data->user_description);
?>

		<?php 
if ($display_buttons) {
    ?>

			<?php 
    if ($link_to_profile) {
        ?>
				<a href="<?php 
        echo wpum_get_user_profile_url($user_data);
        ?>
" class="wpum-card-button"><?php 
        _e('View Profile', 'wpum');
        ?>
</a>
			<?php 
    }
    ?>

			<a href="mailto:<?php 
    echo antispambot($user_data->user_email);
    ?>
" class="wpum-card-button"><?php 
    _e('Send Email', 'wpum');
    ?>
Пример #5
0
<li id="wpum-single-user-<?php 
echo esc_attr($user->ID);
?>
" class="wpum-single-user">

	<a href="<?php 
echo wpum_get_user_profile_url($user);
?>
"><?php 
echo get_avatar($user->ID, 80);
?>
</a>

	<div class="user">
		<h3><a href="<?php 
echo wpum_get_user_profile_url($user);
?>
"><?php 
echo $user->display_name;
?>
</a></h3>
		<div class="description">
			<?php 
if ($trimmed_description) {
    ?>
				<small class="tagline"><?php 
    echo $trimmed_description;
    ?>
</small>
			<?php 
} else {
Пример #6
0
/**
 * Add a "view profile" link to the admin user table.
 *
 * @since 1.1.0
 * @param  array $actions     list of actions
 * @param  object $user_object user details
 * @return array              list of actions
 */
function wpum_admin_user_action_link($actions, $user_object)
{
    if (wpum_get_core_page_id('profile')) {
        $actions['view_profile'] = '<a href="' . wpum_get_user_profile_url($user_object) . '">' . esc_html__('View Profile', 'wpum') . '</a>';
    }
    return $actions;
}