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


PHP bp_loggedin_user_avatar函数代码示例

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


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

示例1: widget

 function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     echo $before_widget;
     // set widget title when logged out
     if (!is_user_logged_in()) {
         $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
         if (!empty($title)) {
             echo $before_title . $title . $after_title;
         }
     }
     // start widget display code
     if (function_exists('bp_is_active')) {
         // check is user is logged in
         if (is_user_logged_in()) {
             echo "<div id='sidebarme'>";
             echo "<a href='" . bp_loggedin_user_domain() . "'>";
             echo bp_loggedin_user_avatar('type=thumb');
             echo "</a>";
             echo "<ul class='sidebarme-quicklinks'>";
             echo "<li class='sidebarme-username'>" . bp_core_get_userlink(bp_loggedin_user_id()) . "</li>";
             echo "<li class='sidebarme-profile'>";
             echo "<a href='" . bp_loggedin_user_domain() . "profile/edit'>" . __('Edit Profile', 'boss') . "</a>";
             echo " &middot; ";
             echo wp_loginout();
             echo "</li>";
             echo "</ul>";
             echo "</div>";
             // check if user is logged out
         } else {
             echo "<form name='login-form' id='sidebar-login-form' class='standard-form' action='" . site_url('wp-login.php', 'login_post') . "' method='post'>";
             echo "<label>" . __('Username', 'boss') . "</label>";
             $return = isset($_POST['value']) ? $_POST['value'] : '';
             $return .= "<input type='text' name='log' id='sidebar-user-login' class='input' value='";
             if (isset($user_login)) {
                 $return .= esc_attr(stripslashes($user_login));
             }
             $return .= "' tabindex='97' />";
             echo $return;
             echo "<label>" . __('Password', 'boss') . "</label>";
             echo "<input type='password' name='pwd' id='sidebar-user-pass' class='input' value='' tabindex='98' />";
             echo "<p class='forgetmenot'><input name='rememberme' type='checkbox' id='sidebar-rememberme' value='forever' tabindex='99' /> " . __('Remember Me', 'boss') . "</p>";
             echo do_action('bp_sidebar_login_form');
             echo "<input type='submit' name='wp-submit' id='sidebar-wp-submit' value='" . __('Log In', 'boss') . "' tabindex='100' />";
             if (bp_get_signup_allowed()) {
                 echo " <a class='sidebar-wp-register' href='" . bp_get_signup_page() . "'>" . __('Register', 'boss') . "</a>";
             }
             echo "</form>";
         }
     }
     // end widget display code
     echo $after_widget;
 }
开发者ID:tvolmari,项目名称:hammydowns,代码行数:53,代码来源:buddyboss-profile-widget-loader.php

