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


PHP bp_is_group_create函数代码示例

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


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

示例1: wff_theme_cover_photos

 /**
  * Add Cover Photos to BuddyPress.
  */
 function wff_theme_cover_photos()
 {
     if (bp_is_user() || bp_is_group()) {
         if (function_exists('bp_disable_cover_image_uploads') && bp_disable_cover_image_uploads() == false && !bp_is_group_create()) {
             get_template_part('buddypress/parts/cover-photo');
         }
     }
 }
开发者ID:WeFoster,项目名称:wefoster,代码行数:11,代码来源:bp-actions.php

示例2: bcg_is_disabled_for_group

/**
 *
 * @global type $bp
 * @return type 
 */
function bcg_is_disabled_for_group()
{
    $bp = buddypress();
    $group_id = false;
    if (bp_is_group_create()) {
        $group_id = $_COOKIE['bp_new_group_id'];
    } elseif (bp_is_group()) {
        $group_id = $bp->groups->current_group->id;
    }
    return apply_filters('bcg_is_disabled_for_group', bcg_is_disabled($group_id));
}
开发者ID:WP--plugins,项目名称:blog-categories-for-groups,代码行数:16,代码来源:bcg-functions.php

示例3: cfbgr_is_restriction_js

/**
 * Load the js only when needed
 *
 * @return bool
 */
function cfbgr_is_restriction_js()
{
    // Group create
    if (bp_is_group_create() && bp_is_group_creation_step('group-settings')) {
        return true;
    }
    // Group manage
    if (bp_is_group() && bp_is_group_admin_screen('group-settings')) {
        return true;
    }
    return false;
}
开发者ID:WeFoster,项目名称:buddypress-group-restrictions,代码行数:17,代码来源:functions.php

示例4: bp_groups_group_admin_menu

/**
 * Add the Group Admin top-level menu when viewing group pages.
 *
 * @since 1.5.0
 *
 * @todo Add dynamic menu items for group extensions.
 *
 * @return false|null False if not on a group page, or if user does not have
 *                    access to group admin options.
 */
