当前位置: 首页>>代码示例>>PHP>>正文


PHP bp_loggedin_user_link函数代码示例

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


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

示例1: apply_filters

    echo '</h1>';
} else {
    echo '</h2>';
}
$args = apply_filters('wplms-main-menu', array('theme_location' => 'main-menu', 'container' => 'nav', 'menu_class' => 'menu', 'walker' => new vibe_walker(), 'fallback_cb' => 'vibe_set_menu'));
wp_nav_menu($args);
?>
                    </div>
                    <div class="col-md-3 col-sm-6 col-xs-8">
                        <div id="searchicon"><i class="icon-search-2"></i></div>
                        <?php 
if (function_exists('bp_loggedin_user_link') && is_user_logged_in()) {
    ?>
                                <ul class="topmenu">
                                    <li><a href="<?php 
    bp_loggedin_user_link();
    ?>
" class="smallimg vbplogin"><?php 
    $n = vbp_current_user_notification_count();
    echo isset($n) && $n ? '<em></em>' : '';
    bp_loggedin_user_avatar('type=full');
    ?>
<span><?php 
    bp_loggedin_user_fullname();
    ?>
</span></a></li>
                                    <?php 
    do_action('wplms_header_top_login');
    ?>
                                    <?php 
    if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins'))) || function_exists('is_plugin_active_for_network') && is_plugin_active_for_network('woocommerce/woocommerce.php')) {
开发者ID:nikitansk,项目名称:devschool,代码行数:31,代码来源:header-transparent.php

示例2: bp_loggedinuser_link

function bp_loggedinuser_link()
{
    _deprecated_function(__FUNCTION__, '1.5', 'bp_logged_in_user_link');
    bp_loggedin_user_link();
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:5,代码来源:1.5.php

示例3: widget

        function widget($args, $instance)
        {
            extract($args);
            echo $before_widget;
            if (is_user_logged_in()) {
                do_action('bp_before_sidebar_me');
                ?>
                <div id="sidebar-me">
                    <div id="bpavatar">
                        <a href="<?php 
                echo bp_loggedin_user_domain() . BP_XPROFILE_SLUG;
                ?>
/" title="<?php 
                _e('Thông tin cá nhân', 'vibe');
                ?>
"><?php 
                bp_loggedin_user_avatar('type=full');
                ?>
</a>
                    </div>
                    <ul style="width: 145px">
                        <li id="username"><a href="<?php 
                bp_loggedin_user_link();
                ?>
"><?php 
                bp_loggedin_user_fullname();
                ?>
</a></li>
                        <li><a href="<?php 
                echo bp_loggedin_user_domain() . BP_XPROFILE_SLUG;
                ?>
/" title="<?php 
                _e('Thông tin cá nhân', 'vibe');
                ?>
"><?php 
                _e('Thông tin cá nhân', 'vibe');
                ?>
</a></li>
                        <li id="vbplogout"><a href="<?php 
                echo wp_logout_url(get_permalink());
                ?>
" id="destroy-sessions" rel="nofollow" class="logout" title="<?php 
                _e('Đăng xuất', 'vibe');
                ?>
"><?php 
                _e('Đăng xuất', 'vibe');
                ?>
</a></li>
                        <li id="admin_panel_icon"><?php 
                if (current_user_can("edit_posts")) {
                    echo '<a href="' . vibe_site_url() . 'wp-admin/" title="' . __('Access admin panel', 'vibe') . '"><i class="icon-settings-1"></i></a>';
                }
                ?>
                        </li>
                    </ul>
                    <ul>
                        <?php 
                function child_wplms_get_mycred_link()
                {
                    $mycred = get_option('mycred_pref_core');
                    if (isset($mycred['buddypress']) && isset($mycred['buddypress']['history_url']) && isset($mycred['buddypress']['history_location']) && $mycred['buddypress']['history_location']) {
                        $link = bp_get_loggedin_user_link() . $mycred['buddypress']['history_url'];
                    } else {
                        $link = '#';
                    }
                    return $link;
                }
                $loggedin_menu = array('taikhoan' => array('icon' => 'icon-book-open-1', 'label' => __('Tài khoản: ' . apply_filters('get_point_user', ''), 'vibe'), 'link' => child_wplms_get_mycred_link()), 'naptientaokhoan' => array('icon' => 'icon-book-open-1', 'label' => __('Nạp tiền tài khoản', 'vibe'), 'link' => get_home_url() . '/thanh-toan-khoa-hoc/'), 'courses' => array('icon' => 'icon-book-open-1', 'label' => __('Khóa học của tôi', 'vibe'), 'link' => bp_loggedin_user_domain() . BP_COURSE_SLUG));
                if (bp_is_active('messages')) {
                    $loggedin_menu['messages'] = array('icon' => 'icon-letter-mail-1', 'label' => __('Hộp thư đến', 'vibe') . (messages_get_unread_count() ? ' <span>' . messages_get_unread_count() . '</span>' : ''), 'link' => bp_loggedin_user_domain() . BP_MESSAGES_SLUG);
                    $n = vbp_current_user_notification_count();
                    //                            $loggedin_menu['notifications']=array(
                    //                                'icon' => 'icon-exclamation',
                    //                                'label' => __('Thông báo','vibe').(($n)?' <span>'.$n.'</span>':''),
                    //                                'link' => bp_loggedin_user_domain().BP_NOTIFICATIONS_SLUG
                    //                            );
                }
                if (bp_is_active('groups')) {
                    $loggedin_menu['groups'] = array('icon' => 'icon-myspace-alt', 'label' => __('Nhóm', 'vibe'), 'link' => bp_loggedin_user_domain() . BP_GROUPS_SLUG);
                }
                $loggedin_menu = apply_filters('wplms_logged_in_top_menu', $loggedin_menu);
                foreach ($loggedin_menu as $item) {
                    echo '<li><a href="' . $item['link'] . '"><i class="' . $item['icon'] . '"></i>' . $item['label'] . '</a></li>';
                }
                ?>
                    </ul>

                    <?php 
                do_action('bp_sidebar_me');
                ?>
                </div>
                <?php 
                do_action('bp_after_sidebar_me');
                /***** If the user is not logged in, show the log form and account creation link *****/
            } else {
                if (!isset($user_login)) {
                    $user_login = '';
                }
                do_action('bp_before_sidebar_login_form');
                ?>
//.........这里部分代码省略.........
开发者ID:songlequang,项目名称:myclass,代码行数:101,代码来源:functions.php

示例4: widget

        function widget($args, $instance)
        {
            extract($args);
            echo $before_widget;
            if (is_user_logged_in()) {
                do_action('bp_before_sidebar_me');
                ?>
				<div id="sidebar-me">
					<div id="bpavatar">
						<?php 
                bp_loggedin_user_avatar('type=full');
                ?>
					</div>
					<ul>
						<li id="username"><a
								href="<?php 
                bp_loggedin_user_link();
                ?>
"><?php 
                bp_loggedin_user_fullname();
                ?>
</a></li>
						<li><a href="<?php 
                echo bp_loggedin_user_domain() . BP_XPROFILE_SLUG;
                ?>
/"
						       title="<?php 
                _e('View profile', 'vibe');
                ?>
"><?php 
                _e('View profile', 'vibe');
                ?>
</a>
						</li>
						<li id="vbplogout"><a href="<?php 
                echo wp_logout_url(get_permalink());
                ?>
"
						                      id="destroy-sessions" rel="nofollow" class="logout"
						                      title="<?php 
                _e('Log Out', 'vibe');
                ?>
"><i
									class="icon-close-off-2"></i> <?php 
                _e('LOGOUT', 'vibe');
                ?>
</a></li>
						<li id="admin_panel_icon"><?php 
                if (current_user_can("edit_posts")) {
                    echo '<a href="' . vibe_site_url() . 'wp-admin/" title="' . __('Access admin panel', 'vibe') . '"><i class="icon-settings-1"></i></a>';
                }
                ?>
						</li>
					</ul>
					<ul>
						<?php 
                $loggedin_menu = array('courses' => array('icon' => 'icon-book-open-1', 'label' => __('Courses', 'vibe'), 'link' => bp_loggedin_user_domain() . BP_COURSE_SLUG), 'stats' => array('icon' => 'icon-analytics-chart-graph', 'label' => __('Stats', 'vibe'), 'link' => bp_loggedin_user_domain() . BP_COURSE_SLUG . '/' . BP_COURSE_STATS_SLUG));
                if (bp_is_active('messages')) {
                    $loggedin_menu['messages'] = array('icon' => 'icon-letter-mail-1', 'label' => __('Inbox', 'vibe') . (messages_get_unread_count() ? ' <span>' . messages_get_unread_count() . '</span>' : ''), 'link' => bp_loggedin_user_domain() . BP_MESSAGES_SLUG);
                    $n = vbp_current_user_notification_count();
                    $loggedin_menu['notifications'] = array('icon' => 'icon-exclamation', 'label' => __('Notifications', 'vibe') . ($n ? ' <span>' . $n . '</span>' : ''), 'link' => bp_loggedin_user_domain() . BP_NOTIFICATIONS_SLUG);
                }
                if (bp_is_active('groups')) {
                    $loggedin_menu['groups'] = array('icon' => 'icon-myspace-alt', 'label' => __('Groups', 'vibe'), 'link' => bp_loggedin_user_domain() . BP_GROUPS_SLUG);
                }
                $loggedin_menu['settings'] = array('icon' => 'icon-settings', 'label' => __('Settings', 'vibe'), 'link' => bp_loggedin_user_domain() . BP_SETTINGS_SLUG);
                $loggedin_menu = apply_filters('wplms_logged_in_top_menu', $loggedin_menu);
                foreach ($loggedin_menu as $item) {
                    echo '<li><a href="' . $item['link'] . '"><i class="' . $item['icon'] . '"></i>' . $item['label'] . '</a></li>';
                }
                ?>
					</ul>

					<?php 
                do_action('bp_sidebar_me');
                ?>
				</div>
				<?php 
                do_action('bp_after_sidebar_me');
                /***** If the user is not logged in, show the log form and account creation link *****/
            } else {
                if (!isset($user_login)) {
                    $user_login = '';
                }
                do_action('bp_before_sidebar_login_form');
                ?>


				<form name="login-form" id="vbp-login-form" class="standard-form"
				      action="<?php 
                echo apply_filters('wplms_login_widget_action', vibe_site_url('wp-login.php', 'login-post'));
                ?>
" method="post">
					<label><?php 
                _e('Username', 'vibe');
                ?>
<br/>
						<input type="text" name="log" id="side-user-login" class="input" tabindex="1"
						       value="<?php 
                echo esc_attr(stripslashes($user_login));
//.........这里部分代码省略.........
开发者ID:inetbiz,项目名称:wordpress-lms,代码行数:101,代码来源:custom_bp_widgets.php

示例5: get_post_type_archive_link

				<div class="dropdown-content">
					<div class="col1">
						<ul class="submenu noheader">
							<li><a href="<?php 
echo get_post_type_archive_link('forum');
?>
">Forums Home</a></li>
							<li><a href="<?php 
echo get_post_type_archive_link('topic');
?>
">Recent Topics</a></li>
							<?php 
if (is_user_logged_in()) {
    ?>
	
							<li><a href="<?php 
    echo bp_loggedin_user_link() . '/forums/subscriptions/';
    ?>
">Your Subscriptions</a></li>
							<?php 
}
?>
	
						</ul>
					</div>
				</div>
			</div>	
		</li>		
	</ul>
</div><!-- #menu-container -->
开发者ID:tamriel-foundry,项目名称:apoc2,代码行数:30,代码来源:primary-menu.php


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