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


PHP bp_is_group_admin_page函数代码示例

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


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

示例1: bp_attachments_cover_image_is_edit

/**
 * Are we on a page to edit a cover image ?
 *
 * @since  2.4.0
 *
 * @return bool True if on a page to edit a cover image, false otherwise
 */
function bp_attachments_cover_image_is_edit()
{
    $retval = false;
    $current_component = bp_current_component();
    if ('profile' === $current_component) {
        $current_component = 'xprofile';
    }
    if (!bp_is_active($current_component, 'cover_image')) {
        return $retval;
    }
    if (bp_is_user_change_cover_image()) {
        $retval = !bp_disable_cover_image_uploads();
    }
    if (bp_is_group_admin_page() && 'group-cover-image' == bp_get_group_current_admin_tab() || bp_is_group_create() && bp_is_group_creation_step('group-cover-image')) {
        $retval = !bp_disable_group_cover_image_uploads();
    }
    return apply_filters('bp_attachments_cover_image_is_edit', $retval, $current_component);
}
开发者ID:mawilliamson,项目名称:wordpress,代码行数:25,代码来源:bp-core-attachments.php

示例2: bp_is_group_admin_screen

/**
 * Is the current page a specific group admin screen?
 *
 * @since 1.1.0
 *
 * @param string $slug Admin screen slug.
 * @return bool
 */
function bp_is_group_admin_screen($slug = '')
{
    return (bool) (bp_is_group_admin_page() && bp_is_action_variable($slug));
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:12,代码来源:bp-groups-template.php

示例3: bp_get_the_body_class


//.........这里部分代码省略.........
        $bp_classes[] = 'profile-edit';
    }
    if (bp_is_user_friends_activity()) {
        $bp_classes[] = 'friends-activity';
    }
    if (bp_is_user_groups_activity()) {
        $bp_classes[] = 'groups-activity';
    }
    /* Messages **********************************************************/
    if (bp_is_messages_inbox()) {
        $bp_classes[] = 'inbox';
    }
    if (bp_is_messages_sentbox()) {
        $bp_classes[] = 'sentbox';
    }
    if (bp_is_messages_compose_screen()) {
        $bp_classes[] = 'compose';
    }
    if (bp_is_notices()) {
        $bp_classes[] = 'notices';
    }
    if (bp_is_user_friend_requests()) {
        $bp_classes[] = 'friend-requests';
    }
    if (bp_is_create_blog()) {
        $bp_classes[] = 'create-blog';
    }
    /* Groups ************************************************************/
    if (bp_is_group()) {
        $bp_classes[] = 'group-' . groups_get_current_group()->slug;
        // Add current group types.
        if ($group_types = bp_groups_get_group_type(bp_get_current_group_id(), false)) {
            foreach ($group_types as $group_type) {
                $bp_classes[] = sprintf('group-type-%s', esc_attr($group_type));
            }
        }
    }
    if (bp_is_group_leave()) {
        $bp_classes[] = 'leave-group';
    }
    if (bp_is_group_invites()) {
        $bp_classes[] = 'group-invites';
    }
    if (bp_is_group_members()) {
        $bp_classes[] = 'group-members';
    }
    if (bp_is_group_forum_topic()) {
        $bp_classes[] = 'group-forum-topic';
    }
    if (bp_is_group_forum_topic_edit()) {
        $bp_classes[] = 'group-forum-topic-edit';
    }
    if (bp_is_group_forum()) {
        $bp_classes[] = 'group-forum';
    }
    if (bp_is_group_admin_page()) {
        $bp_classes[] = 'group-admin';
        $bp_classes[] = bp_get_group_current_admin_tab();
    }
    if (bp_is_group_create()) {
        $bp_classes[] = 'group-create';
        $bp_classes[] = bp_get_groups_current_create_step();
    }
    if (bp_is_group_home()) {
        $bp_classes[] = 'group-home';
    }
    if (bp_is_single_activity()) {
        $bp_classes[] = 'activity-permalink';
    }
    /* Registration ******************************************************/
    if (bp_is_register_page()) {
        $bp_classes[] = 'registration';
    }
    if (bp_is_activation_page()) {
        $bp_classes[] = 'activation';
    }
    /* Current Component & Action ****************************************/
    if (!bp_is_blog_page()) {
        $bp_classes[] = bp_current_component();
        $bp_classes[] = bp_current_action();
    }
    /* Clean up ***********************************************************/
    // Add BuddyPress class if we are within a BuddyPress page.
    if (!bp_is_blog_page()) {
        $bp_classes[] = 'buddypress';
    }
    // Merge WP classes with BuddyPress classes and remove any duplicates.
    $classes = array_unique(array_merge((array) $bp_classes, (array) $wp_classes));
    /**
     * Filters the BuddyPress classes to be added to body_class()
     *
     * @since 1.1.0
     *
     * @param array $classes        Array of body classes to add.
     * @param array $bp_classes     Array of BuddyPress-based classes.
     * @param array $wp_classes     Array of WordPress-based classes.
     * @param array $custom_classes Array of classes that were passed to get_body_class().
     */
    return apply_filters('bp_get_the_body_class', $classes, $bp_classes, $wp_classes, $custom_classes);
}
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:101,代码来源:bp-core-template.php