function bp_groups_group_admin_menu()
{
    global $wp_admin_bar;
    $bp = buddypress();
    // Only show if viewing a group.
    if (!bp_is_group() || bp_is_group_create()) {
        return false;
    }
    // Only show this menu to group admins and super admins.
    if (!bp_current_user_can('bp_moderate') && !bp_group_is_admin()) {
        return false;
    }
    // Unique ID for the 'Edit Group' menu.
    $bp->group_admin_menu_id = 'group-admin';
    // Add the top-level Group Admin button.
    $wp_admin_bar->add_menu(array('id' => $bp->group_admin_menu_id, 'title' => __('Edit Group', 'buddypress'), 'href' => bp_get_group_permalink($bp->groups->current_group)));
    // Index of the Manage tabs parent slug.
    $nav_index = $bp->groups->current_group->slug . '_manage';
    // Check if current group has Manage tabs.
    if (empty($bp->bp_options_nav[$nav_index])) {
        return;
    }
    // Build the Group Admin menus.
    foreach ($bp->bp_options_nav[$nav_index] as $menu) {
        /**
         * Should we add the current manage link in the Group's "Edit" Admin Bar menu ?
         *
         * All core items will be added, plugins can use a new parameter in the BP Group Extension API
         * to also add the link to the "edit screen" of their group component. To do so, set the
         * the 'show_in_admin_bar' argument of your edit screen to true
         */
        if ($menu['show_in_admin_bar']) {
            $title = sprintf(_x('Edit Group %s', 'Group WP Admin Bar manage links', 'buddypress'), $menu['name']);
            // Title is specific for delete.
            if ('delete-group' == $menu['slug']) {
                $title = sprintf(_x('%s Group', 'Group WP Admin Bar delete link', 'buddypress'), $menu['name']);
            }
            $wp_admin_bar->add_menu(array('parent' => $bp->group_admin_menu_id, 'id' => $menu['slug'], 'title' => $title, 'href' => bp_get_groups_action_link('admin/' . $menu['slug'])));
        }
    }
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:51,代码来源:bp-groups-adminbar.php

示例5: show_front_page

 /**
  * Should we show the group's custom front page ?
  */
 private function show_front_page()
 {
     $retval = false;
     if (bp_is_group_create()) {
         return $retval;
     }
     if (!bp_is_group()) {
         return $retval;
     }
     $group_id = bp_get_current_group_id();
     if (empty($group_id)) {
         return $retval;
     }
     if (bp_is_item_admin()) {
         return $retval;
     }
     if (!groups_is_user_member(bp_loggedin_user_id(), $group_id) && $this->has_front_page($group_id)) {
         $retval = true;
     }
     return $retval;
 }
开发者ID:nightbook,项目名称:altctrl-public-group,代码行数:24,代码来源:alt-public-group-ctrl.php

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

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

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

示例9: do_trail_items

 /**
  * Runs through the various buddyPress conditional tags to check the current page being viewed.  Once
  * a condition is met, add items to the $items array.
  *
  * @since  0.6.0
  * @access public
  * @return void
  */
 public function do_trail_items()
 {
     global $bp;
     /* Add the network and site home links. */
     $this->do_network_home_link();
     $this->do_site_home_link();
     $trail_end = '';
     if (!empty($bp->displayed_user->fullname)) {
         // looking at a user or self
         $this->items[] = '<a href="' . bp_get_members_directory_permalink() . '">' . get_the_title($bp->pages->members->id) . '</a>';
         $this->items[] = '<a href="' . $bp->displayed_user->domain . '" title="' . strip_tags($bp->displayed_user->userdata->display_name) . '">' . strip_tags($bp->displayed_user->userdata->display_name) . '</a>';
     } else {
         if ($bp->is_single_item) {
             // we're on a single item page
             $this->items[] = '<a href="' . get_permalink($bp->pages->{$bp->current_component}->id) . '" title="' . esc_attr(strip_tags(get_the_title($bp->pages->{$bp->current_component}->id))) . '">' . get_the_title($bp->pages->{$bp->current_component}->id) . '</a>';
             $this->items[] = '<a href="' . get_permalink() . '" title="' . esc_attr($bp->bp_options_title) . '">' . $bp->bp_options_title . '</a>';
         } else {
             if ($bp->is_directory) {
                 // this is a top level directory page
                 $trail_end = get_the_title($bp->pages->{$bp->current_component}->id);
             } else {
                 if (bp_is_register_page()) {
                     $trail_end = __('Create an Account', 'buddypress');
                 } else {
                     if (bp_is_activation_page()) {
                         $trail_end = __('Activate your Account', 'buddypress');
                     } else {
                         if (bp_is_group_create()) {
                             $this->items[] = '<a href="' . get_permalink($bp->pages->groups->id) . '" title="' . esc_attr(get_the_title($bp->pages->groups->id)) . '">' . get_the_title($bp->pages->groups->id) . '</a>';
                             $trail_end = __('Create a Group', 'buddypress');
                         } else {
                             if (bp_is_create_blog()) {
                                 $this->items[] = '<a href="' . home_url() . '/' . $bp->current_component . '" title="' . ucwords($bp->current_component) . '">' . ucwords($bp->current_component) . '</a>';
                                 $trail_end = __('Create a Blog', 'buddypress');
                             }
                         }
                     }
                 }
             }
         }
     }
     if ($trail_end) {
         $this->items[] = $trail_end;
     }
     /* Return the bbPress breadcrumb trail items. */
     $this->items = apply_filters('breadcrumb_trail_get_buddypress_items', $this->items, $this->args);
 }
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:55,代码来源:function-breadcrumb.php

示例10: bp_groupblog_signup_blog

/**
 * bp_groupblog_signup_blog($blogname = '', $blog_title = '', $errors = '')
 *
 * This function is called from the template and initiates the blog creation.
 */
function bp_groupblog_signup_blog($blogname = '', $blog_title = '', $errors = '')
{
    global $current_user, $current_site, $groupblog_create_screen;
    global $bp, $filtered_results;
    if (!is_wp_error($errors)) {
        $errors = new WP_Error();
    }
    // allow definition of default variables
    $filtered_results = apply_filters('signup_blog_init', array('blogname' => $blogname, 'blog_title' => $blog_title, 'errors' => $errors));
    $blogname = $filtered_results['blogname'];
    $blog_title = $filtered_results['blog_title'];
    $errors = $filtered_results['errors'];
    if (!isset($groupblog_create_screen)) {
        $groupblog_create_screen = false;
    }
    // Get the group id, which is fetched differently depending on whether this is a group
    // Create or Edit screen
    $group_id = bp_is_group_create() ? bp_get_new_group_id() : bp_get_current_group_id();
    $disabled = !bp_groupblog_silent_add($group_id) || !bp_groupblog_is_blog_enabled($group_id) ? ' disabled="true" ' : '';
    if (!$groupblog_create_screen) {
        ?>
	<h2><?php 
        _e('Group Blog', 'groupblog');
        ?>
</h2>

	<form id="setupform" method="post" action="<?php 
        bp_groupblog_admin_form_action('group-blog');
        ?>
">
		<input type="hidden" name="stage" value="gimmeanotherblog" />
		<?php 
        do_action("signup_hidden_fields");
        ?>
	<?php 
    }
    ?>

		<div class="checkbox">
			<label><input type="checkbox" name="groupblog-enable-blog" id="groupblog-enable-blog" value="1"<?php 
    bp_groupblog_show_enabled($group_id);
    ?>
/> <?php 
    _e('Enable group blog', 'groupblog');
    ?>
</label>
		</div>

		<?php 
    bp_groupblog_show_blog_form($blogname, $blog_title, $errors);
    ?>

		<br />

		<div id="groupblog-member-options">

			<h3><?php 
    _e('Member Options', 'groupblog');
    ?>
</h3>

			<p><?php 
    _e('Enable blog posting to allow adding of group members to the blog with the roles set below.', 'groupblog');
    ?>
<br /><?php 
    _e('When disabled, all members will temporarily be set to subscribers, disabling posting.', 'groupblog');
    ?>
</p>

			<div class="checkbox">
				<label><input<?php 
    if (!bp_groupblog_is_blog_enabled($group_id)) {
        ?>
 disabled="true"<?php 
    }
    ?>
 type="checkbox" name="groupblog-silent-add" id="groupblog-silent-add" value="1"<?php 
    if (bp_groupblog_silent_add($group_id)) {
        ?>
 checked="checked"<?php 
    }
    ?>
/> <?php 
    _e('Enable member blog posting', 'groupblog');
    ?>
</label>
			</div>

			<?php 
    // Assign our default roles to variables.
    // If nothing has been saved in the groupmeta yet, then we assign our own defalt values.
    if (!($groupblog_default_admin_role = groups_get_groupmeta($bp->groups->current_group->id, 'groupblog_default_admin_role'))) {
        $groupblog_default_admin_role = $bp->groupblog->default_admin_role;
    }
    if (!($groupblog_default_mod_role = groups_get_groupmeta($bp->groups->current_group->id, 'groupblog_default_mod_role'))) {
//.........这里部分代码省略.........
开发者ID:adisonc,项目名称:MaineLearning,代码行数:101,代码来源:bp-groupblog.php

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

示例12: invite_anyone_create_screen_content


//.........这里部分代码省略.........
				<?php 
                }
                ?>



					<input type="hidden" name="group_id" id="group_id" value="<?php 
                bp_group_id();
                ?>
" />
				<?php 
                if ($event != 'create') {
                    ?>
					</form>
				<?php 
                }
                ?>


			<?php 
                do_action('bp_before_group_send_invites_content');
                ?>
	<?php 
            }
        }
    } else {
        // Begin BP 1.2 code
        ?>
	<?php 
        do_action('bp_before_group_send_invites_content');
        ?>

	<?php 
        if (invite_anyone_access_test() && !bp_is_group_create()) {
            ?>
		<p><?php 
            _e('Want to invite someone to the group who is not yet a member of the site?', 'bp-invite-anyone');
            ?>
 <a href="<?php 
            echo bp_loggedin_user_domain() . BP_INVITE_ANYONE_SLUG . '/invite-new-members/group-invites/' . bp_get_group_id();
            ?>
"><?php 
            _e('Send invitations by email.', 'bp-invite-anyone');
            ?>
</a></p>
	<?php 
        }
        ?>

	<?php 
        if ($event != 'create') {
            ?>
			<form action="send" method="post" id="send-invite-form">
	<?php 
        }
        ?>



		<div class="left-menu">
					<p><?php 
        _e("Search for members to invite:", 'bp-invite-anyone');
        ?>
 &nbsp; <span class="ajax-loader"></span></p>

					<ul class="first acfb-holder">
开发者ID:hnla,项目名称:invite-anyone,代码行数:67,代码来源:group-invites.php

示例13: submit_guild

 function submit_guild(&$group)
 {
     // If the user is allowed to delete posts, then they can also create guilds and bypass validation requirements
     if (!bp_is_group_create() || current_user_can('delete_others_posts')) {
         return;
     }
     // Get the BP object
     global $bp;
     // Retrieve and sanitize submission data
     $group->server = $_POST['group-server'];
     $group->interests = implode(',', $_POST['group-interests']);
     $group->faction = $_POST['group-faction'];
     $group->website = esc_url($_POST['group-website']);
     $group->style = $_POST['group-style'];
     // Validate submitted data
     if ('' === $group->server) {
         $error = 'Please select your guild&apos;s platform and server.';
     } elseif (empty($group->interests)) {
         $error = 'Please select your guild&apos;s primary interests.';
     } elseif (empty($group->faction)) {
         $error = 'Please select your guild&apos;s primary alliance.';
     }
     // Assign the current group to the group object
     $bp->groups->current_group = $group;
     // If there was an error, display it and redirect
     if (isset($error)) {
         bp_core_add_message($error, 'error');
         bp_core_redirect(bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/');
     } else {
         // Get the current user
         $user = new WP_User(get_current_user_id());
         $username = $user->display_name;
         $user_email = $user->user_email;
         $profile = bp_core_get_userlink($user->ID);
         // Set email headers
         $emailto = 'admin@tamrielfoundry.com';
         $subject = 'Guild Creation Request From ' . $username;
         $headers[] = "From: {$username} <{$user_email}>\r\n";
         $headers[] = "Content-Type: text/html; charset=UTF-8";
         // User Information
         $body = "<h3>Submitting User</h3>";
         $body .= "<ul>";
         $body .= '<li>Guild Leader: ' . $profile . '</li>';
         $body .= '<li>Email: ' . $user_email . '</li>';
         $body .= "</ul>";
         // Guild Information
         $body .= "<h3>Guild Information</h3>";
         $body .= "<ul>";
         $body .= '<li>Guild Name: ' . $group->name . '</li>';
         $body .= '<li>Website: ' . $group->website . '</li>';
         $body .= '<li>Server: ' . $group->server . '</li>';
         $body .= '<li>Faction: ' . $group->faction . '</li>';
         $body .= '<li>Interests: ' . $group->interests . '</li>';
         $body .= '<li>Style: ' . $group->style . '</li>';
         $body .= "</ul>";
         // Guild Description
         $body .= "<h3>Guild Description</h3>";
         $body .= '<div>' . stripslashes($group->description) . '</div>';
         // Send the mail!
         wp_mail($emailto, $subject, $body, $headers);
         // Redirect
         bp_core_add_message('Thank you for submitting your guild, ' . $user->fullname . '. Your request was successfully sent. We will review it and respond as soon as possible. If your request is approved, you will be added to your group, and promoted to guild leader. We will contact you via email regarding your guild request once it has been processed. Thank you for contributing to Tamriel Foundry!');
         bp_core_redirect(SITEURL . '/' . bp_get_groups_root_slug());
     }
 }
开发者ID:tamriel-foundry,项目名称:apoc2,代码行数:65,代码来源:buddypress.php

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

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


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