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


PHP bp_get_group_last_active函数代码示例

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


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

示例1: bp_group_avatar

"><?php 
        bp_group_avatar('type=thumb&width=150&height=150');
        ?>
</a>
			</div>

			<div class="item col-md-6">
				<div class="item-title"><a href="<?php 
        bp_group_permalink();
        ?>
"><?php 
        bp_group_name();
        ?>
</a></div>
				<div class="item-meta"><span class="activity"><?php 
        printf(__('active %s', 'wplms_modern'), bp_get_group_last_active());
        ?>
</span></div>

				<div class="item-desc"><?php 
        bp_group_description_excerpt();
        ?>
</div>

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

			</div>

			<div class="action col-md-3">
开发者ID:nikitansk,项目名称:devschool,代码行数:31,代码来源:groups-loop.php

示例2: groups_ajax_widget_groups_list

function groups_ajax_widget_groups_list() {
	global $bp;

	check_ajax_referer('groups_widget_groups_list');

	switch ( $_POST['filter'] ) {
		case 'newest-groups':
			$type = 'newest';
		break;
		case 'recently-active-groups':
			$type = 'active';
		break;
		case 'popular-groups':
			$type = 'popular';
		break;
	}

	if ( bp_has_groups( 'type=' . $type . '&per_page=' . $_POST['max_groups'] . '&max=' . $_POST['max_groups'] ) ) : ?>
		<?php echo "0[[SPLIT]]"; ?>

		<ul id="groups-list" class="item-list">
			<?php while ( bp_groups() ) : bp_the_group(); ?>
				<li>
					<div class="item-avatar">
						<a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar_thumb() ?></a>
					</div>

					<div class="item">
						<div class="item-title"><a href="<?php bp_group_permalink() ?>" title="<?php bp_group_name() ?>"><?php bp_group_name() ?></a></div>
						<div class="item-meta">
							<span class="activity">
								<?php
								if ( 'newest-groups' == $_POST['filter'] ) {
									printf( __( 'created %s ago', 'buddypress' ), bp_get_group_date_created() );
								} else if ( 'recently-active-groups' == $_POST['filter'] ) {
									printf( __( 'active %s ago', 'buddypress' ), bp_get_group_last_active() );
								} else if ( 'popular-groups' == $_POST['filter'] ) {
									bp_group_member_count();
								}
								?>
							</span>
						</div>
					</div>
				</li>

			<?php endwhile; ?>
		</ul>
		<?php wp_nonce_field( 'groups_widget_groups_list', '_wpnonce-groups' ); ?>
		<input type="hidden" name="groups_widget_max" id="groups_widget_max" value="<?php echo esc_attr( $_POST['max_groups'] ); ?>" />

	<?php else: ?>

		<?php echo "-1[[SPLIT]]<li>" . __("No groups matched the current filter.", 'buddypress'); ?>

	<?php endif;

}
开发者ID:n-sane,项目名称:zaroka,代码行数:57,代码来源:bp-groups-widgets.php

示例3: widget


//.........这里部分代码省略.........
</a>
				<span class="bp-separator" role="separator"><?php 
            echo esc_html($separator);
            ?>
</span>
				<a href="<?php 
            bp_groups_directory_permalink();
            ?>
" id="popular-groups" <?php 
            if ($instance['group_default'] == 'popular') {
                ?>
 class="selected"<?php 
            }
            ?>
><?php 
            _e("Popular", 'buddypress');
            ?>
</a>
			</div>

			<ul id="groups-list" class="item-list">
				<?php 
            while (bp_groups()) {
                bp_the_group();
                ?>
					<li <?php 
                bp_group_class();
                ?>
>
						<div class="item-avatar">
							<a href="<?php 
                bp_group_permalink();
                ?>
" title="<?php 
                bp_group_name();
                ?>
"><?php 
                bp_group_avatar_thumb();
                ?>
</a>
						</div>

						<div class="item">
							<div class="item-title"><a href="<?php 
                bp_group_permalink();
                ?>
" title="<?php 
                bp_group_name();
                ?>
"><?php 
                bp_group_name();
                ?>
</a></div>
							<div class="item-meta">
								<span class="activity">
								<?php 
                if ('newest' == $instance['group_default']) {
                    printf(__('created %s', 'buddypress'), bp_get_group_date_created());
                } elseif ('active' == $instance['group_default']) {
                    printf(__('active %s', 'buddypress'), bp_get_group_last_active());
                } elseif ('popular' == $instance['group_default']) {
                    bp_group_member_count();
                }
                ?>
								</span>
							</div>
						</div>
					</li>

				<?php 
            }
            ?>
			</ul>
			<?php 
            wp_nonce_field('groups_widget_groups_list', '_wpnonce-groups');
            ?>
			<input type="hidden" name="groups_widget_max" id="groups_widget_max" value="<?php 
            echo esc_attr($max_groups);
            ?>
" />

		<?php 
        } else {
            ?>

			<div class="widget-error">
				<?php 
            _e('There are no groups to display.', 'buddypress');
            ?>
			</div>

		<?php 
        }
        ?>

		<?php 
        echo $after_widget;
        ?>
	<?php 
    }
开发者ID:boonebgorges,项目名称:BuddyPress-1,代码行数:101,代码来源:bp-groups-widgets.php

示例4: bp_group_avatar

"><?php 
            bp_group_avatar('type=thumb&width=72&height=72');
            ?>
</a>
			</div>

			<div class="item">
				<div class="item-title"><a href="<?php 
            bp_group_permalink();
            ?>
"><?php 
            bp_group_name();
            ?>
</a></div>
				<div class="item-meta"><span class="activity"><?php 
            printf(__('active %s', 'buddypress'), bp_get_group_last_active());
            ?>
</span></div>

				<div class="item-desc"><?php 
            bp_group_description_excerpt();
            ?>
</div>

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

			</div>

			<div class="action">
开发者ID:kd5ytx,项目名称:Empirical-Wordpress,代码行数:31,代码来源:groups-loop.php

示例5: bp_group_last_active

function bp_group_last_active($group = false)
{
    echo bp_get_group_last_active($group);
}
开发者ID:kd5ytx,项目名称:Empirical-Wordpress,代码行数:4,代码来源:bp-groups-template.php

示例6: bp_group_type

	<span class="highlight"><?php 
bp_group_type();
?>
</span>
	<h3><a href="<?php 
bp_group_permalink();
?>
" title="<?php 
bp_group_name();
?>
"><?php 
bp_group_name();
?>
</a></h3>
	 <span class="activity"><?php 
printf(__('active %s', 'vibe'), bp_get_group_last_active());
?>
</span>

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

	<div id="item-meta">

		<div id="item-buttons">

			<?php 
do_action('bp_group_header_actions');
?>
开发者ID:nikitansk,项目名称:devschool,代码行数:30,代码来源:group-header3.php

示例7: bp_group_permalink

        <h2><a href="<?php 
bp_group_permalink();
?>
" title="<?php 
bp_group_name();
?>
"><?php 
bp_group_name();
?>
</a></h2>
        <p><span class="highlight"><?php 
bp_group_type();
?>
</span></p>
        <p><span class="activity"><?php 
printf(__('active %s', 'bp-magic'), bp_get_group_last_active());
?>
</span></p>

	</div>    
</div><!-- #item-header-avatar -->

<div id="item-header-content">


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

		<div id="item-meta">
开发者ID:buddydev,项目名称:bp-magic,代码行数:30,代码来源:group-header.php

示例8: bp_group_permalink

<div id="item-header-content">
	<h2><a href="<?php 
bp_group_permalink();
?>
" title="<?php 
bp_group_name();
?>
"><?php 
bp_group_name();
?>
</a></h2>
	<span class="highlight"><?php 
bp_group_type();
?>
</span> <span class="activity"><?php 
printf(__('active %s', 'logicalboneshug'), bp_get_group_last_active());
?>
</span>

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

	<div id="item-meta">

		<?php 
bp_group_description();
?>

		<div id="item-buttons">
开发者ID:raminjan,项目名称:logicalbones_hug,代码行数:30,代码来源:group-header.php

示例9: groups_ajax_widget_groups_list

/**
 * AJAX callback for the Groups List widget.
 *
 * @since 1.0.0
 */
function groups_ajax_widget_groups_list()
{
    check_ajax_referer('groups_widget_groups_list');
    switch ($_POST['filter']) {
        case 'newest-groups':
            $type = 'newest';
            break;
        case 'recently-active-groups':
            $type = 'active';
            break;
        case 'popular-groups':
            $type = 'popular';
            break;
    }
    $per_page = isset($_POST['max_groups']) ? intval($_POST['max_groups']) : 5;
    $groups_args = array('user_id' => 0, 'type' => $type, 'per_page' => $per_page, 'max' => $per_page);
    if (bp_has_groups($groups_args)) {
        ?>
		<?php 
        echo "0[[SPLIT]]";
        ?>
		<?php 
        while (bp_groups()) {
            bp_the_group();
            ?>
			<li <?php 
            bp_group_class();
            ?>
>
				<div class="item-avatar">
					<a href="<?php 
            bp_group_permalink();
            ?>
"><?php 
            bp_group_avatar_thumb();
            ?>
</a>
				</div>

				<div class="item">
					<div class="item-title"><a href="<?php 
            bp_group_permalink();
            ?>
" title="<?php 
            bp_group_name();
            ?>
"><?php 
            bp_group_name();
            ?>
</a></div>
					<div class="item-meta">
						<span class="activity">
							<?php 
            if ('newest-groups' == $_POST['filter']) {
                printf(__('created %s', 'buddypress'), bp_get_group_date_created());
            } elseif ('recently-active-groups' == $_POST['filter']) {
                printf(__('active %s', 'buddypress'), bp_get_group_last_active());
            } elseif ('popular-groups' == $_POST['filter']) {
                bp_group_member_count();
            }
            ?>
						</span>
					</div>
				</div>
			</li>
		<?php 
        }
        ?>

		<?php 
        wp_nonce_field('groups_widget_groups_list', '_wpnonce-groups');
        ?>
		<input type="hidden" name="groups_widget_max" id="groups_widget_max" value="<?php 
        echo esc_attr($_POST['max_groups']);
        ?>
" />

	<?php 
    } else {
        ?>

		<?php 
        echo "-1[[SPLIT]]<li>" . __("No groups matched the current filter.", 'buddypress');
        ?>

	<?php 
    }
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:93,代码来源:bp-groups-widgets.php

示例10: bp_groups_grid

    /**
     * BP Groups Grid
     */
    function bp_groups_grid($atts)
    {
        $default_columns = 3;
        //four columns
        $allowed_columns = array(2, 3, 4, 6);
        extract(shortcode_atts(array('type' => 'active', 'max_item' => 10, 'columns' => $default_columns), $atts));
        $columns = floor(12 / $columns);
        // ensure that columns is scalable
        if (!in_array($columns, $allowed_columns)) {
            // default to default columns settings, just in case
            $columns = $default_columns;
        }
        $columns_classes = 'col-md-' . $columns . ' col-sm-' . $columns . ' col-xs-6';
        $params = array('type' => $type, 'per_page' => $max_item);
        $output = '';
        if (function_exists('bp_has_groups')) {
            if (bp_has_groups($params)) {
                ob_start();
                ?>
 
					<ul class="clearfix gears-bp-groups-grid">
						<?php 
                while (bp_groups()) {
                    ?>
						<?php 
                    bp_the_group();
                    ?>
							<li class="bp-groups-grid-item <?php 
                    echo $columns_classes;
                    ?>
">
								<?php 
                    $name = bp_get_group_name();
                    ?>
								<?php 
                    $permalink = bp_get_group_permalink();
                    ?>
								<?php 
                    $last_active = bp_get_group_last_active();
                    ?>
								<?php 
                    $members_count = bp_get_group_member_count();
                    ?>
								<?php 
                    $modal_content = esc_attr($members_count . ' &middot; ' . __('Active ', 'gears') . $last_active . '');
                    ?>
								
								<a title="<?php 
                    echo esc_attr($name);
                    ?>
" href="<?php 
                    echo esc_url($permalink);
                    ?>
">
									<span class="groups-name">
										<?php 
                    echo esc_attr($name);
                    ?>
											<span class="groups-count">
												<?php 
                    echo intval($members_count);
                    ?>
												<?php 
                    if ($members_count == 1) {
                        ?>
													<?php 
                        _e('Member', 'gears');
                        ?>
												<?php 
                    } else {
                        ?>
													<?php 
                        _e('Members', 'gears');
                        ?>
												<?php 
                    }
                    ?>
											</span>
									</span>

								</a>

								<a title="<?php 
                    echo esc_attr($name);
                    ?>
" href="<?php 
                    echo esc_url($permalink);
                    ?>
">
									<?php 
                    echo bp_get_group_avatar(array('type' => 'full'));
                    ?>
								</a>
							</li>
						<?php 
                }
                ?>
//.........这里部分代码省略.........
开发者ID:poweronio,项目名称:mbsite,代码行数:101,代码来源:library.php

示例11: bp_group_name

        ?>
" title="<?php 
        bp_group_name();
        ?>
"><?php 
        bp_group_name();
        ?>
</a></div>
						<div class="item-meta">
							<span class="activity">
							<?php 
        if ('newest' == $group_default) {
            printf(esc_html__('created %s', 'training'), bp_get_group_date_created());
        }
        if ('active' == $group_default) {
            printf(esc_html__('active %s', 'training'), bp_get_group_last_active());
        } elseif ('popular' == $group_default) {
            bp_group_member_count();
        }
        ?>
							</span>
							<p></p>
						</div>
					</div>
				</li>

			<?php 
    }
    ?>
		</ul>
	</div>	
开发者ID:morganloehr,项目名称:chris-verna,代码行数:31,代码来源:wpo_puddypress_groups.php

示例12: widget

    function widget($args, $instance)
    {
        global $bp;
        extract($args);
        $parent_id = isset($bp->groups->current_group->id) ? $bp->groups->current_group->id : 0;
        echo $before_widget;
        echo $before_title;
        if ($parent_id == 0) {
            echo $instance['title'];
        } else {
            echo $instance['sub_title'];
        }
        echo $after_title;
        ?>
		<?php 
        if (!class_exists('BP_Groups_Group')) {
            _e('You must enable Groups component to use this widget.', 'bp-group-hierarchy');
            return;
        }
        ?>
		<?php 
        if (bp_has_groups_hierarchy('type=' . $instance['sort_type'] . '&per_page=' . $instance['max_groups'] . '&max=' . $instance['max_groups'] . '&parent_id=' . $parent_id)) {
            ?>

			<ul id="toplevel-groups-list" class="item-list">
				<?php 
            while (bp_groups()) {
                bp_the_group();
                ?>
					<li>
						<div class="item-avatar">
							<a href="<?php 
                bp_group_permalink();
                ?>
"><?php 
                bp_group_avatar_thumb();
                ?>
</a>
						</div>

						<div class="item">
							<div class="item-title"><a href="<?php 
                bp_group_permalink();
                ?>
" title="<?php 
                echo strip_tags(bp_get_group_description_excerpt());
                ?>
"><?php 
                bp_group_name();
                ?>
</a></div>
							<div class="item-meta"><span class="activity">
								<?php 
                switch ($instance['sort_type']) {
                    case 'newest':
                        printf(__('created %s', 'buddypress'), bp_get_group_date_created());
                        break;
                    case 'alphabetical':
                    case 'active':
                        printf(__('active %s', 'buddypress'), bp_get_group_last_active());
                        break;
                    case 'popular':
                        bp_group_member_count();
                        break;
                    case 'prolific':
                        printf(_n('%d member group', '%d member groups', bp_group_hierarchy_has_subgroups(), 'bp-group-hierarchy'), bp_group_hierarchy_has_subgroups());
                }
                ?>
							</span></div>
							<?php 
                if ($instance['show_desc']) {
                    ?>
							<div class="item-desc"><?php 
                    bp_group_description_excerpt();
                    ?>
</div>
							<?php 
                }
                ?>
						</div>
					</li>

				<?php 
            }
            ?>
			</ul>
			<?php 
            wp_nonce_field('groups_widget_groups_list', '_wpnonce-groups');
            ?>
			<input type="hidden" name="toplevel_groups_widget_max" id="toplevel_groups_widget_max" value="<?php 
            echo esc_attr($instance['max_groups']);
            ?>
" />

		<?php 
        } else {
            ?>

			<div class="widget-error">
				<?php 
//.........这里部分代码省略.........
开发者ID:adisonc,项目名称:MaineLearning,代码行数:101,代码来源:bp-group-hierarchy-widgets.php

示例13: display

    function display($page = 1)
    {
        global $bp, $groups_template;
        $parent_template = $groups_template;
        $hide_button = false;
        if (isset($_REQUEST['grpage'])) {
            $page = (int) $_REQUEST['grpage'];
        } else {
            if (!is_numeric($page)) {
                $page = 1;
            } else {
                $page = (int) $page;
            }
        }
        /** Respect BuddyPress group creation restriction */
        if (function_exists('bp_user_can_create_groups')) {
            $hide_button = !bp_user_can_create_groups();
        }
        bp_has_groups_hierarchy(array('type' => 'alphabetical', 'parent_id' => $bp->groups->current_group->id, 'page' => $page));
        ?>
		<div class="group">

			<?php 
        if (($bp->is_item_admin || $bp->groups->current_group->can_create_subitems) && !$hide_button) {
            ?>
			<div class="generic-button group-button">
				<a title="<?php 
            printf(__('Create a %s', 'bp-group-hierarchy'), __('Member Group', 'bp-group-hierarchy'));
            ?>
" href="<?php 
            echo $bp->root_domain . '/' . bp_get_groups_root_slug() . '/' . 'create' . '/?parent_id=' . $bp->groups->current_group->id;
            ?>
"><?php 
            printf(__('Create a %s', 'bp-group-hierarchy'), __('Member Group', 'bp-group-hierarchy'));
            ?>
</a>
			</div><br /><br />
			<?php 
        }
        ?>

		<?php 
        if ($groups_template && count($groups_template->groups) > 0) {
            ?>

			<div id="pag-top" class="pagination">
				<div class="pag-count" id="group-dir-count-top">
					<?php 
            bp_groups_pagination_count();
            ?>
				</div>
		
				<div class="pagination-links" id="group-dir-pag-top">
					<?php 
            bp_groups_pagination_links();
            ?>
				</div>
			</div>
	
			<ul id="groups-list" class="item-list">
				<?php 
            while (bp_groups()) {
                bp_the_group();
                ?>
				<?php 
                $subgroup = $groups_template->group;
                ?>
				<?php 
                if ($subgroup->status == 'hidden' && !(groups_is_user_member($bp->loggedin_user->id, $subgroup->id) || groups_is_user_admin($bp->loggedin_user->id, $bp->groups->current_group->id))) {
                    continue;
                }
                ?>
				<li id="tree-childof_<?php 
                bp_group_id();
                ?>
">
					<div class="item-avatar">
						<a href="<?php 
                bp_group_permalink();
                ?>
"><?php 
                bp_group_avatar('type=thumb&width=50&height=50');
                ?>
</a>
					</div>
		
					<div class="item">
						<div class="item-title"><a href="<?php 
                bp_group_permalink();
                ?>
"><?php 
                bp_group_name();
                ?>
</a></div>
						<div class="item-meta"><span class="activity"><?php 
                printf(__('active %s', 'buddypress'), bp_get_group_last_active());
                ?>
</span></div>
						<div class="item-desc"><?php 
                bp_group_description_excerpt();
//.........这里部分代码省略.........
开发者ID:adisonc,项目名称:MaineLearning,代码行数:101,代码来源:extension.php

示例14: bp_get_the_site_group_last_active

function bp_get_the_site_group_last_active()
{
    global $site_groups_template;
    return apply_filters('bp_get_the_site_group_last_active', sprintf(__('active %s ago', 'buddypress'), bp_get_group_last_active($site_groups_template->group)));
}
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:5,代码来源:bp-groups-templatetags.php

示例15: bp_group_permalink

</a>
				</div>
			<?php 
        }
        ?>

			<div class="item">
				<div class="item-title"><a href="<?php 
        bp_group_permalink();
        ?>
"><?php 
        bp_group_name();
        ?>
</a></div>
				<div class="item-meta"><span class="activity"><?php 
        printf(__('active %s', 'wonderflux'), bp_get_group_last_active());
        ?>
</span></div>

				<div class="item-desc"><?php 
        bp_group_description_excerpt();
        ?>
</div>

				<?php 
        /**
         * Fires inside the listing of an individual group listing item.
         *
         * @since 1.1.0
         */
        do_action('bp_directory_groups_item');
开发者ID:Tanver186,项目名称:Wonderflux,代码行数:31,代码来源:groups-loop.php


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