• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP um_user_profile_url函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中um_user_profile_url函数的典型用法代码示例。如果您正苦于以下问题:PHP um_user_profile_url函数的具体用法?PHP um_user_profile_url怎么用?PHP um_user_profile_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了um_user_profile_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: um_browser_url_redirect_to

function um_browser_url_redirect_to($args)
{
    global $ultimatemember;
    if (isset($_REQUEST['redirect_to']) && !empty($_REQUEST['redirect_to'])) {
        echo '<input type="hidden" name="redirect_to" id="redirect_to" value="' . $_REQUEST['redirect_to'] . '" />';
    } else {
        if (isset($args['after_login']) && !empty($args['after_login'])) {
            switch ($args['after_login']) {
                case 'redirect_admin':
                    $url = admin_url();
                    break;
                case 'redirect_profile':
                    $url = um_user_profile_url();
                    break;
                case 'redirect_url':
                    $url = $args['redirect_url'];
                    break;
                case 'refresh':
                    $url = $ultimatemember->permalinks->get_current_url();
                    break;
            }
            echo '<input type="hidden" name="redirect_to" id="redirect_to" value="' . $url . '" />';
        }
    }
}
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:25,代码来源:um-actions-misc.php


示例2: login_link

 public static function login_link($args)
 {
     add_thickbox();
     global $ultimatemember;
     $out = '';
     if (is_user_logged_in()) {
         $out .= sprintf('<a href="%s" class="profile-link n8prp-button">Profile</a>', um_user_profile_url());
         $account_page_id = $ultimatemember->permalinks->core['account'];
         if (!empty($account_page_id)) {
             $out .= sprintf('<a href="%s" class="account-link n8prp-button">Account</a>', get_permalink($account_page_id));
         }
         $out .= sprintf('<a href="%s" class="logout-link n8prp-button">Log out</a>', wp_logout_url());
     } else {
         $register_page_id = $ultimatemember->permalinks->core['register'];
         if (!empty($register_page_id)) {
             $out .= sprintf('<a href="%s" class="register-link n8prp-button">Register</a>', get_permalink($register_page_id));
         }
         $login_page_id = $ultimatemember->permalinks->core['login'];
         if (!empty($login_page_id)) {
             $out .= sprintf('<a href="%s" class="login-link n8prp-button">Log in</a>', get_permalink($login_page_id));
         }
         //$out .= sprintf('<div id="n8prp-login-form" style="display:none;">%s</div>', do_shortcode('[ultimatemember form_id=1105]') );
         //$out .= '<a href="#TB_inline?width=300&height=550&inlineId=n8prp-login-form" class="thickbox n8prp-button">Log in</a>';
         //$out .= '<script type="text/javascript">jQuery(\'.thickbox\').each(function(index, value){';
         //$out .= 'var w=window.innerWidth*.85;var h=window.innerHeight*.85;if(w>300){w=300;}';
         //$out .= 'var newHref=jQuery(this).attr(\'href\').replace(\'width=300&height=550\', \'width=\'+w+\'&height=\'+h);';
         //$out .= 'jQuery(this).attr(\'href\',newHref);});</script>';
     }
     return $out;
 }
开发者ID:essl-pvac,项目名称:n8prp-theme,代码行数:30,代码来源:shortcodes.php


示例3: user_row_actions

 function user_row_actions($actions, $user_object)
 {
     $user_id = $user_object->ID;
     um_fetch_user($user_id);
     $actions['frontend_profile'] = "<a class='' href='" . um_user_profile_url() . "'>" . __('View profile', 'ultimatemember') . "</a>";
     if (um_user('submitted')) {
         $actions['view_info'] = '<a href="#" data-modal="UM_preview_registration" data-modal-size="smaller" data-dynamic-content="um_admin_review_registration" data-arg1="' . $user_id . '" data-arg2="edit_registration">' . __('Info', 'ultimatemember') . '</a>';
     }
     $actions = apply_filters('um_admin_user_row_actions', $actions, $user_id);
     return $actions;
 }
开发者ID:jonfalcon,项目名称:ultimatemember,代码行数:11,代码来源:um-admin-users.php


