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


PHP bp_is_group_membership_request函数代码示例

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


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

示例1: bp_get_template_part

            if (bp_is_group_admin_page()) {
                bp_get_template_part('groups/single/admin');
                // Group Activity
            } elseif (bp_is_group_activity()) {
                bp_get_template_part('groups/single/activity');
                // Group Members
            } elseif (bp_is_group_members()) {
                bp_groups_members_template_part();
                // Group Invitations
            } elseif (bp_is_group_invites()) {
                bp_get_template_part('groups/single/send-invites');
                // Old group forums
            } elseif (bp_is_group_forum()) {
                bp_get_template_part('groups/single/forum');
                // Membership request
            } elseif (bp_is_group_membership_request()) {
                bp_get_template_part('groups/single/request-membership');
                // Anything else (plugins mostly)
            } else {
                bp_get_template_part('groups/single/plugins');
            }
        }
        /**
         * Fires after the display of the group home body.
         *
         * @since 1.2.0
         */
        do_action('bp_after_group_body');
        ?>

	</div><!-- #item-body -->
开发者ID:toby-bushell,项目名称:triumph,代码行数:31,代码来源:home.php

示例2: gconnect_group_single_template

function gconnect_group_single_template()
{
    $template = false;
    if (bp_is_group_membership_request()) {
        $template = 'request-membership.php';
    } elseif (bp_group_is_visible()) {
        if (bp_is_group_admin_page()) {
            $template = 'admin.php';
        } elseif (bp_is_group_members()) {
            $template = 'members.php';
        } elseif (bp_is_group_invites()) {
            $template = 'send-invites.php';
        } elseif (bp_is_group_forum()) {
            $template = 'forum.php';
        } elseif (bp_is_active('activity')) {
            $template = 'activity.php';
        }
    }
    if ($template) {
        gconnect_locate_template(array("groups/single/{$template}"), true);
    }
    return $template;
}
开发者ID:hscale,项目名称:webento,代码行数:23,代码来源:class.theme.php

示例3: control

 /**
  * Check public group's control options and do the needed job
  */
 public function control()
 {
     $bp = buddypress();
     if (!$this->is_public_group()) {
         return;
     }
     // Append to current group the control settings
     $hidden_tabs = (array) groups_get_groupmeta($this->group->id, '_altctrl_tabs', true);
     $this->group->need_request = groups_get_groupmeta($this->group->id, '_altctrl_request', true);
     // Managing requests
     if (bp_is_group_admin_screen('membership-requests') && bp_is_item_admin()) {
         $bp->groups->current_group->status = 'private';
     }
     // Admin or members always have access
     if (bp_is_item_admin() || groups_is_user_member(bp_loggedin_user_id(), $this->group->id)) {
         return;
     }
     /** Group members only tabs ***************************************************/
     // Hide tabs
     if (!empty($bp->bp_options_nav[$this->group->slug]) && !empty($hidden_tabs)) {
         foreach (array_keys($bp->bp_options_nav[$this->group->slug]) as $item_tab) {
             if (!in_array($item_tab, $hidden_tabs)) {
                 continue;
             }
             $bp->bp_options_nav[$this->group->slug][$item_tab]['user_has_access'] = false;
         }
     }
     // Redirect if trying to access the page
     if (!empty($hidden_tabs) && in_array(bp_current_action(), $hidden_tabs)) {
         bp_core_add_message(__('This area is restricted to group members', 'altctrl-public-group'), 'error');
         bp_core_redirect(bp_get_group_permalink($this->group));
     }
     /** Joining group *************************************************************/
     if (!empty($this->group->need_request) && is_user_logged_in()) {
         // first add the request subnav
         bp_core_new_subnav_item(array('name' => __('Request Membership', 'altctrl-public-group'), 'slug' => 'request-membership', 'parent_url' => bp_get_group_permalink($this->group), 'parent_slug' => $this->group->slug, 'screen_function' => 'groups_screen_group_request_membership', 'position' => 30));
         // Then temporarly make the group private.
         if (bp_is_group_membership_request()) {
             $bp->groups->current_group->status = 'private';
         }
     }
 }
开发者ID:nightbook,项目名称:altctrl-public-group,代码行数:45,代码来源:alt-public-group-ctrl.php

示例4: miss_is_bp

 /**
  *
  */
 function miss_is_bp()
 {
     if (function_exists('bp_is_group') && (bp_is_blog_page() || bp_is_my_profile() || bp_is_my_profile() || is_front_page() || bp_is_component_front_page('activity') || bp_is_directory() || bp_is_profile_component() || bp_is_activity_component() || bp_is_blogs_component() || bp_is_messages_component() || bp_is_friends_component() || bp_is_groups_component() || bp_is_settings_component() || bp_is_user_activity() || bp_is_user_friends_activity() || bp_is_activity_permalink() || bp_is_user_profile() || bp_is_profile_edit() || bp_is_change_avatar() || bp_is_user_groups() || bp_is_group() || bp_is_group_home() || bp_is_group_create() || bp_is_group_admin_page() || bp_is_group_forum() || bp_is_group_activity() || bp_is_group_forum_topic() || bp_is_group_forum_topic_edit() || bp_is_group_members() || bp_is_group_invites() || bp_is_group_membership_request() || bp_is_group_leave() || bp_is_group_single() || bp_is_user_blogs() || bp_is_user_recent_posts() || bp_is_user_recent_commments() || bp_is_create_blog() || bp_is_user_friends() || bp_is_friend_requests() || bp_is_user_messages() || bp_is_messages_inbox() || bp_is_messages_sentbox() || bp_is_notices() || bp_is_messages_compose_screen() || bp_is_activation_page() || bp_is_register_page())) {
         return true;
     }
     return false;
 }