示例4: edit_screen_save

 /**
  * Save the settings for the current the group
  *
  * @package Rendez Vous
  * @subpackage Groups
  *
  * @since Rendez Vous (1.1.0)
  *
  * @param int                       $group_id the group id we save settings for
  * @uses  check_admin_referer()     to check the request was made on the site
  * @uses  bp_get_current_group_id() to get the group id
  * @uses  wp_parse_args()           to merge args with defaults
  * @uses  groups_update_groupmeta() to set the extension option
  * @uses  bp_is_group_admin_page()  to check the group edit screen is displayed
  * @uses  bp_core_add_message()     to give a feedback to the user
  * @uses  bp_core_redirect()        to safely redirect the user
  * @uses  bp_get_group_permalink()  to build the group permalink
  */
 public function edit_screen_save($group_id = null)
 {
     if ('POST' !== strtoupper($_SERVER['REQUEST_METHOD'])) {
         return false;
     }
     check_admin_referer('groups_settings_save_' . $this->slug, 'rendez_vous_group_admin');
     if (empty($group_id)) {
         $group_id = bp_get_current_group_id();
     }
     $settings = array('_rendez_vous_group_activate' => 0);
     if (!empty($_POST['_rendez_vous_group_activate'])) {
         $s = wp_parse_args($_POST, $settings);
         $settings = array_intersect_key(array_map('absint', $s), $settings);
     }
     // Save group settings
     foreach ($settings as $meta_key => $meta_value) {
         groups_update_groupmeta($group_id, $meta_key, $meta_value);
     }
     if (bp_is_group_admin_page() || is_admin()) {
         // Only redirect on Manage screen
         if (bp_is_group_admin_page()) {
             bp_core_add_message(__('Settings saved successfully', 'rendez-vous'));
             bp_core_redirect(bp_get_group_permalink(buddypress()->groups->current_group) . 'admin/' . $this->slug);
         }
     }
 }
开发者ID:socialray,项目名称:surfied-2-0,代码行数:44,代码来源:rendez-vous-groups.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

示例6: bp_get_the_body_class