示例4: user_row_actions

 function user_row_actions($actions, $user_object)
 {
     $user_id = $user_object->ID;
     um_fetch_user($user_id);
     unset($actions['edit']);
     unset($actions['delete']);
     $actions['backend_profile'] = "<a class='' href='" . admin_url('user-edit.php?user_id=' . $user_id) . "'>" . __('Edit', 'ultimatemember') . "</a>";
     $actions['frontend_profile'] = "<a class='' href='" . um_user_profile_url() . "'>" . __('Edit in frontend', 'ultimatemember') . "</a>";
     if (um_user('submitted')) {
         $actions['view_info'] = '<a href="#" data-modal="UM_preview_registration" data-modal-size="smaller" data-dynamic-content="um_admin_review_registration" data-arg1="' . $user_id . '" data-arg2="edit_registration">' . __('Info', 'ultimatemember') . '</a>';
     }
     return $actions;
 }
开发者ID:BurlesonBrad,项目名称:ultimatemember,代码行数:13,代码来源:um-admin-users.php


示例5: um_comment_link_to_profile

function um_comment_link_to_profile($return)
{
    global $comment, $ultimatemember;
    if (isset($comment->user_id) && !empty($comment->user_id)) {
        if (isset($ultimatemember->user->cached_user[$comment->user_id]) && $ultimatemember->user->cached_user[$comment->user_id]) {
            $return = '<a href="' . $ultimatemember->user->cached_user[$comment->user_id]['url'] . '">' . $ultimatemember->user->cached_user[$comment->user_id]['name'] . '</a>';
        } else {
            um_fetch_user($comment->user_id);
            $ultimatemember->user->cached_user[$comment->user_id] = array('url' => um_user_profile_url(), 'name' => um_user('display_name'));
            $return = '<a href="' . $ultimatemember->user->cached_user[$comment->user_id]['url'] . '">' . $ultimatemember->user->cached_user[$comment->user_id]['name'] . '</a>';
            um_reset_user();
        }
    }
    return $return;
}
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:15,代码来源:um-filters-commenting.php


示例6: um_account_user_photo_hook

function um_account_user_photo_hook($args)
{
    global $ultimatemember;
    extract($args);
    ?>
		
		<div class="um-account-meta radius-<?php 
    echo um_get_option('profile_photocorner');
    ?>
">
			
			<div class="um-account-meta-img uimob800-hide"><a href="<?php 
    echo um_user_profile_url();
    ?>
"><?php 
    echo get_avatar(um_user('ID'), 120);
    ?>
</a></div>
			
			<?php 
    if ($ultimatemember->mobile->isMobile()) {
        ?>
			
			<div class="um-account-meta-img-b uimob800-show" title="<?php 
        echo um_user('display_name');
        ?>
"><a href="<?php 
        echo um_user_profile_url();
        ?>
"><?php 
        echo get_avatar(um_user('ID'), 120);
        ?>
</a></div>
			
			<?php 
    } else {
        ?>
			
			<div class="um-account-meta-img-b uimob800-show um-tip-w" title="<?php 
        echo um_user('display_name');
        ?>
"><a href="<?php 
        echo um_user_profile_url();
        ?>
"><?php 
        echo get_avatar(um_user('ID'), 120);
        ?>
</a></div>
			
			<?php 
    }
    ?>
			
			<div class="um-account-name uimob800-hide"><a href="<?php 
    echo um_user_profile_url();
    ?>
"><?php 
    echo um_user('display_name');
    ?>
</a></div>
		
		</div>
	
		<?php 
}
开发者ID:blueblazeassociates,项目名称:ultimate-member,代码行数:65,代码来源:um-actions-account.php


示例7: um_profile_header

