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


PHP bp_member_permalink函数代码示例

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


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

示例1: widget

    /**
     * Displays the widget.
     */
    function widget($args, $instance)
    {
        // do not do anything if user isn't logged in
        if (!is_user_logged_in()) {
            return;
        }
        if (empty($instance['max_users'])) {
            $instance['max_users'] = 16;
        }
        // logged-in user isn't following anyone, so stop!
        if (!($following = bp_get_following_ids(array('user_id' => bp_loggedin_user_id())))) {
            return false;
        }
        // show the users the logged-in user is following
        if (bp_has_members(array('include' => $following, 'max' => $instance['max_users'], 'populate_extras' => false))) {
            do_action('bp_before_following_widget');
            echo $args['before_widget'];
            echo $args['before_title'] . $instance['title'] . $args['after_title'];
            ?>

			<div class="avatar-block">
				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>
					<div class="item-avatar">
						<a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
                ?>
</a>
					</div>
				<?php 
            }
            ?>
			</div>

			<?php 
            echo $args['after_widget'];
            ?>

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

	<?php 
        }
    }
开发者ID:wesavetheworld,项目名称:buddypress-followers,代码行数:56,代码来源:widgets.php

示例2: while

    <div class="clearfix"></div>

    <ul id="members-list" class="row clearfix" role="main">

        <?php while ( bp_members() ) : bp_the_member(); ?>

            <li class="yit_animate fadeInUp col-md-4 col-sm-6 masonry_item">
                <div class="item-container">
                    <div class="item-header clearfix">
                        <div class="item-avatar">
                            <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar( array( 'height' => 60, 'width' => 60 ) ); ?></a>
                        </div>

                        <div class="item">
                            <div class="item-username">
                                <a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a>

                            </div>

                            <div class="item-meta"><span class="activity"><?php bp_member_last_active(); ?></span></div>

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

                            <?php
                            /***
                             * If you want to show specific profile fields here you can,
                             * but it'll add an extra query for each member in the loop
                             * (only one regardless of the number of fields you show):
                             *
                             * bp_member_profile_data( 'field=the field name' );
                             */
开发者ID:jabue,项目名称:wordpress,代码行数:31,代码来源:members-loop.php

示例3: widget

    /**
     * Display the widget.
     *
     * @param array $args Widget arguments.
     * @param array $instance The widget settings, as saved by the user.
     */
    function widget($args, $instance)
    {
        extract($args);
        if (!bp_displayed_user_id()) {
            return;
        }
        $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
        wp_enqueue_script('bp_core_widget_friends-js', buddypress()->plugin_url . "bp-friends/js/widget-friends{$min}.js", array('jquery'), bp_get_version());
        $user_id = bp_displayed_user_id();
        $link = trailingslashit(bp_displayed_user_domain() . bp_get_friends_slug());
        $instance['title'] = sprintf(__('%s&#8217;s Friends', 'buddypress'), bp_get_displayed_user_fullname());
        if (empty($instance['friend_default'])) {
            $instance['friend_default'] = 'active';
        }
        $title = apply_filters('widget_title', $instance['title']);
        echo $before_widget;
        $title = $instance['link_title'] ? '<a href="' . esc_url($link) . '">' . esc_html($title) . '</a>' : esc_html($title);
        echo $before_title . $title . $after_title;
        $members_args = array('user_id' => absint($user_id), 'type' => sanitize_text_field($instance['friend_default']), 'max' => absint($instance['max_friends']), 'populate_extras' => 1);
        ?>

		<?php 
        if (bp_has_members($members_args)) {
            ?>
			<div class="item-options" id="friends-list-options">
				<a href="<?php 
            bp_members_directory_permalink();
            ?>
" id="newest-friends" <?php 
            if ($instance['friend_default'] == 'newest') {
                ?>
class="selected"<?php 
            }
            ?>
><?php 
            _e('Newest', 'buddypress');
            ?>
</a>
				| <a href="<?php 
            bp_members_directory_permalink();
            ?>
" id="recently-active-friends" <?php 
            if ($instance['friend_default'] == 'active') {
                ?>
class="selected"<?php 
            }
            ?>
><?php 
            _e('Active', 'buddypress');
            ?>
</a>
				| <a href="<?php 
            bp_members_directory_permalink();
            ?>
" id="popular-friends" <?php 
            if ($instance['friend_default'] == 'popular') {
                ?>
class="selected"<?php 
            }
            ?>
><?php 
            _e('Popular', 'buddypress');
            ?>
</a>
			</div>

			<ul id="friends-list" class="item-list">
				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>
					<li class="vcard">
						<div class="item-avatar">
							<a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
                ?>
</a>
						</div>

						<div class="item">
							<div class="item-title fn"><a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_name();
//.........这里部分代码省略.........
开发者ID:danielcoats,项目名称:schoolpress,代码行数:101,代码来源:bp-friends-widgets.php

示例4: widget

    /**
     * Display the Recently Active 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)
    {
        global $members_template;
        // Get widget settings.
        $settings = $this->parse_settings($instance);
        /**
         * Filters the title of the Recently Active widget.
         *
         * @since 1.8.0
         * @since 2.3.0 Added 'instance' and 'id_base' to arguments passed to filter.
         *
         * @param string $title    The widget title.
         * @param array  $settings 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', $settings['title'], $settings, $this->id_base);
        echo $args['before_widget'];
        echo $args['before_title'] . $title . $args['after_title'];
        // Setup args for querying members.
        $members_args = array('user_id' => 0, 'type' => 'active', 'per_page' => $settings['max_members'], 'max' => $settings['max_members'], 'populate_extras' => true, 'search_terms' => false);
        // Back up global.
        $old_members_template = $members_template;
        ?>

		<?php 
        if (bp_has_members($members_args)) {
            ?>

			<div class="avatar-block">

				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>

					<div class="item-avatar">
						<a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
                ?>
</a>
					</div>

				<?php 
            }
            ?>

			</div>

		<?php 
        } else {
            ?>

			<div class="widget-error">
				<?php 
            esc_html_e('There are no recently active members', 'buddypress');
            ?>
			</div>

		<?php 
        }
        ?>

		<?php 
        echo $args['after_widget'];
        // Restore the global.
        $members_template = $old_members_template;
    }
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:81,代码来源:class-bp-core-recently-active-widget.php

示例5: widget

    /**
     * Display the Recently Active widget.
     *
     * @see WP_Widget::widget() for description of parameters.
     *
     * @param array $args Widget arguments.
     * @param array $instance Widget settings, as saved by the user.
     */
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        echo $before_widget;
        echo $before_title . $title . $after_title;
        $members_args = array('user_id' => 0, 'type' => 'active', 'per_page' => $instance['max_members'], 'max' => $instance['max_members'], 'populate_extras' => true, 'search_terms' => false);
        ?>

		<?php 
        if (bp_has_members($members_args)) {
            ?>
			<div class="avatar-block">
				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>
					<div class="item-avatar">
						<a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
                ?>
</a>
					</div>
				<?php 
            }
            ?>
			</div>
		<?php 
        } else {
            ?>

			<div class="widget-error">
				<?php 
            _e('There are no recently active members', 'buddypress');
            ?>
			</div>

		<?php 
        }
        ?>

		<?php 
        echo $after_widget;
        ?>
	<?php 
    }
开发者ID:eresyyl,项目名称:mk,代码行数:60,代码来源:bp-core-widgets.php

示例6: widget

    function widget($args, $instance)
    {
        extract($args);
        echo $before_widget;
        echo $before_title . $instance['title'] . $after_title;
        ?>

		<?php 
        if (bp_has_members('user_id=0&type=active&per_page=' . $instance['max_members'] . '&max=' . $instance['max_members'] . '&populate_extras=0')) {
            ?>
			<div class="avatar-block">
				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>
					<div class="item-avatar">
						<a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
                ?>
</a>
					</div>
				<?php 
            }
            ?>
			</div>
		<?php 
        } else {
            ?>

			<div class="widget-error">
				<?php 
            _e('There are no recently active members', 'buddypress');
            ?>
			</div>

		<?php 
        }
        ?>

		<?php 
        echo $after_widget;
        ?>
	<?php 
    }
开发者ID:vsalx,项目名称:rattieinfo,代码行数:50,代码来源:bp-core-widgets.php

示例7: x_buddypress_members_loop_item_current_member_meta_link

    function x_buddypress_members_loop_item_current_member_meta_link()
    {
        if (bp_loggedin_user_id() == bp_get_member_user_id()) {
            ?>

      <a href="<?php 
            bp_member_permalink();
            ?>
"><?php 
            _e('Your Activity', '__x__');
            ?>
</a>

    <?php 
        }
    }
开发者ID:ju4nr3v0l,项目名称:juandavidmarulanda.com,代码行数:16,代码来源:buddypress.php

示例8: list_friends

        /**
         * Outputs the list of friends (active or online)
         * 
         * @package BP_Show_Friends_Widget
         * @since    2.0
         * 
         * @uses bp_is_user() to check we're on a user's profile
         * @uses bp_displayed_user_id() to get displayed user id
         * @uses bp_loggedin_user_id() to get loggedin user id
         * @uses Widget->get_settings() to get the instance of the widget
         * @uses the Members loop
         */
        public function list_friends($limit = 0, $size = 0)
        {
            $user_id = bp_is_user() ? bp_displayed_user_id() : bp_loggedin_user_id();
            if (empty($limit) || empty($size)) {
                $widget_settings = $this->get_settings();
                $number = intval($_POST['bpsf_number']);
                $limit = !empty($widget_settings[$number]['per_page']) ? $widget_settings[$number]['per_page'] : 5;
                $size = !empty($widget_settings[$number]['size']) ? $widget_settings[$number]['size'] : 50;
            }
            // plugins or themes can now order the friends differently !
            $args = apply_filters('bp_show_friends_args', array('user_id' => $user_id, 'type' => 'active', 'per_page' => $limit, 'max' => $limit, 'populate_extra' => 0));
            $fallback_message = '<p>' . __('No friends!', 'bp-show-friends') . '</p>';
            if (!empty($_POST['bpsf_type'])) {
                $args['type'] = $_POST['bpsf_type'];
                if ('online' == $args['type']) {
                    $fallback_message = '<p>' . __('No online friends!', 'bp-show-friends') . '</p>';
                }
            }
            $avatar_args = apply_filters('bp_show_friends_avatar_args', array('type' => 'full', 'width' => $size, 'height' => $size, 'class' => 'avatar bp-show-friends'));
            ?>

		<?php 
            if (empty($_POST['bpsf_type'])) {
                ?>
			<div class="friends-container">
		<?php 
            }
            ?>

		    <?php 
            if (bp_has_members($args)) {
                ?>
		    	<ul class="bpsf-members">
			      <?php 
                while (bp_members()) {
                    bp_the_member();
                    ?>

			      	<li class="bpsf-member">
				        <div class="item-avatar">
				          	<a href="<?php 
                    bp_member_permalink();
                    ?>
" title="<?php 
                    bp_member_name();
                    ?>
">
				          		<?php 
                    bp_member_avatar($avatar_args);
                    ?>
				          	</a>
				        </div>
				        <?php 
                    do_action('bp_show_friends_after_friend_avatar', bp_get_member_user_id());
                    ?>
				    </li>

			      <?php 
                }
                ?>
			     </ul>

		    <?php 
            } else {
                echo $fallback_message;
            }
            if (empty($_POST['bpsf_type'])) {
                ?>
			</div>
		    <br style="clear:both"/>
		<?php 
            } else {
                exit;
            }
        }
开发者ID:socialray,项目名称:surfied-2-0,代码行数:87,代码来源:bp-show-friends.php

示例9: bp_core_ajax_widget_members

/**
 * AJAX request handler for Members widgets.
 *
 * @since 1.0.0
 *
 * @see BP_Core_Members_Widget
 */
function bp_core_ajax_widget_members()
{
    check_ajax_referer('bp_core_widget_members');
    // Setup some variables to check.
    $filter = !empty($_POST['filter']) ? $_POST['filter'] : 'recently-active-members';
    $max_members = !empty($_POST['max-members']) ? absint($_POST['max-members']) : 5;
    // Determine the type of members query to perform.
    switch ($filter) {
        // Newest activated.
        case 'newest-members':
            $type = 'newest';
            break;
            // Popular by friends.
        // Popular by friends.
        case 'popular-members':
            if (bp_is_active('friends')) {
                $type = 'popular';
            } else {
                $type = 'active';
            }
            break;
            // Default.
        // Default.
        case 'recently-active-members':
        default:
            $type = 'active';
            break;
    }
    // Setup args for querying members.
    $members_args = array('user_id' => 0, 'type' => $type, 'per_page' => $max_members, 'max' => $max_members, 'populate_extras' => true, 'search_terms' => false);
    // Query for members.
    if (bp_has_members($members_args)) {
        ?>
		<?php 
        echo '0[[SPLIT]]';
        // Return valid result. TODO: remove this.
        ?>
		<?php 
        while (bp_members()) {
            bp_the_member();
            ?>
			<li class="vcard">
				<div class="item-avatar">
					<a href="<?php 
            bp_member_permalink();
            ?>
"><?php 
            bp_member_avatar();
            ?>
</a>
				</div>

				<div class="item">
					<div class="item-title fn"><a href="<?php 
            bp_member_permalink();
            ?>
" title="<?php 
            bp_member_name();
            ?>
"><?php 
            bp_member_name();
            ?>
</a></div>
					<?php 
            if ('active' === $type) {
                ?>
						<div class="item-meta"><span class="activity"><?php 
                bp_member_last_active();
                ?>
</span></div>
					<?php 
            } elseif ('newest' === $type) {
                ?>
						<div class="item-meta"><span class="activity"><?php 
                bp_member_registered();
                ?>
</span></div>
					<?php 
            } elseif (bp_is_active('friends')) {
                ?>
						<div class="item-meta"><span class="activity"><?php 
                bp_member_total_friend_count();
                ?>
</span></div>
					<?php 
            }
            ?>
				</div>
			</li>

		<?php 
        }
        ?>
//.........这里部分代码省略.........
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:101,代码来源:bp-members-widgets.php

示例10: buat_get_user_template

function buat_get_user_template($type)
{
    $filtered_users = buat_gather_user_ids($type);
    if (bp_has_members("include={$filtered_users}&type=alphabetical")) {
        ?>
 
    <div class="pagination">
 
        <div class="pag-count" id="member-dir-count">
            <?php 
        bp_members_pagination_count();
        ?>
        </div>
 
        <div class="pagination-links" id="member-dir-pag">
            <?php 
        bp_members_pagination_links();
        ?>
        </div>
 
    </div>
 
    <?php 
        do_action('bp_before_directory_members_list');
        ?>
 
    <ul id="members-list" class="item-list" style="list-style-type:none; margin: 0; width: auto">
    <?php 
        while (bp_members()) {
            bp_the_member();
            ?>
 
        <li>
            <div class="item-avatar">
                <a href="<?php 
            bp_member_permalink();
            ?>
"><?php 
            bp_member_avatar();
            ?>
</a>
            </div>
 
            <div class="item">
                <div class="item-title">
                    <a href="<?php 
            bp_member_permalink();
            ?>
"><?php 
            bp_member_name();
            ?>
</a>
                    <?php 
            if (bp_get_member_latest_update()) {
                ?>
                        <span class="update"> - <?php 
                bp_member_latest_update('length=10');
                ?>
</span>
                    <?php 
            }
            ?>
                </div>
                <div class="item-meta"><span class="activity"><?php 
            bp_member_last_active();
            ?>
</span></div>
 
                <?php 
            do_action('bp_directory_members_item');
            ?>
 
                <?php 
            /***
             * If you want to show specific profile fields here you can,
             * but it'll add an extra query for each member in the loop
             * (only one regadless of the number of fields you show):
             *
             * bp_member_profile_data( 'field=the field name' );
             */
            ?>
            </div>
 
            <div class="action">
                <?php 
            do_action('bp_directory_members_actions');
            ?>
            </div>
 
            <div class="clear"></div>
        </li>
 
    <?php 
        }
        ?>
    </ul>
 
    <?php 
        do_action('bp_after_directory_members_list');
        ?>
//.........这里部分代码省略.........
开发者ID:nxtclass,项目名称:NXTClass,代码行数:101,代码来源:buat_functions.php

示例11: widget

    /**
     * Display the Members widget.
     *
     * @see WP_Widget::widget() for description of parameters.
     *
     * @param array $args Widget arguments.
     * @param array $instance Widget settings, as saved by the user.
     */
    function widget($args, $instance)
    {
        extract($args);
        if (!$instance['member_default']) {
            $instance['member_default'] = 'active';
        }
        $title = apply_filters('widget_title', $instance['title']);
        echo $before_widget;
        $title = $instance['link_title'] ? '<a href="' . esc_url(trailingslashit(bp_get_root_domain() . '/' . bp_get_members_root_slug())) . '">' . $title . '</a>' : $title;
        echo $before_title . $title . $after_title;
        $members_args = array('user_id' => 0, 'type' => $instance['member_default'], 'per_page' => $instance['max_members'], 'max' => $instance['max_members'], 'populate_extras' => true, 'search_terms' => false);
        ?>

		<?php 
        if (bp_has_members($members_args)) {
            ?>
			<div class="item-options" id="members-list-options">
				<a href="<?php 
            bp_members_directory_permalink();
            ?>
" id="newest-members" <?php 
            if ($instance['member_default'] == 'newest') {
                ?>
class="selected"<?php 
            }
            ?>
><?php 
            _e('Newest', 'socialchef');
            ?>
</a>
				<a href="<?php 
            bp_members_directory_permalink();
            ?>
" id="recently-active-members" <?php 
            if ($instance['member_default'] == 'active') {
                ?>
class="selected"<?php 
            }
            ?>
><?php 
            _e('Active', 'socialchef');
            ?>
</a>
				<?php 
            if (bp_is_active('friends')) {
                ?>
				<a href="<?php 
                bp_members_directory_permalink();
                ?>
" id="popular-members" <?php 
                if ($instance['member_default'] == 'popular') {
                    ?>
class="selected"<?php 
                }
                ?>
><?php 
                _e('Popular', 'socialchef');
                ?>
</a>
				<?php 
            }
            ?>
			</div>

			<ul id="members-list" class="item-list">
				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>
					<li class="vcard">
						<div class="item-avatar">
							<a role="member" href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
                ?>
</a>
						</div>
					</li>

				<?php 
            }
            ?>
			</ul>
			<?php 
            wp_nonce_field('bp_core_widget_members', '_wpnonce-members');
            ?>
			<input type="hidden" name="members_widget_max" id="members_widget_max" value="<?php 
//.........这里部分代码省略.........
开发者ID:boutitinizar,项目名称:bati-men,代码行数:101,代码来源:widget_buddypress-members.php

示例12: widget

    /**
     * Display the widget.
     *
     * @since 1.9.0
     *
     * @param array $args Widget arguments.
     * @param array $instance The widget settings, as saved by the user.
     */
    function widget($args, $instance)
    {
        global $members_template;
        extract($args);
        if (!bp_displayed_user_id()) {
            return;
        }
        $user_id = bp_displayed_user_id();
        $link = trailingslashit(bp_displayed_user_domain() . bp_get_friends_slug());
        $instance['title'] = sprintf(__("%s's Friends", 'buddypress'), bp_get_displayed_user_fullname());
        if (empty($instance['friend_default'])) {
            $instance['friend_default'] = 'active';
        }
        /**
         * Filters the Friends widget title.
         *
         * @since 1.8.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', $instance['title'], $instance, $this->id_base);
        echo $before_widget;
        $title = $instance['link_title'] ? '<a href="' . esc_url($link) . '">' . esc_html($title) . '</a>' : esc_html($title);
        echo $before_title . $title . $after_title;
        $members_args = array('user_id' => absint($user_id), 'type' => sanitize_text_field($instance['friend_default']), 'max' => absint($instance['max_friends']), 'populate_extras' => 1);
        // Back up the global.
        $old_members_template = $members_template;
        ?>

		<?php 
        if (bp_has_members($members_args)) {
            ?>
			<div class="item-options" id="friends-list-options">
				<a href="<?php 
            bp_members_directory_permalink();
            ?>
" id="newest-friends" <?php 
            if ($instance['friend_default'] == 'newest') {
                ?>
class="selected"<?php 
            }
            ?>
><?php 
            _e('Newest', 'buddypress');
            ?>
</a>
				| <a href="<?php 
            bp_members_directory_permalink();
            ?>
" id="recently-active-friends" <?php 
            if ($instance['friend_default'] == 'active') {
                ?>
class="selected"<?php 
            }
            ?>
><?php 
            _e('Active', 'buddypress');
            ?>
</a>
				| <a href="<?php 
            bp_members_directory_permalink();
            ?>
" id="popular-friends" <?php 
            if ($instance['friend_default'] == 'popular') {
                ?>
class="selected"<?php 
            }
            ?>
><?php 
            _e('Popular', 'buddypress');
            ?>
</a>
			</div>

			<ul id="friends-list" class="item-list">
				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>
					<li class="vcard">
						<div class="item-avatar">
							<a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
//.........这里部分代码省略.........
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:101,代码来源:class-bp-core-friends-widget.php

示例13: bp_members_carousel_2

    function bp_members_carousel_2($atts)
    {
        $output = '';
        extract(shortcode_atts(array('type' => '', 'max_item' => 10, 'max_slides' => 7, 'min_slides' => 1, 'item_width' => 320, 'slide_margin' => 20), $atts));
        $params = array('type' => $type, 'per_page' => $max_item);
        if (function_exists('bp_has_members')) {
            // begin bp members loop
            if (bp_has_members($params)) {
                ob_start();
                $output .= '<ul data-slide-margin="' . $slide_margin . '"';
                $output .= 'data-max-slides="' . $max_slides . '" data-min-slides="' . $min_slides . '"';
                $output .= 'data-item-width="' . $item_width . '" class="gears-carousel-standard bp-members-carousel-2">';
                while (bp_members()) {
                    bp_the_member();
                    ?>
					    	<li class="carousel-item gears-members-carousel-2-item">
					    		<div class="gears-members-carousel-2-wrap">
					    			<div class="cover-photo">
					    				<?php 
                    if (function_exists('bcp_get_cover_photo')) {
                        $args = array('size' => 'thumb', 'object_id' => bp_get_member_user_id());
                        $src = bcp_get_cover_photo($args);
                        echo '<img src="' . $src . '" alt="' . __('Cover Photo', 'gears') . '"/>';
                    }
                    ?>
					    			</div>
					    			<div class="member-avatar">
					    				<a href="<?php 
                    bp_member_permalink();
                    ?>
" title="<?php 
                    bp_member_name();
                    ?>
">
					    					<?php 
                    bp_member_avatar(array('type' => 'thumb'));
                    ?>
					    				</a>
					    			</div>
					    			<div class="member-name">
					    				<a href="<?php 
                    bp_member_permalink();
                    ?>
" title="<?php 
                    bp_member_name();
                    ?>
">
					    					<h3><?php 
                    bp_member_name();
                    ?>
</h3>
					    				</a>
					    			</div>
					    			<div class="spacer"></div>
					    		</div>
					    	</li>
					    <?php 
                }
                // end while
                $output .= ob_get_clean();
                $output .= '</ul>';
            }
            return $output;
        } else {
            return $this->bp_not_installed;
        }
    }
开发者ID:poweronio,项目名称:mbsite,代码行数:67,代码来源:library.php

示例14: bp_core_ajax_widget_friends

/**
 * Process AJAX pagination or filtering for the Friends widget.
 *
 * @since 1.9.0
 */
function bp_core_ajax_widget_friends()
{
    check_ajax_referer('bp_core_widget_friends');
    switch ($_POST['filter']) {
        case 'newest-friends':
            $type = 'newest';
            break;
        case 'recently-active-friends':
            $type = 'active';
            break;
        case 'popular-friends':
            $type = 'popular';
            break;
    }
    $members_args = array('user_id' => bp_displayed_user_id(), 'type' => $type, 'max' => absint($_POST['max-friends']), 'populate_extras' => 1);
    if (bp_has_members($members_args)) {
        ?>
		<?php 
        echo '0[[SPLIT]]';
        // Return valid result. TODO: remove this.
        ?>
		<?php 
        while (bp_members()) {
            bp_the_member();
            ?>
			<li class="vcard">
				<div class="item-avatar">
					<a href="<?php 
            bp_member_permalink();
            ?>
"><?php 
            bp_member_avatar();
            ?>
</a>
				</div>

				<div class="item">
					<div class="item-title fn"><a href="<?php 
            bp_member_permalink();
            ?>
" title="<?php 
            bp_member_name();
            ?>
"><?php 
            bp_member_name();
            ?>
</a></div>
					<?php 
            if ('active' == $type) {
                ?>
						<div class="item-meta"><span class="activity"><?php 
                bp_member_last_active();
                ?>
</span></div>
					<?php 
            } elseif ('newest' == $type) {
                ?>
						<div class="item-meta"><span class="activity"><?php 
                bp_member_registered();
                ?>
</span></div>
					<?php 
            } elseif (bp_is_active('friends')) {
                ?>
						<div class="item-meta"><span class="activity"><?php 
                bp_member_total_friend_count();
                ?>
</span></div>
					<?php 
            }
            ?>
				</div>
			</li>
		<?php 
        }
        ?>

	<?php 
    } else {
        ?>
		<?php 
        echo "-1[[SPLIT]]<li>";
        ?>
		<?php 
        _e('There were no members found, please try another filter.', 'buddypress');
        ?>
		<?php 
        echo "</li>";
        ?>
	<?php 
    }
}
开发者ID:dcavins,项目名称:buddypress-svn,代码行数:97,代码来源:bp-friends-widgets.php

示例15: widget


//.........这里部分代码省略.........
                echo esc_html($separator);
                ?>
</span>
					<a href="<?php 
                bp_members_directory_permalink();
                ?>
" id="popular-members" <?php 
                if ('popular' === $settings['member_default']) {
                    ?>
class="selected"<?php 
                }
                ?>
><?php 
                esc_html_e('Popular', 'buddypress');
                ?>
</a>

				<?php 
            }
            ?>

			</div>

			<ul id="members-list" class="item-list" aria-live="polite" aria-relevant="all" aria-atomic="true">

				<?php 
            while (bp_members()) {
                bp_the_member();
                ?>

					<li class="vcard">
						<div class="item-avatar">
							<a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_avatar();
                ?>
</a>
						</div>

						<div class="item">
							<div class="item-title fn"><a href="<?php 
                bp_member_permalink();
                ?>
" title="<?php 
                bp_member_name();
                ?>
"><?php 
                bp_member_name();
                ?>
</a></div>
							<div class="item-meta">
								<?php 
                if ('newest' == $settings['member_default']) {
                    ?>
									<span class="activity" data-livestamp="<?php 
                    bp_core_iso8601_date(bp_get_member_registered(array('relative' => false)));
                    ?>
"><?php 
                    bp_member_registered();
                    ?>
</span>
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:67,代码来源:class-bp-core-members-widget.php


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