//.........这里部分代码省略.........
    }
    if (bp_is_user_recent_commments()) {
        $bp_classes[] = 'recent-comments';
    }
    if (bp_is_user_recent_posts()) {
        $bp_classes[] = 'recent-posts';
    }
    if (bp_is_user_change_avatar()) {
        $bp_classes[] = 'change-avatar';
    }
    if (bp_is_user_profile_edit()) {
        $bp_classes[] = 'profile-edit';
    }
    if (bp_is_user_friends_activity()) {
        $bp_classes[] = 'friends-activity';
    }
    if (bp_is_user_groups_activity()) {
        $bp_classes[] = 'groups-activity';
    }
    if (is_user_logged_in()) {
        $bp_classes[] = 'logged-in';
    }
    /** Messages **********************************************************/
    if (bp_is_messages_inbox()) {
        $bp_classes[] = 'inbox';
    }
    if (bp_is_messages_sentbox()) {
        $bp_classes[] = 'sentbox';
    }
    if (bp_is_messages_compose_screen()) {
        $bp_classes[] = 'compose';
    }
    if (bp_is_notices()) {
        $bp_classes[] = 'notices';
    }
    if (bp_is_user_friend_requests()) {
        $bp_classes[] = 'friend-requests';
    }
    if (bp_is_create_blog()) {
        $bp_classes[] = 'create-blog';
    }
    /** Groups ************************************************************/
    if (bp_is_group_leave()) {
        $bp_classes[] = 'leave-group';
    }
    if (bp_is_group_invites()) {
        $bp_classes[] = 'group-invites';
    }
    if (bp_is_group_members()) {
        $bp_classes[] = 'group-members';
    }
    if (bp_is_group_forum_topic()) {
        $bp_classes[] = 'group-forum-topic';
    }
    if (bp_is_group_forum_topic_edit()) {
        $bp_classes[] = 'group-forum-topic-edit';
    }
    if (bp_is_group_forum()) {
        $bp_classes[] = 'group-forum';
    }
    if (bp_is_group_admin_page()) {
        $bp_classes[] = 'group-admin';
    }
    if (bp_is_group_create()) {
        $bp_classes[] = 'group-create';
    }
    if (bp_is_group_home()) {
        $bp_classes[] = 'group-home';
    }
    if (bp_is_single_activity()) {
        $bp_classes[] = 'activity-permalink';
    }
    /** Registration ******************************************************/
    if (bp_is_register_page()) {
        $bp_classes[] = 'registration';
    }
    if (bp_is_activation_page()) {
        $bp_classes[] = 'activation';
    }
    /** Current Component & Action ****************************************/
    if (!bp_is_blog_page()) {
        $bp_classes[] = bp_current_component();
        $bp_classes[] = bp_current_action();
    }
    /** Clean up***********************************************************/
    // We don't want NXTClass blog classes to appear on non-blog pages.
    if (!bp_is_blog_page()) {
        // Preserve any custom classes already set
        if (!empty($custom_classes)) {
            $nxt_classes = (array) $custom_classes;
        } else {
            $nxt_classes = array();
        }
    }
    // Merge nxt classes with BP classes
    $classes = array_merge((array) $bp_classes, (array) $nxt_classes);
    // Remove any duplicates
    $classes = array_unique($classes);
    return apply_filters('bp_get_the_body_class', $classes, $bp_classes, $nxt_classes, $custom_classes);
}
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:101,代码来源:bp-core-template.php

示例7: bp_get_the_body_class


//.........这里部分代码省略.........
    if (bp_is_user_friends()) {
        $bp_classes[] = 'my-friends';
    }
    if (bp_is_user_messages()) {
        $bp_classes[] = 'my-messages';
    }
    if (bp_is_user_recent_commments()) {
        $bp_classes[] = 'recent-comments';
    }
    if (bp_is_user_recent_posts()) {
        $bp_classes[] = 'recent-posts';
    }
    if (bp_is_user_change_avatar()) {
        $bp_classes[] = 'change-avatar';
    }
    if (bp_is_user_profile_edit()) {
        $bp_classes[] = 'profile-edit';
    }
    if (bp_is_user_friends_activity()) {
        $bp_classes[] = 'friends-activity';
    }
    if (bp_is_user_groups_activity()) {
        $bp_classes[] = 'groups-activity';
    }
    /** Messages **********************************************************/
    if (bp_is_messages_inbox()) {
        $bp_classes[] = 'inbox';
    }
    if (bp_is_messages_sentbox()) {
        $bp_classes[] = 'sentbox';
    }
    if (bp_is_messages_compose_screen()) {
        $bp_classes[] = 'compose';
    }
    if (bp_is_notices()) {
        $bp_classes[] = 'notices';
    }
    if (bp_is_user_friend_requests()) {
        $bp_classes[] = 'friend-requests';
    }
    if (bp_is_create_blog()) {
        $bp_classes[] = 'create-blog';
    }
    /** Groups ************************************************************/
    if (bp_is_group()) {
        $bp_classes[] = 'group-' . groups_get_current_group()->slug;
    }
    if (bp_is_group_leave()) {
        $bp_classes[] = 'leave-group';
    }
    if (bp_is_group_invites()) {
        $bp_classes[] = 'group-invites';
    }
    if (bp_is_group_members()) {
        $bp_classes[] = 'group-members';
    }
    if (bp_is_group_forum_topic()) {
        $bp_classes[] = 'group-forum-topic';
    }
    if (bp_is_group_forum_topic_edit()) {
        $bp_classes[] = 'group-forum-topic-edit';
    }
    if (bp_is_group_forum()) {
        $bp_classes[] = 'group-forum';
    }
    if (bp_is_group_admin_page()) {
        $bp_classes[] = 'group-admin';
        $bp_classes[] = bp_get_group_current_admin_tab();
    }
    if (bp_is_group_create()) {
        $bp_classes[] = 'group-create';
        $bp_classes[] = bp_get_groups_current_create_step();
    }
    if (bp_is_group_home()) {
        $bp_classes[] = 'group-home';
    }
    if (bp_is_single_activity()) {
        $bp_classes[] = 'activity-permalink';
    }
    /** Registration ******************************************************/
    if (bp_is_register_page()) {
        $bp_classes[] = 'registration';
    }
    if (bp_is_activation_page()) {
        $bp_classes[] = 'activation';
    }
    /** Current Component & Action ****************************************/
    if (!bp_is_blog_page()) {
        $bp_classes[] = bp_current_component();
        $bp_classes[] = bp_current_action();
    }
    /** Clean up ***********************************************************/
    // Add BuddyPress class if we are within a BuddyPress page
    if (!bp_is_blog_page()) {
        $bp_classes[] = 'buddypress';
    }
    // Merge WP classes with BuddyPress classes and remove any duplicates
    $classes = array_unique(array_merge((array) $bp_classes, (array) $wp_classes));
    return apply_filters('bp_get_the_body_class', $classes, $bp_classes, $wp_classes, $custom_classes);
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:101,代码来源:bp-core-template.php

示例8: bp_get_options_nav

<?php 
        bp_get_options_nav();
        do_action('bp_group_options_nav');
        ?>