开发者ID:schiz,项目名称:scrollax,代码行数:10,代码来源:app.php

示例5: suffusion_bp_content_class

 /**
  * Similar to the post_class() function, but for BP. This is NOT used by core Suffusion, but is useful for child themes using BP.
  * This might be defined by the Suffusion BuddyPress Pack for BP users of Suffusion, but is included conditionally here so
  * that the theme and the plugin can be used independently of each other and so that one version of Suffusion can work with an older
  * version of the BP pack.
  *
  * @since 3.6.7
  * @param bool $custom
  * @param bool $echo
  * @return bool|string
  */
 function suffusion_bp_content_class($custom = false, $echo = true)
 {
     if (!function_exists('bp_is_group')) {
         return false;
     }
     $css = array();
     $css[] = 'post';
     if (function_exists('bp_is_profile_component') && bp_is_profile_component()) {
         $css[] = 'profile-component';
     }
     if (function_exists('bp_is_activity_component') && bp_is_activity_component()) {
         $css[] = 'activity-component';
     }
     if (function_exists('bp_is_blogs_component') && bp_is_blogs_component()) {
         $css[] = 'blogs-component';
     }
     if (function_exists('bp_is_messages_component') && bp_is_messages_component()) {
         $css[] = 'messages-component';
     }
     if (function_exists('bp_is_friends_component') && bp_is_friends_component()) {
         $css[] = 'friends-component';
     }
     if (function_exists('bp_is_groups_component') && bp_is_groups_component()) {
         $css[] = 'groups-component';
     }
     if (function_exists('bp_is_settings_component') && bp_is_settings_component()) {
         $css[] = 'settings-component';
     }
     if (function_exists('bp_is_member') && bp_is_member()) {
         $css[] = 'member';
     }
     if (function_exists('bp_is_user_activity') && bp_is_user_activity()) {
         $css[] = 'user-activity';
     }
     if (function_exists('bp_is_user_friends_activity') && bp_is_user_friends_activity()) {
         $css[] = 'user-friends-activity';
     }
     if (function_exists('bp_is_activity_permalink') && bp_is_activity_permalink()) {
         $css[] = 'activity-permalink';
     }
     if (function_exists('bp_is_user_profile') && bp_is_user_profile()) {
         $css[] = 'user-profile';
     }
     if (function_exists('bp_is_profile_edit') && bp_is_profile_edit()) {
         $css[] = 'profile-edit';
     }
     if (function_exists('bp_is_change_avatar') && bp_is_change_avatar()) {
         $css[] = 'change-avatar';
     }
     if (function_exists('bp_is_user_groups') && bp_is_user_groups()) {
         $css[] = 'user-groups';
     }
     if (function_exists('bp_is_group') && bp_is_group()) {
         $css[] = 'group';
     }
     if (function_exists('bp_is_group_home') && bp_is_group_home()) {
         $css[] = 'group-home';
     }
     if (function_exists('bp_is_group_create') && bp_is_group_create()) {
         $css[] = 'group-create';
     }
     if (function_exists('bp_is_group_admin_page') && bp_is_group_admin_page()) {
         $css[] = 'group-admin-page';
     }
     if (function_exists('bp_is_group_forum') && bp_is_group_forum()) {
         $css[] = 'group-forum';
     }
     if (function_exists('bp_is_group_activity') && bp_is_group_activity()) {
         $css[] = 'group-activity';
     }
     if (function_exists('bp_is_group_forum_topic') && bp_is_group_forum_topic()) {
         $css[] = 'group-forum-topic';
     }
     if (function_exists('bp_is_group_forum_topic_edit') && bp_is_group_forum_topic_edit()) {
         $css[] = 'group-forum-topic-edit';
     }
     if (function_exists('bp_is_group_members') && bp_is_group_members()) {
         $css[] = 'group-members';
     }
     if (function_exists('bp_is_group_invites') && bp_is_group_invites()) {
         $css[] = 'group-invites';
     }
     if (function_exists('bp_is_group_membership_request') && bp_is_group_membership_request()) {
         $css[] = 'group-membership-request';
     }
     if (function_exists('bp_is_group_leave') && bp_is_group_leave()) {
         $css[] = 'group-leave';
     }
     if (function_exists('bp_is_group_single') && bp_is_group_single()) {
//.........这里部分代码省略.........
开发者ID:jpsutton,项目名称:suffusion,代码行数:101,代码来源:bp-integration.php


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