function um_profile_header($args)
{
    global $ultimatemember;
    $classes = null;
    if (!$args['cover_enabled']) {
        $classes .= ' no-cover';
    }
    $default_size = str_replace('px', '', $args['photosize']);
    $overlay = '<span class="um-profile-photo-overlay">
			<span class="um-profile-photo-overlay-s">
				<ins>
					<i class="um-faicon-camera"></i>
				</ins>
			</span>
		</span>';
    ?>

			<div class="um-header<?php 
    echo $classes;
    ?>
">

				<?php 
    do_action('um_pre_header_editprofile', $args);
    ?>

				<div class="um-profile-photo" data-user_id="<?php 
    echo um_profile_id();
    ?>
">

					<a href="<?php 
    echo um_user_profile_url();
    ?>
" class="um-profile-photo-img" title="<?php 
    echo um_user('display_name');
    ?>
"><?php 
    echo $overlay . get_avatar(um_user('ID'), $default_size);
    ?>
</a>

					<?php 
    if (!isset($ultimatemember->user->cannot_edit)) {
        $ultimatemember->fields->add_hidden_field('profile_photo');
        if (!um_profile('profile_photo')) {
            // has profile photo
            $items = array('<a href="#" class="um-manual-trigger" data-parent=".um-profile-photo" data-child=".um-btn-auto-width">' . __('Upload photo', 'ultimatemember') . '</a>', '<a href="#" class="um-dropdown-hide">' . __('Cancel', 'ultimatemember') . '</a>');
            $items = apply_filters('um_user_photo_menu_view', $items);
            echo $ultimatemember->menu->new_ui('bc', 'div.um-profile-photo', 'click', $items);
        } else {
            if ($ultimatemember->fields->editing == true) {
                $items = array('<a href="#" class="um-manual-trigger" data-parent=".um-profile-photo" data-child=".um-btn-auto-width">' . __('Change photo', 'ultimatemember') . '</a>', '<a href="#" class="um-reset-profile-photo" data-user_id="' . um_profile_id() . '" data-default_src="' . um_get_default_avatar_uri() . '">' . __('Remove photo', 'ultimatemember') . '</a>', '<a href="#" class="um-dropdown-hide">' . __('Cancel', 'ultimatemember') . '</a>');
                $items = apply_filters('um_user_photo_menu_edit', $items);
                echo $ultimatemember->menu->new_ui('bc', 'div.um-profile-photo', 'click', $items);
            }
        }
    }
    ?>

				</div>

				<div class="um-profile-meta">

					<div class="um-main-meta">

						<?php 
    if ($args['show_name']) {
        ?>
						<div class="um-name">

							<a href="<?php 
        echo um_user_profile_url();
        ?>
" title="<?php 
        echo um_user('display_name');
        ?>
"><?php 
        echo um_user('display_name', 'html');
        ?>
</a>

							<?php 
        do_action('um_after_profile_name_inline', $args);
        ?>

						</div>
						<?php 
    }
    ?>

						<div class="um-clear"></div>

						<?php 
    do_action('um_after_profile_header_name_args', $args);
    ?>
						<?php 
    do_action('um_after_profile_header_name');
    ?>

//.........这里部分代码省略.........
开发者ID:TeamSubjectMatter,项目名称:juddfoundation,代码行数:101,代码来源:um-actions-profile.php


示例8: um_user_profile_url

		<?php 
    }
    ?>
					
					<div class="um-member-card <?php 
    if (!$profile_photo) {
        echo 'no-photo';
    }
    ?>
">
						
						<?php 
    if ($show_name) {
        ?>
						<div class="um-member-name"><a href="<?php 
        echo um_user_profile_url();
        ?>
" title="<?php 
        echo esc_attr(um_user('display_name'));
        ?>
"><?php 
        echo um_user('display_name', 'html');
        ?>
</a></div>
						<?php 
    }
    ?>
						
						<?php 
    do_action('um_members_just_after_name', um_user('ID'), $args);
    ?>
开发者ID:jonfalcon,项目名称:ultimatemember,代码行数:31,代码来源:members-grid.php


示例9: um_members_directory_display

