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

PHP bp_get_group_date_created函数代码示例

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

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



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

示例1: widget

    function widget($args, $instance)
    {
        $user_id = apply_filters('bp_group_widget_user_id', '0');
        extract($args);
        if (empty($instance['group_default'])) {
            $instance['group_default'] = 'popular';
        }
        if (empty($instance['title'])) {
            $instance['title'] = __('Groups', 'buddypress');
        }
        echo $before_widget;
        $title = !empty($instance['link_title']) ? '<a href="' . trailingslashit(bp_get_root_domain() . '/' . bp_get_groups_root_slug()) . '">' . $instance['title'] . '</a>' : $instance['title'];
        echo $before_title . $title . $after_title;
        ?>

		<?php 
        if (bp_has_groups('user_id=' . $user_id . '&type=' . $instance['group_default'] . '&max=' . $instance['max_groups'] . '&per_page=' . $instance['max_groups'])) {
            ?>
			<div class="item-options" id="groups-list-options">
				<a href="<?php 
            echo site_url(bp_get_groups_root_slug());
            ?>
" id="newest-groups"<?php 
            if ($instance['group_default'] == 'newest') {
                ?>
 class="selected"<?php 
            }
            ?>
><?php 
            _e("Newest", 'buddypress');
            ?>
</a> |
				<a href="<?php 
            echo site_url(bp_get_groups_root_slug());
            ?>
" id="recently-active-groups"<?php 
            if ($instance['group_default'] == 'active') {
                ?>
 class="selected"<?php 
            }
            ?>
><?php 
            _e("Active", 'buddypress');
            ?>
</a> |
				<a href="<?php 
            echo site_url(bp_get_groups_root_slug());
            ?>
" 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>
						<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());
                }
                if ('active' == $instance['group_default']) {
                    printf(__('active %s', 'buddypress'), bp_get_group_last_active());
                } else {
                    if ('popular' == $instance['group_default']) {
//.........这里部分代码省略.........
开发者ID:kosir,项目名称:thatcamp-org,代码行数:101,代码来源:groups-widget.php


示例2: bp_group_date_created

/**
 * Output the created date of the current group in the loop.
 *
 * @since 1.0.0
 * @since 2.7.0 Added $args as a parameter.
 *
 * @param object|bool  $group Optional. Group object. Default: current group in loop.
 * @param array|string $args  {@see bp_get_group_date_created()}.
 */
function bp_group_date_created($group = false, $args = array())
{
    echo bp_get_group_date_created($group, $args);
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:13,代码来源:bp-groups-template.php


示例3: bp_group_date_created

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


示例4: 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


示例5: bp_group_date_created

function bp_group_date_created()
{
    echo bp_get_group_date_created();
}
开发者ID:newington,项目名称:buddypress,代码行数:4,代码来源:bp-groups-template.php


示例6: 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


示例7: bp_group_permalink

					<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' == $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 
    }
开发者ID:morganloehr,项目名称:chris-verna,代码行数:31,代码来源:wpo_puddypress_groups.php


示例8: 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


示例9: bp_group_date_created

function bp_group_date_created($deprecated = false)
{
    echo bp_get_group_date_created();
}
开发者ID:alvaropereyra,项目名称:shrekcms,代码行数:4,代码来源:bp-groups-templatetags.php


示例10: 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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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