示例2: sidebar

    function sidebar()
    {
        if (preg_match('|^([^\\?]+)|', $_SERVER['REQUEST_URI'], $match)) {
            $url = $match[0];
        } else {
            $url = get_option('siteurl');
        }
        $url = apply_filters('gconnect_login_redirect', $url);
        ?>
	<div class="widget gc-login-widget"><div class="padder">

	<?php 
        if ($this->theme->is_home()) {
            do_action('bp_inside_before_sidebar');
        }
        ?>

	<?php 
        if (is_user_logged_in()) {
            ?>
		<?php 
            do_action('bp_before_sidebar_me');
            ?>

			<div id="sidebar-me">
				<?php 
            bp_loggedin_user_avatar('type=thumb&width=40&height=40');
            ?>
				<h3><?php 
            echo bp_core_get_userlink(bp_loggedin_user_id());
            ?>
</h3>
				<a class="button" href="<?php 
            echo wp_logout_url(bp_get_root_domain());
            ?>
"><?php 
            _e('Log Out', 'buddypress');
            ?>
</a>
			<?php 
            do_action('bp_sidebar_me');
            ?>
			</div>
		<?php 
            do_action('bp_after_sidebar_me');
            ?>
	<?php 
        } else {
            ?>
		<?php 
            do_action('bp_before_sidebar_login_form');
            ?>

			<form name="login-form" id="login-form" class="standard-form" action="<?php 
            echo site_url('wp-login.php', 'login');
            ?>
" method="post">
				<label><?php 
            _e('Username', 'buddypress');
            ?>
<br />
				<input type="text" name="log" id="userbar_user_login" class="input" tabindex="97" /></label>

				<label><?php 
            _e('Password', 'buddypress');
            ?>
<br />
				<input type="password" name="pwd" id="userbar_user_pass" class="input" tabindex="98" /></label>

				<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="userbar_rememberme" value="forever" tabindex="99" /> <?php 
            _e('Remember Me', 'buddypress');
            ?>
</label></p>

				<input type="submit" name="wp-submit" id="userbar_wp-submit" value="<?php 
            _e('Log In', 'genesis-connect');
            ?>
" tabindex="100" />
				<input type="hidden" name="redirect_to" value="<?php 
            echo $url;
            ?>
" />
				<input type="hidden" name="testcookie" value="1" />
			</form>
		<?php 
            do_action('bp_after_sidebar_login_form');
            ?>

	<?php 
        }
        ?>

	<?php 
        if ($this->theme->is_home()) {
            do_action('bp_inside_after_sidebar');
        }
        ?>

	    </div></div><!-- .padder --><?php 
    }
开发者ID:hscale,项目名称:webento,代码行数:100,代码来源:class.front.php

示例3: bp_dtheme_ajax_messages_send_reply

function bp_dtheme_ajax_messages_send_reply()
{
    global $bp;
    check_ajax_referer('messages_send_message');
    $result = messages_new_message(array('thread_id' => $_REQUEST['thread_id'], 'content' => $_REQUEST['content']));
    if ($result) {
        ?>
		<div class="message-box new-message">
			<div class="message-metadata">
				<?php 
        do_action('bp_before_message_meta');
        ?>
				<?php 
        echo bp_loggedin_user_avatar('type=thumb&width=30&height=30');
        ?>

				<strong><a href="<?php 
        echo $bp->loggedin_user->domain;
        ?>
"><?php 
        echo $bp->loggedin_user->fullname;
        ?>
</a> <span class="activity"><?php 
        printf(__('Sent %s', 'buddypress'), bp_core_time_since(bp_core_current_time()));
        ?>
</span></strong>

				<?php 
        do_action('bp_after_message_meta');
        ?>
			</div>

			<?php 
        do_action('bp_before_message_content');
        ?>

			<div class="message-content">
				<?php 
        echo stripslashes(apply_filters('bp_get_the_thread_message_content', $_REQUEST['content']));
        ?>
			</div>

			<?php 
        do_action('bp_after_message_content');
        ?>

			<div class="clear"></div>
		</div>
	<?php 
    } else {
        echo "-1<div id='message' class='error'><p>" . __('There was a problem sending that reply. Please try again.', 'buddypress') . '</p></div>';
    }
}
开发者ID:hscale,项目名称:webento,代码行数:53,代码来源:ajax.php

示例4: cc_login_widget

/**
 *  buddypress login widget
 *
 * @package Custom Community
 * @since 1.8.3
 */
function cc_login_widget()
{
    ?>
	<?php 
    global $cap;
    ?>
		<?php 
    do_action('bp_inside_before_sidebar');
    ?>
	
		<?php 
    if (is_user_logged_in()) {
        ?>
	
			<?php 
        do_action('bp_before_sidebar_me');
        ?>
			<div class="widget">
			<div id="sidebar-me">
				<a href="<?php 
        echo bp_loggedin_user_domain();
        ?>
">
					<?php 
        bp_loggedin_user_avatar('type=thumb&width=40&height=40');
        ?>
				</a>
	
				<h4><?php 
        echo bp_core_get_userlink(bp_loggedin_user_id());
        ?>
</h4>
				<a class="button logout" href="<?php 
        echo wp_logout_url(bp_get_root_domain());
        ?>
"><?php 
        _e('Log Out', 'cc');
        ?>
</a>
	
				<?php 
        do_action('bp_sidebar_me');
        ?>
			</div>
			</div>
			<?php 
        do_action('bp_after_sidebar_me');
        ?>
	
			<?php 
        if (function_exists('bp_message_get_notices')) {
            ?>
				<?php 
            bp_message_get_notices();
            /* Site wide notices to all users */
            ?>
			<?php 
        }
        ?>
	
		<?php 
    } else {
        ?>
	
			<?php 
        do_action('bp_before_sidebar_login_form');
        ?>
			<div class="widget">
			<p id="login-text">
			<?php 
        if (!$cap->bp_login_sidebar_text) {
            ?>
				<?php 
            _e('To start connecting please log in first.', 'cc');
            ?>
			<?php 
        } else {
            ?>
				<?php 
            echo $cap->bp_login_sidebar_text;
            ?>
			<?php 
        }
        ?>
				<?php 
        if (bp_get_signup_allowed()) {
            ?>
					<?php 
            printf(__(' You can also <a href="%s" title="Create an account">create an account</a>.', 'cc'), site_url(BP_REGISTER_SLUG . '/'));
            ?>
				<?php 
        }
        ?>
			</p>
//.........这里部分代码省略.........
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:101,代码来源:widgets.php

示例5: wp_nav_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')) {
        global $woocommerce;
        ?>
                                    <li><a class="smallimg vbpcart"><span class="fa fa-shopping-cart"><?php 
        echo $woocommerce->cart->cart_contents_count ? '<em>' . $woocommerce->cart->cart_contents_count . '</em>' : '';
        ?>
开发者ID:nikitansk,项目名称:devschool,代码行数:31,代码来源:header-transparent.php

示例6: bp_dtheme_ajax_messages_send_reply

/**
 * Send a private message reply to a thread via a POST request.
 *
 * @return string HTML
 * @since BuddyPress (1.2)
 */
function bp_dtheme_ajax_messages_send_reply()
{
    // Bail if not a POST action
    if ('POST' !== strtoupper($_SERVER['REQUEST_METHOD'])) {
        return;
    }
    check_ajax_referer('messages_send_message');
    $result = messages_new_message(array('thread_id' => $_REQUEST['thread_id'], 'content' => $_REQUEST['content']));
    if ($result) {
        ?>
		<div class="message-box new-message">
			<div class="message-metadata">
				<?php 
        do_action('bp_before_message_meta');
        ?>
				<?php 
        echo bp_loggedin_user_avatar('type=thumb&width=30&height=30');
        ?>

				<strong><a href="<?php 
        echo bp_loggedin_user_domain();
        ?>
"><?php 
        bp_loggedin_user_fullname();
        ?>
</a> <span class="activity"><?php 
        printf(__('Sent %s', 'logicalboneshug'), bp_core_time_since(bp_core_current_time()));
        ?>
</span></strong>

				<?php 
        do_action('bp_after_message_meta');
        ?>
			</div>

			<?php 
        do_action('bp_before_message_content');
        ?>

			<div class="message-content">
				<?php 
        echo stripslashes(apply_filters('bp_get_the_thread_message_content', $_REQUEST['content']));
        ?>
			</div>

			<?php 
        do_action('bp_after_message_content');
        ?>

			<div class="clear"></div>
		</div>
	<?php 
    } else {
        echo "-1<div id='message' class='error'><p>" . __('There was a problem sending that reply. Please try again.', 'logicalboneshug') . '</p></div>';
    }
    exit;
}
开发者ID:raminjan,项目名称:logicalbones_hug,代码行数:63,代码来源:ajax.php

示例7: bp_activity_comment_form_action

			<?php 
    if (is_user_logged_in()) {
        ?>
			<form action="<?php 
        bp_activity_comment_form_action();
        ?>
" method="post" id="ac-form-<?php 
        bp_activity_id();
        ?>
" class="ac-form"<?php 
        bp_activity_comment_form_nojs_display();
        ?>
>
				<div class="ac-reply-avatar"><?php 
        bp_loggedin_user_avatar('width=25&height=25');
        ?>
</div>
				<div class="ac-reply-content">
					<div class="ac-textarea">
						<textarea id="ac-input-<?php 
        bp_activity_id();
        ?>
" class="ac-input" name="ac_input_<?php 
        bp_activity_id();
        ?>
"></textarea>
					</div>
					<input type="submit" name="ac_form_submit" value="<?php 
        _e('Post', 'buddypress');
        ?>
开发者ID:angelmoratilla,项目名称:digressit,代码行数:30,代码来源:entry.php

示例8: bp_activity_post_form_action

<form action="<?php 
bp_activity_post_form_action();
?>
" method="post" id="whats-new-form" name="whats-new-form">

	<?php 
do_action('bp_before_activity_post_form');
?>

	<div id="whats-new-avatar">
		<a href="<?php 
echo bp_loggedin_user_domain();
?>
">
			<?php 
bp_loggedin_user_avatar('width=60&height=60');
?>
		</a>
	</div>

	<h5>
		<?php 
printf(__("Comment on this link, %s?", 'buddypress-links'), bp_get_user_firstname());
?>
	</h5>

	<div id="whats-new-content">
		<div id="whats-new-textarea">
			<textarea name="whats-new" id="whats-new" value="" /><?php 
if (isset($_GET['r'])) {
    ?>
开发者ID:adisonc,项目名称:MaineLearning,代码行数:31,代码来源:post-form.php

示例9: widget

    function widget($args, $instance)
    {
        extract($args);
        global $user_ID;
        $title = apply_filters('widget_title', empty($instance['title']) ? 'Entrar' : $instance['title']);
        if (empty($user_ID)) {
            echo $before_widget . $before_title . $title . $after_title;
            ?>
        <form name="loginform" id="loginform" action="<?php 
            print wp_login_url($_SERVER['REQUEST_URI']);
            ?>
" method="post">
            <fieldset>
                <label for="userLogin" class="login">Entrar:</label>
                <div class="formfield">
                    <div class="login inputDefault">
                    	<input type="text" name="log" id="userLogin" placeholder="Nome de usuário" tabindex="10" /></div>
                    <div class="pw inputDefault"><input type="password" name="pwd" class="userPass" placeholder="Senha" tabindex="20" /></div>
                    <div class="clearfix"></div>
                    <div class="forever">
                        <a  href="<?php 
            print wp_lostpassword_url();
            ?>
" title="Esqueci minha senha">Recuperar senha</a>
                        <div class="clearfix"></div>
                        <a href="<?php 
            print get_bloginfo('url');
            ?>
/cadastro" title="Esqueci minha senha">Não sou cadastrado</a>
                    </div>
                    <div class="clearfix"></div>
                    
                    <input name="submit" type="submit" id="submit" class="userSubmit submitDefault submit" value="Entrar">
                </div>
            </fieldset>
        </form>
        <?php 
            echo $after_widget;
            $before_widget_ = strstr('#', $before_widget);
            $before_pos = strpos('"', $before_widget_);
            $before_widget_ = substr($before_widget_, 0, $before_pos - 1);
        } else {
            echo $before_widget . $before_title . 'Minha conta' . $after_title;
            global $bp;
            ?>
	        <div class="panel">
		        <div class="bp-login-widget-user-link">Olá <?php 
            echo bp_core_get_userlink(bp_loggedin_user_id());
            ?>
</div>
		        <div class="clearfix"></div>
		        
		        <div class="bp-login-widget-user-avatar">
					<a href="<?php 
            echo bp_loggedin_user_domain();
            ?>
">
						<?php 
            bp_loggedin_user_avatar('type=thumb&width=50&height=50');
            ?>
					</a>
				</div>

				<div class="bp-login-widget-user-links">
					<div class="bp-login-widget-user-logout"><a class="logout" href="<?php 
            echo wp_logout_url(bp_get_requested_url());
            ?>
"><?php 
            _e('Log Out', 'buddypress');
            ?>
</a></div>
				</div>
			</div>

	        <?php 
            echo $after_widget;
        }
    }
开发者ID:CoordCulturaDigital-Minc,项目名称:pna,代码行数:78,代码来源:widget-login.php

示例10: swa_activity_entry


//.........这里部分代码省略.........
		<?php 
        }
        ?>
            <?php 
    }
    ?>
            <?php 
    do_action('bp_activity_entry_meta');
    ?>
        </div>
	<div class="clear" ></div>
    </div>
    <?php 
    if ('activity_comment' == bp_get_activity_type()) {
        ?>
	<div class="swa-activity-inreplyto">
            <strong><?php 
        _e('In reply to', 'swa');
        ?>
</strong> - <?php 
        bp_activity_parent_content();
        ?>
 &middot;
            <a href="<?php 
        bp_activity_thread_permalink();
        ?>
" class="view" title="<?php 
        _e('View Thread / Permalink', 'swa');
        ?>
"><?php 
        _e('View', 'swa');
        ?>
</a>
	</div>
    <?php 
    }
    ?>
    <?php 
    if (bp_activity_can_comment()) {
        ?>
        <div class="swa-activity-comments">
        	<?php 
        bp_activity_comments();
        ?>
            <?php 
        if (is_user_logged_in()) {
            ?>
			<form action="<?php 
            bp_activity_comment_form_action();
            ?>
" method="post" id="swa-ac-form-<?php 
            bp_activity_id();
            ?>
" class="swa-ac-form"<?php 
            bp_activity_comment_form_nojs_display();
            ?>
>
				<div class="ac-reply-avatar"><?php 
            bp_loggedin_user_avatar('width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT);
            ?>
</div>
				<div class="ac-reply-content">
					<div class="ac-textarea">
						<textarea id="swa-ac-input-<?php 
            bp_activity_id();
            ?>
" class="ac-input" name="ac_input_<?php 
            bp_activity_id();
            ?>
"></textarea>
					</div>
					<input type="submit" name="swa_ac_form_submit" value="<?php 
            _e('Post', 'buddypress');
            ?>
 &rarr;" /> &nbsp; <?php 
            _e('or press esc to cancel.', 'buddypress');
            ?>
					<input type="hidden" name="comment_form_id" value="<?php 
            bp_activity_id();
            ?>
" />
				</div>
				<?php 
            wp_nonce_field('new_activity_comment', '_wpnonce_new_activity_comment');
            ?>
			</form>
			<?php 
        }
        ?>
	</div>
    <?php 
    }
    ?>
</li>
<?php 
    do_action('bp_after_swa_activity_entry');
    ?>

<?php 
}
开发者ID:picassentviu,项目名称:AMMPro,代码行数:101,代码来源:bp-sitewide-activity.php

示例11: bp_loggedin_user_domain

 * BuddyPress - Activity Post Form
 *
 * @package     myfossil
 * @subpackage  theme
 */
?>
<div id="user-left" name="user-left" class="sidebar sidebar-left">

    <div id="user-info" class="row section hidden-xs hidden-sm">
        <div class="col-xs-12 col-sm-12 col-lg-12">
            <a href="<?php 
echo bp_loggedin_user_domain();
?>
">
                <?php 
bp_loggedin_user_avatar('width=150&height=150');
?>
            </a>
        </div>
        <div class="col-xs-12 col-sm-12 col-lg-12" style="text-align: center">
            <h4 style="font-size: 1.4em"><?php 
echo bp_get_loggedin_user_fullname();
?>
</h4>
            <span class="username">@<?php 
echo bp_get_loggedin_user_username();
?>
</span>
        </div>
    </div>
    
开发者ID:par-orillonsoft,项目名称:myfossil-theme,代码行数:30,代码来源:left-menu.php

示例12: wff_bp_notifications_menu

		<?php 
    if (is_user_logged_in()) {
        ?>

			<?php 
        wff_bp_notifications_menu();
        ?>

			<li id="bp-profile-menu" class="dropdown menu-groups">

				<a href="<?php 
        echo bp_get_loggedin_user_link();
        ?>
" data-target="#" data-toggle="dropdown"
				   class="dropdown-toggle"><?php 
        echo bp_loggedin_user_avatar('type=thumb&width=70&height=70');
        ?>
					<?php 
        if (get_theme_mod('wf_plus_bp_menu_user_name', 'no') == 'yes') {
            ?>
						<span class="bp-profile-menu-name">
						 <?php 
            echo bp_core_get_user_displayname(bp_loggedin_user_id());
            ?>
						</span>
					<?php 
        } else {
            ?>
						<span class="visible-xs bp-profile-menu-name">
						<?php 
            echo bp_core_get_user_displayname(bp_loggedin_user_id());
开发者ID:WeFoster,项目名称:wefoster,代码行数:31,代码来源:navigation-menu.php

示例13: widget

    /**
     * Display the login widget.
     *
     * @see WP_Widget::widget() for description of parameters.
     *
     * @param array $args     Widget arguments.
     * @param array $instance Widget settings, as saved by the user.
     */
    public function widget($args, $instance)
    {
        $title = isset($instance['title']) ? $instance['title'] : '';
        /**
         * Filters the title of the Login widget.
         *
         * @since 1.9.0
         * @since 2.3.0 Added 'instance' and 'id_base' to arguments passed to filter.
         *
         * @param string $title    The widget title.
         * @param array  $instance The settings for the particular instance of the widget.
         * @param string $id_base  Root ID for all widgets of this type.
         */
        $title = apply_filters('widget_title', $title, $instance, $this->id_base);
        echo $args['before_widget'];
        echo $args['before_title'] . esc_html($title) . $args['after_title'];
        ?>

		<?php 
        if (is_user_logged_in()) {
            ?>

			<?php 
            /**
             * Fires before the display of widget content if logged in.
             *
             * @since 1.9.0
             */
            do_action('bp_before_login_widget_loggedin');
            ?>

			<div class="bp-login-widget-user-avatar">
				<a href="<?php 
            echo bp_loggedin_user_domain();
            ?>
">
					<?php 
            bp_loggedin_user_avatar('type=thumb&width=50&height=50');
            ?>
				</a>
			</div>

			<div class="bp-login-widget-user-links">
				<div class="bp-login-widget-user-link"><?php 
            echo bp_core_get_userlink(bp_loggedin_user_id());
            ?>
</div>
				<div class="bp-login-widget-user-logout"><a class="logout" href="<?php 
            echo wp_logout_url(bp_get_requested_url());
            ?>
"><?php 
            _e('Log Out', 'buddypress');
            ?>
</a></div>
			</div>

			<?php 
            /**
             * Fires after the display of widget content if logged in.
             *
             * @since 1.9.0
             */
            do_action('bp_after_login_widget_loggedin');
            ?>

		<?php 
        } else {
            ?>

			<?php 
            /**
             * Fires before the display of widget content if logged out.
             *
             * @since 1.9.0
             */
            do_action('bp_before_login_widget_loggedout');
            ?>

			<form name="bp-login-form" id="bp-login-widget-form" class="standard-form" action="<?php 
            echo esc_url(site_url('wp-login.php', 'login_post'));
            ?>
" method="post">
				<label for="bp-login-widget-user-login"><?php 
            _e('Username', 'buddypress');
            ?>
</label>
				<input type="text" name="log" id="bp-login-widget-user-login" class="input" value="" />

				<label for="bp-login-widget-user-pass"><?php 
            _e('Password', 'buddypress');
            ?>
</label>
//.........这里部分代码省略.........
开发者ID:swissspidy,项目名称:BuddyPress,代码行数:101,代码来源:bp-core-widgets.php

示例14: if

	<?php if ( 'activity_comment' == bp_get_activity_type() ) : ?>
		<div class="activity-inreplyto">
			<strong><?php _e( 'In reply to', 'buddypress' ) ?></strong> - <?php bp_activity_parent_content() ?> &middot;
			<a href="<?php bp_activity_thread_permalink() ?>" class="view" title="<?php _e( 'View Thread / Permalink', 'buddypress' ) ?>"><?php _e( 'View', 'buddypress' ) ?></a>
		</div>
	<?php endif; ?>

	<?php do_action( 'bp_before_activity_entry_comments' ) ?>

	<?php if ( bp_activity_can_comment() ) : ?>
		<div class="activity-comments">
			<?php bp_activity_comments() ?>

			<?php if ( is_user_logged_in() ) : ?>
			<form action="<?php bp_activity_comment_form_action() ?>" method="post" id="ac-form-<?php bp_activity_id() ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display() ?>>
				<div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ) ?></div>
				<div class="ac-reply-content">
					<div class="ac-textarea">
						<textarea id="ac-input-<?php bp_activity_id() ?>" class="ac-input" name="ac_input_<?php bp_activity_id() ?>"></textarea>
					</div>
					<input type="submit" name="ac_form_submit" value="<?php _e( 'Post', 'buddypress' ) ?> &rarr;" /> &nbsp; <?php _e( 'or press esc to cancel.', 'buddypress' ) ?>
					<input type="hidden" name="comment_form_id" value="<?php bp_activity_id() ?>" />
				</div>
				<?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ) ?>
			</form>
			<?php endif; ?>
		</div>
	<?php endif; ?>

	<?php do_action( 'bp_after_activity_entry_comments' ) ?>
</li>
开发者ID:n-sane,项目名称:zaroka,代码行数:31,代码来源:entry.php

示例15: widget

    function widget($args, $instance)
    {
        if (!parent::widget($args, $instance)) {
            return;
        }
        extract($args);
        echo $before_widget;
        $title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : false);
        if ($title) {
            echo $before_title, $title, $after_title;
        }
        ?>

<?php 
        if (is_user_logged_in()) {
            ?>

	<?php 
            do_action('bp_before_sidebar_me');
            ?>

	<div id="sidebar-me" class="widget clearfix">
		<h3 class="widget-title">Welcome <?php 
            echo bp_core_get_userlink(bp_loggedin_user_id());
            ?>
</h3>
		<a href="<?php 
            echo bp_loggedin_user_domain();
            ?>
">
			<?php 
            bp_loggedin_user_avatar('type=thumb&width=40&height=40');
            ?>
		</a>

		<a class="button logout" href="<?php 
            echo wp_logout_url(wp_guess_url());
            ?>
"><?php 
            _e('Log Out', 'buddypress');
            ?>
</a>

		<?php 
            do_action('bp_sidebar_me');
            ?>
	</div>

	<?php 
            do_action('bp_after_sidebar_me');
            ?>

	<?php 
            if (bp_is_active('messages')) {
                ?>
		<?php 
                bp_message_get_notices();
                /* Site wide notices to all users */
                ?>
	<?php 
            }
            ?>

<?php 
        } else {
            ?>

	<?php 
            do_action('bp_before_sidebar_login_form');
            ?>

	<?php 
            if (bp_get_signup_allowed()) {
                ?>
	
		<p id="login-text">

			<?php 
                printf(__('<a href="%s" title="Create account" class="btn btn-primary btn-large">Create account to join community</a>', 'buddypress'), bp_get_signup_page());
                ?>

		</p>

	<?php 
            }
            ?>

	<form name="login-form" id="sidebar-login-form" class="standard-form widget" action="<?php 
            echo site_url('wp-login.php', 'login_post');
            ?>
" method="post">
		<h3 class="widget-title"><?php 
            _e('Login', 'bre-bootstrap-ecommerce');
            ?>
</h3>
		<label><?php 
            _e('Username', 'buddypress');
            ?>
<br />
		<input type="text" name="log" id="sidebar-user-login" class="input" value="<?php 
//.........这里部分代码省略.........
开发者ID:vihoangson,项目名称:vihoangson.com,代码行数:101,代码来源:BPLoginWidget.class.php


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