function um_members_directory_display($args)
{
    global $ultimatemember;
    extract($args);
    if (isset($args['search']) && $args['search'] == 1 && isset($args['must_search']) && $args['must_search'] == 1 && !isset($_REQUEST['um_search'])) {
        return;
    }
    if (um_members('no_users')) {
        ?>
		
			<div class="um-members-none">
				<p><?php 
        echo $args['no_users'];
        ?>
</p>
			</div>
			
		<?php 
    }
    if (um_members('users_per_page')) {
        ?>
		
			<div class="um-members">
			
				<div class="um-gutter-sizer"></div>
				
				<?php 
        $i = 0;
        foreach (um_members('users_per_page') as $member) {
            $i++;
            um_fetch_user($member);
            ?>
			
				<div class="um-member <?php 
            echo um_user('account_status');
            ?>
 <?php 
            if ($cover_photos) {
                echo 'with-cover';
            }
            ?>
">
				
					<span class="um-member-status <?php 
            echo um_user('account_status');
            ?>
"><?php 
            echo um_user('account_status_name');
            ?>
</span>
					
					<?php 
            if ($cover_photos) {
                if ($ultimatemember->mobile->isTablet()) {
                    $cover_size = 600;
                } else {
                    $cover_size = 300;
                }
                ?>
					
					<div class="um-member-cover" data-ratio="<?php 
                echo um_get_option('profile_cover_ratio');
                ?>
">
						<div class="um-member-cover-e"><?php 
                echo um_user('cover_photo', $cover_size);
                ?>
</div>
					</div>
					
					<?php 
            }
            ?>
		
					<?php 
            if ($profile_photo) {
                $default_size = str_replace('px', '', um_get_option('profile_photosize'));
                $corner = um_get_option('profile_photocorner');
                ?>
					<div class="um-member-photo radius-<?php 
                echo $corner;
                ?>
"><a href="<?php 
                echo um_user_profile_url();
                ?>
" title="<?php 
                echo um_user('display_name');
                ?>
"><?php 
                echo get_avatar(um_user('ID'), $default_size);
                ?>
</a></div>
					<?php 
            }
            ?>
					
					<div class="um-member-card <?php 
            if (!$profile_photo) {
                echo 'no-photo';
            }
//.........这里部分代码省略.........
开发者ID:dracudakid,项目名称:WP_TrungTamTinHoc,代码行数:101,代码来源:um-actions-members.php


示例10: um_profile_header

function um_profile_header($args)
{
    global $ultimatemember;
    $classes = null;
    if (!$args['cover_enabled']) {
        $classes .= ' no-cover';
    }
    $default_size = str_replace('px', '', $args['photosize']);
    $overlay = '<span class="um-profile-photo-overlay">
			<span class="um-profile-photo-overlay-s">
				<ins>
					<i class="um-faicon-camera"></i>
				</ins>
			</span>
		</span>';
    ?>
		
			<div class="um-header<?php 
    echo $classes;
    ?>
">
			
				<?php 
    do_action('um_pre_header_editprofile', $args);
    ?>
				
				<div class="um-profile-photo" data-user_id="<?php 
    echo um_profile_id();
    ?>
">

					<a href="<?php 
    echo um_user_profile_url();
    ?>
" class="um-profile-photo-img" title="<?php 
    echo um_user('display_name');
    ?>
"><?php 
    echo $overlay . get_avatar(um_user('ID'), $default_size);
    ?>
</a>
					
					<?php 
    if (!isset($ultimatemember->user->cannot_edit)) {
        $ultimatemember->fields->add_hidden_field('profile_photo');
        if (!um_profile('profile_photo')) {
            // has profile photo
            $items = array('<a href="#" class="um-manual-trigger" data-parent=".um-profile-photo" data-child=".um-btn-auto-width">' . __('Загрузить фото', 'ultimatemember') . '</a>', '<a href="#" class="um-dropdown-hide">' . __('Отменить', 'ultimatemember') . '</a>');
            echo $ultimatemember->menu->new_ui('bc', 'div.um-profile-photo', 'click', $items);
        } else {
            if ($ultimatemember->fields->editing == true) {
                $items = array('<a href="#" class="um-manual-trigger" data-parent=".um-profile-photo" data-child=".um-btn-auto-width">' . __('Изменить фотографию', 'ultimatemember') . '</a>', '<a href="#" class="um-reset-profile-photo" data-user_id="' . um_profile_id() . '" data-default_src="' . um_get_default_avatar_uri() . '">' . __('Удалить фото', 'ultimatemember') . '</a>', '<a href="#" class="um-dropdown-hide">' . __('Отменить', 'ultimatemember') . '</a>');
                echo $ultimatemember->menu->new_ui('bc', 'div.um-profile-photo', 'click', $items);
            }
        }
    }
    ?>
					
				</div>
				
				<div class="um-profile-meta">
				
					<div class="um-main-meta">
					
						<?php 
    if ($args['show_name']) {
        ?>
						<div class="um-name">
							
							<a href="<?php 
        echo um_user_profile_url();
        ?>
" title="<?php 
        echo um_user('display_name');
        ?>
"><?php 
        echo um_user('display_name', 'html');
        ?>
</a>
							
							<?php 
        do_action('um_after_profile_name_inline', $args);
        ?>
						
						</div>
						<?php 
    }
    ?>
						
						<div class="um-clear"></div>
						
						<?php 
    do_action('um_after_profile_header_name_args', $args);
    ?>
						<?php 
    do_action('um_after_profile_header_name');
    ?>
						
					</div>
					
//.........这里部分代码省略.........
开发者ID:Ksajikyan,项目名称:poiskuslug,代码行数:101,代码来源:um-actions-profile.php


示例11: custom_um_profile_header

function custom_um_profile_header($args)
{
    global $ultimatemember;
    $user_id = get_current_user_id();
    $userrole = get_user_meta($user_id, 'role', true);
    $classes = null;
    if (!$args['cover_enabled']) {
        $classes .= ' no-cover';
    }
    $default_size = str_replace('px', '', $args['photosize']);
    $overlay = '<span class="um-profile-photo-overlay">
      <span class="um-profile-photo-overlay-s">
        <ins>
          <i class="um-faicon-camera"></i>
        </ins>
      </span>
    </span>';
    ?>
	<div class="um-header<?php 
    echo $classes;
    ?>
">

		<?php 
    do_action('um_pre_header_editprofile', $args);
    ?>

		<div class="um-profile-photo" data-user_id="<?php 
    echo um_profile_id();
    ?>
">

			<a href="<?php 
    echo um_user_profile_url();
    ?>
" class="um-profile-photo-img" title="<?php 
    echo um_user('display_name');
    ?>
"><?php 
    echo $overlay . get_avatar(um_user('ID'), $default_size);
    ?>
</a>


			<?php 
    if (!isset($ultimatemember->user->cannot_edit)) {
        $ultimatemember->fields->add_hidden_field('profile_photo');
        if (!um_profile('profile_photo')) {
            // has profile photo
            $items = array('<a href="#" class="um-manual-trigger" data-parent=".um-profile-photo" data-child=".um-btn-auto-width">' . __('Upload photo', 'ultimatemember') . '</a>', '<a href="#" class="um-dropdown-hide">' . __('Cancel', 'ultimatemember') . '</a>');
            echo $ultimatemember->menu->new_ui('bc', 'div.um-profile-photo', 'click', $items);
        } else {
            if ($ultimatemember->fields->editing == true) {
                $items = array('<a href="#" class="um-manual-trigger" data-parent=".um-profile-photo" data-child=".um-btn-auto-width">' . __('Change photo', 'ultimatemember') . '</a>', '<a href="#" class="um-reset-profile-photo" data-user_id="' . um_profile_id() . '" data-default_src="' . um_get_default_avatar_uri() . '">' . __('Remove photo', 'ultimatemember') . '</a>', '<a href="#" class="um-dropdown-hide">' . __('Cancel', 'ultimatemember') . '</a>');
                echo $ultimatemember->menu->new_ui('bc', 'div.um-profile-photo', 'click', $items);
            }
        }
    }
    ?>

		</div>

		<div class="um-profile-meta">

			<div class="um-main-meta">

				<?php 
    if ($args['show_name']) {
        ?>
					<div class="um-name">

						<a href="<?php 
        echo um_user_profile_url();
        ?>
" title="<?php 
        echo um_user('display_name');
        ?>
"><?php 
        echo um_user('display_name');
        ?>
</a>

						<?php 
        do_action('um_after_profile_name_inline', $args);
        ?>
						<?php 
        if ($ultimatemember->fields->editing == true) {
            ?>
							<?php 
            if ($userrole == 'advisee') {
                ?>
								<a href="javascript:void(0);" class="hb-button" id="um-upgrade">Upgrade to become an Advisor</a>
							<?php 
            }
            ?>
						<?php 
        }
        ?>

					</div>
//.........这里部分代码省略.........
开发者ID:KKRTEAM,项目名称:cis_admq,代码行数:101,代码来源:functions.php


示例12: get_profile_url

 /**
  * 
  * get profile url 
  */
 private function get_profile_url($user)
 {
     $wc_profile_url = '';
     $wc_profile_url_filter = '';
     if ($user) {
         if (class_exists('BuddyPress')) {
             $wc_profile_url = bp_core_get_user_domain($user->ID);
         } else {
             if (class_exists('XooUserUltra')) {
                 global $xoouserultra;
                 $wc_profile_url = $xoouserultra->userpanel->get_user_profile_permalink($user->ID);
             } else {
                 if (class_exists('userpro_api')) {
                     global $userpro;
                     $wc_profile_url = $userpro->permalink($user->ID);
                 } else {
                     if (class_exists('UM_API')) {
                         um_fetch_user($user->ID);
                         $wc_profile_url = um_user_profile_url();
                     } else {
                         if (count_user_posts($user->ID)) {
                             $wc_profile_url = get_author_posts_url($user->ID);
                         }
                     }
                 }
             }
         }
         $user_id = $user->ID;
         $wc_profile_url_data = apply_filters('wpdiscuz_profile_url', array('user_id' => $user_id, 'permalink' => ''));
         $wc_profile_url_filter = $wc_profile_url_data['permalink'];
     }
     return $wc_profile_url_filter ? $wc_profile_url_filter : $wc_profile_url;
 }
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:37,代码来源:tpl-comment.php


示例13: most_liked_users

 /**
  * Most Liked Activities Function
  *
  * @author       	Alimir
  * @since           1.2
  * @updated         2.3
  * @updated         2.4
  * @return			String
  */
 public function most_liked_users(array $settings)
 {
     global $wpdb;
     $request = "SELECT T.user_id, SUM(T.CountUser) AS SumUser\n\t\t\t\t\tFROM(\n\t\t\t\t\tSELECT user_id, count(user_id) AS CountUser\n\t\t\t\t\tFROM " . $wpdb->prefix . "ulike\n\t\t\t\t\tWHERE user_id BETWEEN 1 AND 999999\n                    " . $this->period($settings['period']) . "\n\t\t\t\t\tGROUP BY user_id\n\t\t\t\t\tUNION ALL\n\t\t\t\t\tSELECT user_id, count(user_id) AS CountUser\n\t\t\t\t\tFROM " . $wpdb->prefix . "ulike_activities\n\t\t\t\t\tWHERE user_id BETWEEN 1 AND 999999\n                    " . $this->period($settings['period']) . "\n\t\t\t\t\tGROUP BY user_id\n\t\t\t\t\tUNION ALL\n\t\t\t\t\tSELECT user_id, count(user_id) AS CountUser\n\t\t\t\t\tFROM " . $wpdb->prefix . "ulike_comments\n\t\t\t\t\tWHERE user_id BETWEEN 1 AND 999999\n                    " . $this->period($settings['period']) . "\n\t\t\t\t\tGROUP BY user_id\n\t\t\t\t\tUNION ALL\n\t\t\t\t\tSELECT user_id, count(user_id) AS CountUser\n\t\t\t\t\tFROM " . $wpdb->prefix . "ulike_forums\n\t\t\t\t\tWHERE user_id BETWEEN 1 AND 999999\n                    " . $this->period($settings['period']) . "\n\t\t\t\t\tGROUP BY user_id\n\t\t\t\t\t) AS T\n\t\t\t\t\tGROUP BY T.user_id\n\t\t\t\t\tORDER BY SumUser DESC LIMIT " . $settings['numberOf'] . "\n\t\t\t\t\t";
     $likes = $wpdb->get_results($request);
     foreach ($likes as $like) {
         $get_user_id = stripslashes($like->user_id);
         $get_user_info = get_userdata($get_user_id);
         $get_likes_count = $like->SumUser;
         $return_profile_url = '#';
         $echo_likes_count = $settings['show_count'] == '1' ? ' (' . $get_likes_count . ' ' . __('Like', WP_ULIKE_SLUG) . ')' : '';
         if ($settings['profile_url'] == 'bp' && function_exists('bp_core_get_user_domain')) {
             $return_profile_url = bp_core_get_user_domain($like->user_id);
         } else {
             if ($settings['profile_url'] == 'um' && function_exists('um_fetch_user')) {
                 um_fetch_user($like->user_id);
                 $return_profile_url = um_user_profile_url();
             }
         }
         if ($get_user_info != '') {
             echo $settings['before_item'];
             echo '<a href="' . $return_profile_url . '" class="user-tooltip" title="' . $get_user_info->display_name . $echo_likes_count . '">' . get_avatar($get_user_info->user_email, $settings['sizeOf'], '', 'avatar') . '</a>';
             echo $settings['after_item'];
         }
     }
 }
开发者ID:NickIvanter,项目名称:wp-ulike,代码行数:35,代码来源:class-widget.php


示例14: um_edit_profile_url

function um_edit_profile_url()
{
    global $ultimatemember;
    if (um_is_core_page('user')) {
        $url = $ultimatemember->permalinks->get_current_url();
    } else {
        $url = um_user_profile_url();
    }
    $url = remove_query_arg('profiletab', $url);
    $url = remove_query_arg('subnav', $url);
    $url = add_query_arg('profiletab', 'main', $url);
    $url = add_query_arg('um_action', 'edit', $url);
    return $url;
}
开发者ID:TeamSubjectMatter,项目名称:juddfoundation,代码行数:14,代码来源:um-short-functions.php


示例15: um_user_login

function um_user_login($args)
{
    global $ultimatemember;
    extract($args);
    $rememberme = isset($args['rememberme']) ? 1 : 0;
    $ultimatemember->user->auto_login(um_user('ID'), $rememberme);
    // Hook that runs after successful login and before user is redirected
    do_action('um_on_login_before_redirect', um_user('ID'));
    // Priority redirect
    if (isset($args['redirect_to'])) {
        exit(wp_redirect($args['redirect_to']));
    }
    // Role redirect
    $after = um_user('after_login');
    switch ($after) {
        case 'redirect_admin':
            exit(wp_redirect(admin_url()));
            break;
        case 'redirect_profile':
            exit(wp_redirect(um_user_profile_url()));
            break;
        case 'redirect_url':
            exit(wp_redirect(um_user('login_redirect_url')));
            break;
        case 'refresh':
            exit(wp_redirect($ultimatemember->permalinks->get_current_url()));
            break;
    }
}
开发者ID:smithsa,项目名称:daily-job-hunter,代码行数:29,代码来源:um-actions-login.php


示例16: um_user_login

function um_user_login($args)
{
    global $ultimatemember;
    extract($args);
    $rememberme = isset($args['rememberme']) ? 1 : 0;
    if (um_get_option('deny_admin_frontend_login') && strstr(um_user('wp_roles'), 'administrator')) {
        wp_die(__('This action has been prevented for security measures.', 'ultimatemember'));
    }
    $ultimatemember->user->auto_login(um_user('ID'), $rememberme);
    // Hook that runs after successful login and before user is redirected
    do_action('um_on_login_before_redirect', um_user('ID'));
    // Priority redirect
    if (isset($args['redirect_to']) && !empty($args['redirect_to'])) {
        exit(wp_redirect(urldecode($args['redirect_to'])));
    }
    // Role redirect
    $after = um_user('after_login');
    switch ($after) {
        case 'redirect_admin':
            exit(wp_redirect(admin_url()));
            break;
        case 'redirect_profile':
            exit(wp_redirect(um_user_profile_url()));
            break;
        case 'redirect_url':
            exit(wp_redirect(um_user('login_redirect_url')));
            break;
        case 'refresh':
            exit(wp_redirect($ultimatemember->permalinks->get_current_url()));
            break;
    }
}
开发者ID:lytranuit,项目名称:wordpress,代码行数:32,代码来源:um-actions-login.php


示例17: um_edit_profile_url

function um_edit_profile_url()
{
    global $ultimatemember;
    $url = um_user_profile_url();
    $url = remove_query_arg('profiletab', $url);
    $url = remove_query_arg('subnav', $url);
    $url = add_query_arg('profiletab', 'main', $url);
    $url = add_query_arg('um_action', 'edit', $url);
    return $url;
}
开发者ID:lytranuit,项目名称:wordpress,代码行数:10,代码来源:um-short-functions.php


示例18: get_liked_users

 /**
  * Get Liked User
  *
  * @author       	Alimir
  * @param           Integer $id
  * @param           String $table
  * @param           String $column_id
  * @param           String $setting_key
  * @since           2.0
  * @updated         2.3
  * @return			String
  */
 public function get_liked_users($id, $table, $column_id, $setting_key)
 {
     $users_list = '';
     $limit_num = wp_ulike_get_setting($setting_key, 'number_of_users');
     if ($limit_num == 0) {
         $limit_num = 10;
     }
     $get_users = $this->wpdb->get_results("SELECT user_id FROM " . $this->wpdb->prefix . "{$table} WHERE {$column_id} = '{$id}' AND status = 'like' AND user_id BETWEEN 1 AND 999999 GROUP BY user_id LIMIT {$limit_num}");
     if (wp_ulike_get_setting($setting_key, 'users_liked_box') == '1' && !$get_users == '') {
         $get_template = wp_ulike_get_setting($setting_key, 'users_liked_box_template');
         if ($get_template == '') {
             $get_template = '<br />';
         }
         $inner_template = $this->get_template_between($get_template, "%START_WHILE%", "%END_WHILE%");
         foreach ($get_users as $get_user) {
             $user_info = get_userdata($get_user->user_id);
             $out_template = $inner_template;
             if ($user_info) {
                 if (strpos($out_template, '%USER_AVATAR%') !== false) {
                     $avatar_size = wp_ulike_get_setting($setting_key, 'users_liked_box_avatar_size');
                     $USER_AVATAR = get_avatar($user_info->user_email, $avatar_size, '', 'avatar');
                     $out_template = str_replace("%USER_AVATAR%", $USER_AVATAR, $out_template);
                 }
                 if (strpos($out_template, '%USER_NAME%') !== false) {
                     $USER_NAME = $user_info->display_name;
                     $out_template = str_replace("%USER_NAME%", $USER_NAME, $out_template);
                 }
                 if (strpos($out_template, '%UM_PROFILE_URL%') !== false && function_exists('um_fetch_user')) {
                     global $ultimatemember;
                     um_fetch_user($user_info->ID);
                     $UM_PROFILE_URL = um_user_profile_url();
                     $out_template = str_replace("%UM_PROFILE_URL%", $UM_PROFILE_URL, $out_template);
                 }
                 if (strpos($out_template, '%BP_PROFILE_URL%') !== false && function_exists('bp_core_get_user_domain')) {
                     $BP_PROFILE_URL = bp_core_get_user_domain($user_info->ID);
                     $out_template = str_replace("%BP_PROFILE_URL%", $BP_PROFILE_URL, $out_template);
                 }
                 $users_list .= $out_template;
             }
         }
         if ($users_list != '') {
             $users_list = $this->put_template_between($get_template, $users_list, "%START_WHILE%", "%END_WHILE%");
         }
     }
     return $users_list;
 }
开发者ID:pantelicnevena,项目名称:hanan,代码行数:58,代码来源:class-ulike.php


示例19: um_post_registration

function um_post_registration($user_id, $args)
{
    global $ultimatemember;
    unset($args['user_id']);
    extract($args);
    $status = um_user('status');
    do_action("um_post_registration_global_hook", $user_id, $args);
    do_action("um_post_registration_{$status}_hook", $user_id, $args);
    if (!is_admin()) {
        do_action("track_{$status}_user_registration");
        // Priority redirect
        if (isset($args['redirect_to'])) {
            exit(wp_redirect(urldecode($args['redirect_to'])));
        }
        if ($status == 'approved') {
            $ultimatemember->user->auto_login($user_id);
            do_action('um_registration_after_auto_login', $user_id);
            if (um_user('auto_approve_act') == 'redirect_url' && um_user('auto_approve_url') !== '') {
                exit(wp_redirect(um_user('auto_approve_url')));
            }
            if (um_user('auto_approve_act') == 'redirect_profile') {
                exit(wp_redirect(um_user_profile_url()));
            }
        }
        if ($status != 'approved') {
            if (um_user($status . '_action') == 'redirect_url' && um_user($status . '_url') != '') {
                exit(wp_redirect(um_user($status . '_url')));
            }
            if (um_user($status . '_action') == 'show_message' && um_user($status . '_message') != '') {
                $url = $ultimatemember->permalinks->get_current_url();
                $url = add_query_arg('message', esc_attr($status), $url);
                $url = add_query_arg('uid', esc_attr(um_user('ID')), $url);
                exit(wp_redirect($url));
            }
        }
    }
}
开发者ID:alexpull,项目名称:ultimatemember,代码行数:37,代码来源:um-actions-register.php


示例20: locate_user_profile

 function locate_user_profile()
 {
     global $post, $ultimatemember;
     if (um_queried_user() && um_is_core_page('user')) {
         if (um_get_option('permalink_base') == 'user_login') {
             $user_id = username_exists(um_queried_user());
             // Try nice name
             if (!$user_id) {
                 $slug = um_queried_user();
                 $slug = str_replace('.', '-', $slug);
                 $the_user = get_user_by('slug', $slug);
                 if (isset($the_user->ID)) {
                     $user_id = $the_user->ID;
                 }
             }
         }
         if (um_get_option('permalink_base') == 'user_id') {
             $user_id = $ultimatemember->user->user_exists_by_id(um_queried_user());
         }
         if (in_array(um_get_option('permalink_base'), array('name', 'name_dash', 'name_dot', 'name_plus'))) {
             $user_id = $ultimatemember->user->user_exists_by_name(um_queried_user());
         }
         /** USER EXISTS SET USER AND CONTINUE **/
         if ($user_id) {
             um_set_requested_user($user_id);
         } else {
             exit(wp_redirect(um_get_core_page('user')));
         }
     } else {
         if (um_is_core_page('user')) {
             if (is_user_logged_in()) {
                 // just redirect to their profile
                 $query = $ultimatemember->permalinks->get_query_array();
                 $url = um_user_profile_url();
                 if ($query) {
                     foreach ($query as $key => $val) {
                         $url = add_query_arg($key, $val, $url);
                     }
                 }
                 exit(wp_redirect($url));
             }
         }
     }
 }
开发者ID:samuelshih,项目名称:daily-gazette,代码行数:44,代码来源:um-rewrite.php



注:本文中的um_user_profile_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP um_user_uploads_uri函数代码示例发布时间:2022-05-23
下一篇:
PHP um_user_can函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap