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


PHP bp_is_group_forum函数代码示例

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


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

示例1: bphelp_pbpp_redirect

function bphelp_pbpp_redirect()
{
    global $bp;
    //IMPORTANT: Do not alter the following line.
    $bphelp_my_redirect_slug = get_option('bphelp-my-redirect-slug', 'register');
    if (bp_is_activity_component() || bp_is_groups_component() || bp_is_group_forum() || bbp_is_single_forum() || bbp_is_single_topic() || bp_is_forums_component() || bp_is_blogs_component() || bp_is_members_component() || bp_is_profile_component()) {
        if (!is_user_logged_in()) {
            bp_core_redirect(get_option('home') . '/' . $bphelp_my_redirect_slug);
        }
    }
}
开发者ID:pausaura,项目名称:agora_nodes,代码行数:11,代码来源:private-bp-pages.php

示例2: logged_out_redirect

function logged_out_redirect()
{
    global $bp;
    // BuddyPress components to lock
    if (bp_is_activity_component() || bp_is_groups_component() || bp_is_group_forum() || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page(BP_MEMBERS_SLUG) || bp_is_profile_component()) {
        // Check if user is logged out
        if (!is_user_logged_in()) {
            // Check if a page was selected for redirection
            if (of_get_option('redirect')) {
                $redirect_page = get_permalink(of_get_option('redirect'));
                // If not redirect to login page
            } else {
                $redirect_page = site_url('/wp-login.php');
            }
            wp_redirect($redirect_page);
            exit;
        }
    }
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:19,代码来源:private-bp.php

示例3: bp_get_group_new_topic_button

/**
 * Returns a 'New Topic' button for a group.
 *
 * @since 1.2.7
 *
 * @param BP_Groups_Group|bool $group The BP Groups_Group object if
 *                                    passed, boolean false if not passed.
 * @return string HTML code for the button.
 */
function bp_get_group_new_topic_button($group = false)
{
    global $groups_template;
    if (empty($group)) {
        $group =& $groups_template->group;
    }
    if (!is_user_logged_in() || bp_group_is_user_banned() || !bp_is_group_forum() || bp_is_group_forum_topic()) {
        return false;
    }
    $button = array('id' => 'new_topic', 'component' => 'groups', 'must_be_logged_in' => true, 'block_self' => true, 'wrapper_class' => 'group-button', 'link_href' => '#post-new', 'link_class' => 'group-button show-hide-new', 'link_id' => 'new-topic-button', 'link_text' => __('New Topic', 'buddypress'), 'link_title' => __('New Topic', 'buddypress'));
    /**
     * Filters the HTML button for creating a new topic in a group.
     *
     * @since 1.5.0
     * @since 2.5.0 Added the `$group` parameter.
     *
     * @param string $button HTML button for a new topic.
     * @param object $group  Group object.
     */
    return bp_get_button(apply_filters('bp_get_group_new_topic_button', $button, $group));
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:30,代码来源:bp-groups-template.php

示例4: set_title

 function set_title($default, $sep = "|")
 {
     global $wp_query;
     global $rtmedia_seo_title;
     if (!array_key_exists(RTMEDIA_MEDIA_SLUG, $wp_query->query_vars)) {
         return $default;
     }
     $title = "";
     $oldSep = " " . $sep . " ";
     $sep = "";
     global $bp;
     global $rtmedia_query;
     if (isset($rtmedia_query->query) && isset($rtmedia_query->query["media_type"])) {
         if ($rtmedia_query->query["media_type"] == "album") {
             if (isset($rtmedia_query->media_query) && isset($rtmedia_query->media_query["album_id"])) {
                 //print_r( $rtmedia_query ); die();
                 if (is_array($rtmedia_query->album) && count($rtmedia_query->album) > 0) {
                     foreach ($rtmedia_query->album as $single_album) {
                         if (intval($single_album->id) == intval($rtmedia_query->media_query["album_id"])) {
                             $title .= $sep . stripslashes(esc_html(ucfirst($single_album->media_title)));
                             $sep = $oldSep;
                         }
                     }
                 }
             }
         } else {
             if (isset($rtmedia_query->media) && $rtmedia_query->media && count($rtmedia_query->media) > 0) {
                 $title .= $sep . stripslashes(esc_html(ucfirst($rtmedia_query->media[0]->media_title)));
                 $sep = $oldSep;
             }
             $title .= $sep . ucfirst($rtmedia_query->query["media_type"]);
             $sep = $oldSep;
         }
     } else {
         if (isset($rtmedia_query->action_query) && isset($rtmedia_query->action_query->media_type)) {
             $title .= $sep . ucfirst($rtmedia_query->action_query->media_type);
             $sep = $oldSep;
         }
     }
     if (function_exists("bp_is_group")) {
         if (bp_is_group() or bp_is_group_forum() or bp_is_group_forum_topic()) {
             if (bp_is_group_forum_topic()) {
                 $title .= $sep . bp_get_the_topic_title();
                 $sep = $oldSep;
             }
             $title .= $sep . bp_get_current_group_name();
             $sep = $oldSep;
         }
     }
     if (function_exists("bp_get_displayed_user_fullname") && bp_displayed_user_id() != 0) {
         $title .= $sep . bp_get_displayed_user_fullname();
         $sep = $oldSep;
     } else {
         $user_info = get_userdata(get_current_user_id());
         if (isset($user_info->data->display_name)) {
             $title .= $sep . $user_info->data->display_name;
             $sep = $oldSep;
         }
     }
     $title .= $sep . RTMEDIA_MEDIA_LABEL;
     $sep = $oldSep;
     if (isset($this->context->type)) {
         switch ($this->context->type) {
             case 'group':
                 $title .= $sep . ucfirst($bp->groups->slug);
                 break;
             case 'profile':
                 if (class_exists('BuddyPress')) {
                     $title .= $sep . ucfirst($bp->profile->slug);
                 } else {
                     $title .= $sep . get_query_var('author_name');
                 }
                 break;
             default:
                 $title .= $sep . get_post_field('post_title', $this->context->id);
                 break;
         }
     }
     $title .= $sep . get_bloginfo('name');
     $rtmedia_seo_title = $title;
     return apply_filters("rtmedia_wp_title", $title, $default, $sep);
 }
开发者ID:fs-contributor,项目名称:rtMedia,代码行数:82,代码来源:RTMediaInteraction.php

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

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

	function bp_get_the_body_class( $wp_classes, $custom_classes = false ) {
		global $bp;

		if ( bp_is_front_page() )
			$bp_classes[] = 'home-page';

		if ( bp_is_directory() )
			$bp_classes[] = 'directory';

		if ( bp_is_user_profile() && !bp_is_blog_page() )
			$bp_classes[] = 'profile';

		if ( bp_is_activity_component() && !bp_is_blog_page() || ( bp_is_activity_front_page() && bp_is_front_page() ) )
			$bp_classes[] = 'activity';

		if ( bp_is_blogs_component() && !bp_is_blog_page()  )
			$bp_classes[] = 'blogs';

		if ( bp_is_messages_component() && !bp_is_blog_page()  )
			$bp_classes[] = 'messages';

		if ( bp_is_friends_component() && !bp_is_blog_page()  )
			$bp_classes[] = 'friends';

		if ( bp_is_groups_component() && !bp_is_blog_page()  )
			$bp_classes[] = 'groups';

		if ( bp_is_settings_component() && !bp_is_blog_page()  )
			$bp_classes[] = 'settings';

		if ( bp_is_single_item() )
			$bp_classes[] = 'single-item';

		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_friend_requests() )
			$bp_classes[] = 'friend-requests';

		if ( bp_is_user_friends() )
			$bp_classes[] = 'my-friends';

		if ( bp_is_create_blog() )
			$bp_classes[] = 'create-blog';

		if ( bp_is_user_recent_commments() )
			$bp_classes[] = 'recent-comments';

		if ( bp_is_user_recent_posts() )
			$bp_classes[] = 'recent-posts';

		if ( bp_is_user_blogs() && !bp_is_directory() )
			$bp_classes[] = 'my-blogs';

		if ( bp_is_user_groups() && !bp_is_directory() )
			$bp_classes[] = 'my-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_change_avatar() )
			$bp_classes[] = 'change-avatar';

		if ( bp_is_profile_edit() )
			$bp_classes[] = 'profile-edit';

		if ( bp_is_user_friends_activity() )
//.........这里部分代码省略.........
开发者ID:n-sane,项目名称:zaroka,代码行数:101,代码来源:bp-core-templatetags.php

示例8: bp_get_template_part

     // Not looking at home
 } else {
     // Group Admin
     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');
开发者ID:toby-bushell,项目名称:triumph,代码行数:31,代码来源:home.php

示例9: bp_get_group_new_topic_button

/**
 * Returns a 'New Topic' button for a group.
 *
 * @since BuddyPress (1.2.7)
 *
 * @param BP_Groups_Group|bool $group The BP Groups_Group object if passed, boolean false if not passed.
 * @uses is_user_logged_in() Is there a user logged in?
 * @uses bp_group_is_user_banned() Is the current user banned from the current group?
 * @uses bp_is_group_forum() Are we on a group forum page?
 * @uses bp_is_group_forum_topic() Are we on a group topic page?
 * @uses bp_get_button() Renders a button
 * @return string HTML code for the button
 */
function bp_get_group_new_topic_button($group = false)
{
    global $groups_template;
    if (empty($group)) {
        $group =& $groups_template->group;
    }
    if (!is_user_logged_in() || bp_group_is_user_banned() || !bp_is_group_forum() || bp_is_group_forum_topic()) {
        return false;
    }
    $button = array('id' => 'new_topic', 'component' => 'groups', 'must_be_logged_in' => true, 'block_self' => true, 'wrapper_class' => 'group-button', 'link_href' => '#post-new', 'link_class' => 'group-button show-hide-new', 'link_id' => 'new-topic-button', 'link_text' => __('New Topic', 'buddypress'), 'link_title' => __('New Topic', 'buddypress'));
    // Filter and return the HTML button
    return bp_get_button(apply_filters('bp_get_group_new_topic_button', $button));
}
开发者ID:kd5ytx,项目名称:Empirical-Wordpress,代码行数:26,代码来源:bp-groups-template.php

示例10: while

		<tbody>

			<?php while ( bp_forum_topics() ) : bp_the_forum_topic(); ?>

			<tr class="<?php bp_the_topic_css_class() ?>">
				<td class="td-title">
					<a class="topic-title" href="<?php bp_the_topic_permalink() ?>" title="<?php bp_the_topic_title() ?> - <?php _e( 'Permalink', 'buddypress' ) ?>">
						<?php bp_the_topic_title() ?>
					</a>
				</td>
				<td class="td-poster">
					<a href="<?php bp_the_topic_permalink() ?>"><?php bp_the_topic_last_poster_avatar( 'type=thumb&width=20&height=20' ) ?></a>
					<div class="poster-name"><?php bp_the_topic_last_poster_name() ?></div>
				</td>

				<?php if ( !bp_is_group_forum() ) : ?>
					<td class="td-group">
						<a href="<?php bp_the_topic_object_permalink() ?>"><?php bp_the_topic_object_avatar( 'type=thumb&width=20&height=20' ) ?></a>
						<div class="object-name"><a href="<?php bp_the_topic_object_permalink() ?>" title="<?php bp_the_topic_object_name() ?>"><?php bp_the_topic_object_name() ?></a></div>
					</td>
				<?php endif; ?>

				<td class="td-postcount">
					<?php bp_the_topic_total_posts() ?>
				</td>
				<td class="td-freshness">
					<?php bp_the_topic_time_since_last_post() ?>
				</td>

				<?php do_action( 'bp_directory_forums_extra_cell' ) ?>
			</tr>
开发者ID:n-sane,项目名称:zaroka,代码行数:31,代码来源:forums-loop.php

示例11: ray_get_the_author_display_name

/**
 * Used in the bbPress plugin
 *
 * @since 0.6
 */
function ray_get_the_author_display_name($name, $user_id)
{
    // test to see if we're on a BP group forum page or on any bbPress page
    if (bp_is_group_forum() || function_exists('bbpress') && is_bbpress()) {
        // cache username queries with static variable
        //
        // tried stuffing in $bp global but didn't work properly
        // probably due to object buffering in bbP
        static $bp_uso_data = array();
        $name = false;
        // try to get locally-cached value first
        if (!empty($bp_uso_data[$user_id])) {
            $name = $bp_uso_data[$user_id];
        }
        // no cached value, so query for it
        if ($name === false) {
            $field = bp_is_username_compatibility_mode() ? 'user_login' : 'user_nicename';
            $name = get_the_author_meta($field, $user_id);
            // cache it for later use in the loop
            $bp_uso_data[$user_id] = $name;
        }
    }
    return $name;
}
开发者ID:r-a-y,项目名称:buddypress-usernames-only,代码行数:29,代码来源:bp-usernames-only.php

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

示例13: site_layout

 function site_layout($layout)
 {
     global $bp;
     if (!$this->is_blog_page() && (bp_is_group_forum() || isset($bp->component) && $bp->component == 'forum')) {
         $forum_layout = $this->get_option('forum_layout');
         if (!empty($forum_layout)) {
             return $forum_layout;
         }
     }
     return $layout;
 }
开发者ID:hscale,项目名称:webento,代码行数:11,代码来源:class.front.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: 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_forum函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。