</ul>
</div>
</div>
-->
		
					<div id="item-body" class="clearfix">
						<?php 
        do_action('bp_before_group_body');
        ?>
		
						<?php 
        if (bp_is_group_admin_page() && bp_group_is_visible()) {
            ?>
							<?php 
            locate_template(array('groups/single/admin.php'), true);
            ?>
		
						<?php 
        } elseif (bp_is_group_members() && bp_group_is_visible()) {
            ?>
							<?php 
            locate_template(array('groups/single/members.php'), true);
            ?>
		
						<?php 
        } elseif (bp_is_group_invites() && bp_group_is_visible()) {
            ?>
开发者ID:schiz,项目名称:scrollax,代码行数:31,代码来源:single-home.php

示例9: body_class

 function body_class($wp_classes, $custom_classes = false)
 {
     global $bp;
     $bp_classes = array();
     if (bp_is_directory()) {
         $bp_classes[] = 'directory';
     } elseif (bp_is_single_item()) {
         $bp_classes[] = 'single-item';
     } elseif (bp_is_activity_component() || $this->show_activity_page) {
         $bp_classes[] = 'activity';
     }
     if ($this->adminbar && $this->theme->have_adminbar()) {
         $bp_classes[] = 'adminbar';
     }
     if (!is_page() && is_front_page() && is_file(CHILD_DIR . '/home.php')) {
         $bp_classes[] = 'home';
     }
     if ($this->show_activity_page) {
         $bp_classes[] = 'internal-page';
     } elseif (!bp_is_blog_page()) {
         $wp_classes = array();
         if (!bp_is_directory()) {
             $bp_classes[] = 'internal-page';
         }
         if (bp_is_user_profile()) {
             $bp_classes[] = 'profile';
         } elseif (bp_is_blogs_component()) {
             $bp_classes[] = 'blogs';
         } elseif (bp_is_messages_component()) {
             $bp_classes[] = 'messages';
         } elseif (bp_is_friends_component()) {
             $bp_classes[] = 'friends';
         } elseif (bp_is_groups_component()) {
             $bp_classes[] = 'groups';
         } elseif (bp_is_settings_component()) {
             $bp_classes[] = 'settings';
         }
     }
     if (is_user_logged_in()) {
         $bp_classes[] = 'logged-in';
         if (!bp_is_directory()) {
             if (bp_is_user_friends()) {
                 $bp_classes[] = 'my-friends';
             } elseif (bp_is_user_activity()) {
                 $bp_classes[] = 'my-activity';
             } elseif (bp_is_user_blogs()) {
                 $bp_classes[] = 'my-blogs';
             } elseif (bp_is_user_groups()) {
                 $bp_classes[] = 'my-groups';
             } elseif (bp_is_messages_inbox()) {
                 $bp_classes[] = 'inbox';
             } elseif (bp_is_messages_sentbox()) {
                 $bp_classes[] = 'sentbox';
             } elseif (bp_is_messages_compose_screen()) {
                 $bp_classes[] = 'compose';
             } elseif (bp_is_notices()) {
                 $bp_classes[] = 'notices';
             } elseif (bp_is_user_friend_requests()) {
                 $bp_classes[] = 'friend-requests';
             } elseif (bp_is_create_blog()) {
                 $bp_classes[] = 'create-blog';
             } elseif (bp_is_group_leave()) {
                 $bp_classes[] = 'leave-group';
             } elseif (bp_is_group_invites()) {
                 $bp_classes[] = 'group-invites';
             } elseif (bp_is_group_forum_topic_edit()) {
                 $bp_classes[] = 'group-forum-topic-edit';
             } elseif (bp_is_group_admin_page()) {
                 $bp_classes[] = 'group-admin';
             } elseif (bp_is_group_create()) {
                 $bp_classes[] = 'group-create';
             } elseif (bp_is_user_change_avatar()) {
                 $bp_classes[] = 'change-avatar';
             } elseif (bp_is_user_profile_edit()) {
                 $bp_classes[] = 'profile-edit';
             }
         }
     } else {
         $bp_classes[] = 'visitor';
     }
     if (bp_is_group_members()) {
         $bp_classes[] = 'group-members';
     } elseif (bp_is_group_home()) {
         $bp_classes[] = 'group-home';
     } elseif (bp_is_group_forum()) {
         $bp_classes[] = 'group-forum';
         if (bp_is_group_forum_topic()) {
             $bp_classes[] = 'group-forum-topic';
         }
     } else {
         if (bp_is_user_recent_commments()) {
             $bp_classes[] = 'recent-comments';
         }
         if (bp_is_user_recent_posts()) {
             $bp_classes[] = 'recent-posts';
         }
         if (bp_is_user_friends_activity()) {
             $bp_classes[] = 'friends-activity';
         } elseif (bp_is_single_activity()) {
             $bp_classes[] = 'activity-permalink';
//.........这里部分代码省略.........
开发者ID:hscale,项目名称:webento,代码行数:101,代码来源:class.front.php

示例10: get_context

 /**
  * Get the page context
  * @version 2.0
  */
 function get_context()
 {
     // Setup placeholders
     $title = SITENAME;
     $desc = get_bloginfo('description');
     $classes = get_body_class();
     $crumbs = array();
     // Get some data
     $id = $this->queried_object_id;
     $object = $this->queried_object;
     $sep = " &bull; ";
     /*--------------------------------------------
     			DEFAULT CONTEXT
     		---------------------------------------------*/
     $classes[] = 0 == get_current_user_id() ? 'logged-out' : 'logged-in';
     $crumbs[] = '<a href="' . SITEURL . '" title="' . SITENAME . '" rel="home" class="trail-home">Home</a>';
     // Homepage
     if (is_home()) {
         $title = SITENAME . $sep . 'Home';
         $classes[] = 'home';
         $classes[] = 'sidebar';
         $classes[] = 'archive';
         /*--------------------------------------------
         			BUDDYPRESS CONTEXT
         		---------------------------------------------*/
     } elseif (class_exists('BuddyPress') && is_buddypress()) {
         // BuddyPress Defaults
         $title = "BuddyPress Page";
         $desc = "This is a BuddyPress page.";
         $classes[] = 'buddypress';
         // User Profiles
         if (bp_is_user()) {
             $title = bp_get_displayed_user_fullname() . $sep . "User Profile";
             $desc = SITENAME . " user profile for member " . bp_get_displayed_user_fullname();
             // Your own profile
             if (bp_is_my_profile()) {
                 $crumbs[] = 'Your Profile';
             } else {
                 $crumbs[] = '<a href="' . bp_get_members_directory_permalink() . '" title="Members Directory">Members</a>';
                 $crumbs[] = '<a href="' . bp_displayed_user_domain() . '" title="' . bp_get_displayed_user_fullname() . '">' . bp_get_displayed_user_fullname() . '</a>';
             }
             // Display the profile component if it isnt the profile home
             if (!bp_is_user_profile()) {
                 $crumbs[] = ucfirst(bp_current_component());
             }
             // Display the current action if it is not the default public profile
             if (!in_array(bp_current_action(), array('public', 'just-me', 'my-friends'))) {
                 $crumbs[] = ucfirst(bp_current_action());
             }
             // Single Group
         } elseif (bp_is_group() || bp_is_group_create()) {
             // Group Creation
             if (bp_is_group_create()) {
                 $title = 'Submit New Group';
                 $desc = 'Submit a new user group for listing on the ' . SITENAME . ' community groups directory.';
                 $crumbs[] = '<a href="' . SITEURL . '/' . bp_get_groups_root_slug() . '" title="Groups Directory">Groups</a>';
                 $crumbs[] = 'Create Group';
             } elseif (bp_is_group()) {
                 // Default entries
                 $title = bp_get_group_name();
                 $desc = SITENAME . ' guild profile for ' . bp_get_group_name();
                 $classes = array_diff($classes, array('page', 'page-template-default'));
                 $crumbs[] = '<a href="' . bp_get_groups_directory_permalink() . '" title="Groups Directory">Groups</a>';
                 // Group Profile Home
                 if (bp_is_group_home()) {
                     $title = $title . $sep . 'Profile';
                     $crumbs[] = bp_get_group_name();
                     // Advanced Component
                 } else {
                     // Link back to group profile
                     $crumbs[] = '<a href="' . bp_get_group_permalink() . '" title="Return to Group Profile">' . bp_get_group_name() . '</a>';
                     // Members
                     if (bp_is_group_members()) {
                         $title = $title . $sep . 'Members';
                         $crumbs[] = 'Members';
                         // Activity
                     } elseif (bp_is_group_activity()) {
                         $title = $title . $sep . 'Activity';
                         $crumbs[] = 'Activity';
                         // Invites
                     } elseif (bp_is_group_invites()) {
                         $title = $title . $sep . 'Invitations';
                         $crumbs[] = 'Invitations';
                         // Admin
                     } elseif (bp_is_group_admin_page()) {
                         $title = $title . $sep . 'Admin';
                         $crumbs[] = 'Admin';
                         // Forum
                     } else {
                         // Forum Root
                         if (NULL == bp_action_variable()) {
                             $title = $title . $sep . 'Forum';
                             $crumbs[] = 'Forum';
                             // Sub-Component
                         } else {
                             $crumbs[] = '<a href="' . bp_get_group_permalink() . 'forum/" title="Group Forum">Forum</a>';
//.........这里部分代码省略.........
开发者ID:tamriel-foundry,项目名称:apoc2,代码行数:101,代码来源:context.php

示例11: init

 /**
  * Load additional BuddyPress classes
  */
 function init()
 {
     // Load the Apoc_Group_Edit class for group administration screens
     if (bp_is_group_create() || bp_is_group_admin_page()) {
         global $group_edit;
         $group_edit = new Apoc_Group_Edit();
     }
     // Groups extensions
     if (class_exists('BP_Group_Extension')) {
         bp_register_group_extension('Apoc_Group_Add_Leader');
     }
 }
开发者ID:tamriel-foundry,项目名称:apoc2,代码行数:15,代码来源:buddypress.php

示例12: shoestrap_is_bp

/**
 * Check if this is a BuddyPress page or not.
 * Returns true or false (boolean)
 */
function shoestrap_is_bp()
{
    $bp = false;
    /** Pages *************************************************************/
    if (!$bp && bp_is_directory()) {
        $bp = true;
    } elseif (!$bp && bp_is_single_item()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_profile()) {
        $bp = true;
    } elseif (!$bp && bp_is_activity_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_blogs_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_messages_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_friends_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_groups_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_settings_component()) {
        $bp = true;
    } elseif (!$bp && bp_is_user()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_blogs()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_groups()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_activity()) {
        $bp = true;
    } elseif (!$bp && bp_is_my_profile()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_profile()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_friends()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_messages()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_recent_commments()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_recent_posts()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_change_avatar()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_profile_edit()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_friends_activity()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_groups_activity()) {
        $bp = true;
    } elseif (!$bp && is_user_logged_in()) {
        $bp = true;
    } elseif (!$bp && bp_is_messages_inbox()) {
        $bp = true;
    } elseif (!$bp && bp_is_messages_sentbox()) {
        $bp = true;
    } elseif (!$bp && bp_is_messages_compose_screen()) {
        $bp = true;
    } elseif (!$bp && bp_is_notices()) {
        $bp = true;
    } elseif (!$bp && bp_is_user_friend_requests()) {
        $bp = true;
    } elseif (!$bp && bp_is_create_blog()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_leave()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_invites()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_members()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_forum_topic()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_forum_topic_edit()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_forum()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_admin_page()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_create()) {
        $bp = true;
    } elseif (!$bp && bp_is_group_home()) {
        $bp = true;
    } elseif (!$bp && bp_is_single_activity()) {
        $bp = true;
    } elseif (!$bp && bp_is_register_page()) {
        $bp = true;
    } elseif (!$bp && bp_is_activation_page()) {
        $bp = true;
    } elseif (!$bp && !bp_is_blog_page()) {
        $bp = true;
    }
    return $bp;
}
开发者ID:MinecraftServernet,项目名称:shoestrap-3,代码行数:97,代码来源:buddypress.php

示例13: bp_core_avatar_reset_query

/**
 * Reset the week parameter of the WordPress main query if needed
 *
 * When cropping an avatar, a $_POST['w'] var is sent, setting the 'week'
 * parameter of the WordPress main query to this posted var. To avoid
 * notices, we need to make sure this 'week' query var is reset to 0
 *
 * @since  BuddyPress (2.2.0)
 *
 * @param  WP_Query $posts_query the main query object
 * @uses   bp_is_group_create()
 * @uses   bp_is_group_admin_page()
 * @uses   bp_is_group_admin_screen() to check for a group admin screen
 * @uses   bp_action_variable() to check for the group's avatar creation step
 * @uses   bp_is_user_change_avatar() to check for the user's change profile screen
 */
function bp_core_avatar_reset_query($posts_query = null)
{
    $reset_w = false;
    // Group's avatar edit screen
    if (bp_is_group_admin_page()) {
        $reset_w = bp_is_group_admin_screen('group-avatar');
        // Group's avatar create screen
    } elseif (bp_is_group_create()) {
        /**
         * we can't use bp_get_groups_current_create_step()
         * as it's not set yet
         */
        $reset_w = 'group-avatar' === bp_action_variable(1);
        // User's change avatar screen
    } else {
        $reset_w = bp_is_user_change_avatar();
    }
    // A user or a group is cropping an avatar
    if (true === $reset_w && isset($_POST['avatar-crop-submit'])) {
        $posts_query->set('w', 0);
    }
}
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:38,代码来源:bp-core-avatars.php

示例14: bp_avatar_is_front_edit

/**
 * Checks whether Avatar UI should be loaded.
 *
 * @since  2.3.0
 *
 * @return bool True if Avatar UI should load, false otherwise.
 */
function bp_avatar_is_front_edit()
{
    $retval = false;
    // No need to carry on if the current WordPress version is not supported.
    if (!bp_attachments_is_wp_version_supported()) {
        return $retval;
    }
    if (bp_is_user_change_avatar() && 'crop-image' !== bp_get_avatar_admin_step()) {
        $retval = !bp_core_get_root_option('bp-disable-avatar-uploads');
    }
    if (bp_is_active('groups')) {
        // Group creation
        if (bp_is_group_create() && bp_is_group_creation_step('group-avatar') && 'crop-image' !== bp_get_avatar_admin_step()) {
            $retval = !bp_disable_group_avatar_uploads();
            // Group Manage
        } elseif (bp_is_group_admin_page() && bp_is_group_admin_screen('group-avatar') && 'crop-image' !== bp_get_avatar_admin_step()) {
            $retval = !bp_disable_group_avatar_uploads();
        }
    }
    /**
     * Use this filter if you need to :
     * - Load the avatar UI for a component that is !groups or !user (return true regarding your conditions)
     * - Completely disable the avatar UI introduced in 2.3 (eg: __return_false())
     *
     * @since  2.3.0
     *
     * @param bool whether to load the Avatar UI.
     */
    return apply_filters('bp_avatar_is_front_edit', $retval);
}
开发者ID:toby-bushell,项目名称:triumph,代码行数:37,代码来源:bp-core-avatars.php

示例15: edit_screen_save

 /**
  * Save the settings for the current the group
  *
  * @package WP Idea Stream
  * @subpackage buddypress/groups
  *
  * @since  2.0.0
  *
  * @param int $group_id the group id we save settings for
  * @uses  check_admin_referer() to check the request was made on the site
  * @uses  bp_get_current_group_id() to get the group id
  * @uses  wp_parse_args() to merge args with defaults
  * @uses  groups_update_groupmeta() to set the extension option
  * @uses  bp_is_group_admin_page() to check the group edit screen is displayed
  * @uses  wp_idea_stream_user_can() to check user's capability
  * @uses  WP_Idea_Stream_Group->remove_from_group() to remove ideas from group
  * @uses  bp_core_add_message() to give a feedback to the user
  * @uses  bp_core_redirect() to safely redirect the user
  * @uses  bp_get_group_permalink() to build the group permalink
  * @uses  buddypress() to get BuddyPress instance
  */
 public function edit_screen_save($group_id = null)
 {
     if ('POST' !== strtoupper($_SERVER['REQUEST_METHOD'])) {
         return false;
     }
     check_admin_referer('groups_settings_save_' . $this->slug, 'ideastream_group_admin');
     if (empty($group_id)) {
         $group_id = bp_get_current_group_id();
     }
     /* Insert your edit screen save code here */
     $settings = array('_group_ideastream_activate' => 0, '_group_ideastream_comments' => 0, '_group_ideastream_categories' => 0);
     if (!empty($_POST['_group_ideastream_activate'])) {
         $s = wp_parse_args($_POST, $settings);
         $settings = array_intersect_key(array_map('absint', $s), $settings);
     }
     // Save group settings
     foreach ($settings as $meta_key => $meta_value) {
         groups_update_groupmeta($group_id, $meta_key, $meta_value);
     }
     if (bp_is_group_admin_page() || is_admin()) {
         // Remove all ideas if this action was requested (only available on group edit screen)
         if (!empty($_POST['_group_ideastream_remove_ideas']) && wp_idea_stream_user_can('remove_group_ideas')) {
             $this->remove_from_group(0, $group_id);
         }
         // Only redirect on Manage screen
         if (bp_is_group_admin_page()) {
             bp_core_add_message(__('Settings saved successfully', 'wp-idea-stream'));
             bp_core_redirect(bp_get_group_permalink(buddypress()->groups->current_group) . 'admin/' . $this->slug);
         }
     }
 }
开发者ID:mrjarbenne,项目名称:wp-idea-stream,代码行数:52,代码来源:groups.php


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