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


PHP bp_is_user_activity函数代码示例

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


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

示例1: bp_follow_add_activity_scope_filter

/**
 * Filter the activity loop when we're on a "Following" page
 *
 * This is done:
 *   - On the activity directory and clicking on the "Following" tab
 *   - On a user's "Activity > Following" page
 *
 * @since 1.0.0
 *
 * @param string|array Current activity querystring
 * @param string $object The current object or component
 * @return array
 */
function bp_follow_add_activity_scope_filter($qs, $object)
{
    global $bp;
    // not on the activity object? stop now!
    if ($object != 'activity') {
        return $qs;
    }
    $set = false;
    // activity directory
    // can't use bp_is_activity_directory() yet since that's a BP 2.0 function
    if (!bp_displayed_user_id() && bp_is_activity_component() && !bp_current_action()) {
        // check if activity scope is following before manipulating
        if (isset($_COOKIE['bp-activity-scope']) && 'following' === $_COOKIE['bp-activity-scope']) {
            $set = true;
        }
        // user's activity following page
    } elseif (bp_is_user_activity() && bp_is_current_action('following')) {
        $set = true;
    }
    // not on a user page? stop now!
    if (!$set) {
        return $qs;
    }
    // set internal marker noting that our activity scope is applied
    $bp->follow->activity_scope_set = 1;
    $qs = wp_parse_args($qs);
    $following_ids = bp_get_following_ids(array('user_id' => bp_displayed_user_id() ? bp_displayed_user_id() : bp_loggedin_user_id()));
    // if $following_ids is empty, pass a negative number so no activity can be found
    $following_ids = empty($following_ids) ? -1 : $following_ids;
    $qs['user_id'] = $following_ids;
    return apply_filters('bp_follow_add_activity_scope_filter', $qs, false);
}
开发者ID:wesavetheworld,项目名称:buddypress-followers,代码行数:45,代码来源:activity-scope.php

示例2: training_wpo_buddypress_init

 function training_wpo_buddypress_init()
 {
     if (bp_is_user_activity()) {
         remove_action('wpo_layout_breadcrumbs_buddy_render', 'training_wpo_layout_breadcrumbs_buddypress');
         add_action('wpo_layout_breadcrumbs_buddy_render', 'training_wpo_buddypress_user_header');
     }
     if (bp_is_group()) {
         remove_action('wpo_layout_breadcrumbs_buddy_render', 'training_wpo_layout_breadcrumbs_buddypress');
         add_action('wpo_layout_breadcrumbs_buddy_render', 'training_wpo_buddypress_group_header');
     }
 }
开发者ID:morganloehr,项目名称:chris-verna,代码行数:11,代码来源:function.php

示例3: printf

                ?>
						
						<?php 
                printf(__("What's new in %s, %s?", 'buddypress'), bp_get_group_name(), bp_get_user_firstname());
                ?>
					
					<?php 
            } elseif (bp_is_page(BP_ACTIVITY_SLUG) || bp_is_my_profile() && bp_is_user_activity()) {
                ?>
					
						<?php 
                printf(__("What's new, %s?", 'buddypress'), bp_get_user_firstname());
                ?>
					
					<?php 
            } elseif (!bp_is_my_profile() && bp_is_user_activity()) {
                ?>
								
						<?php 
                printf(__("Write something to %s?", 'buddypress'), bp_get_displayed_user_fullname());
                ?>
											
					<?php 
            } else {
                ?>
						
						<?php 
                printf(__("Add a photo, %s", 'buddypress'), bp_get_user_firstname());
                ?>
						
					<?php 
开发者ID:par-orillonsoft,项目名称:Wishmagnet,代码行数:31,代码来源:post-form.php

示例4: dropdown_filters

 /**
  * Fake post type activities in order to add custom options
  * to BuddyPress activity dropdowns
  *
  * Make sure the Groups/blogs activity actions appears as one component > IdeaStream
  * in the Activity Administration screen.
  *
  * @package WP Idea Stream
  * @subpackage buddypress/activity
  *
  * @since 2.1.0
  *
  * @uses    buddypress() to get BuddyPress main instance
  * @return  array        new tracking args
  */
 public function dropdown_filters($tracking_args)
 {
     if (!isset($tracking_args['new_' . $this->post_type])) {
         return;
     }
     if (is_admin() && function_exists('get_current_screen')) {
         $current_screen = get_current_screen();
         if (!empty($current_screen->id) && strpos('toplevel_page_bp-activity', $current_screen->id) !== false) {
             $component = buddypress()->ideastream->id;
         }
     }
     if (empty($component) && !bp_is_activity_directory() && !bp_is_user_activity() && !bp_is_group_home()) {
         return $tracking_args;
     }
     $position = 50;
     foreach ($this->activity_actions as $key_action => $action) {
         if ('new_' . $this->post_type == $key_action) {
             if (!empty($component)) {
                 $tracking_args[$key_action]->component_id = $component;
             }
             continue;
         }
         $position += 1;
         $tracking_args[$key_action] = new stdClass();
         $tracking_args[$key_action]->component_id = !empty($component) ? $component : $action->component;
         $tracking_args[$key_action]->action_id = $action->type;
         $tracking_args[$key_action]->admin_filter = $action->admin_caption;
         $tracking_args[$key_action]->front_filter = $action->front_caption;
         $tracking_args[$key_action]->contexts = $action->contexts;
         $tracking_args[$key_action]->activity_comment = false;
         $tracking_args[$key_action]->format_callback = $action->action_callback;
         $tracking_args[$key_action]->position = $position;
     }
     /**
      * Used internally to disallow activity dropdowns on groups not supporting ideastream
      */
     return apply_filters('wp_idea_stream_buddypress_activity_filters', $tracking_args);
 }
开发者ID:BoweFrankema,项目名称:wp-idea-stream,代码行数:53,代码来源:activity.php

示例5: thatcamp_filter_title

/**
 * Fixes directory titles
 */
function thatcamp_filter_title($full_title, $title, $sep, $sep_location)
{
    if (bp_is_groups_component() && bp_is_directory()) {
        return 'THATCamp Directory | THATCamp';
    } else {
        if (bp_is_members_component() && bp_is_directory()) {
            return 'People Directory | THATCamp';
        } else {
            if (bp_is_activity_component() && bp_is_directory()) {
                return 'THATCamp Activity | THATCamp';
            } else {
                if (bp_is_register_page()) {
                    return 'Sign up for an account | THATCamp';
                } else {
                    if (bp_displayed_user_id()) {
                        if (bp_is_user_profile()) {
                            return str_replace('Extended Profiles', 'Profile', $title);
                        } else {
                            if (bp_is_user_activity()) {
                                $atype = thatcamp_activity_type();
                                switch ($atype) {
                                    case 'blog_posts':
                                        $tag = 'Blog Posts';
                                        break;
                                    case 'blog_comments':
                                        $tag = 'Blog Comments';
                                        break;
                                    case 'forums':
                                        $tag = 'Forum Posts';
                                        break;
                                    default:
                                        return str_replace(' Streams', '', $title);
                                        break;
                                }
                                return str_replace(' Streams', '', $full_title) . ' ' . $tag;
                            } else {
                                return $title;
                            }
                        }
                    } else {
                        return $full_title;
                    }
                }
            }
        }
    }
}
开发者ID:kosir,项目名称:thatcamp-org,代码行数:50,代码来源:functions.php

示例6: do_action

do_action('bp_member_options_nav');
?>

                  </ul>
              </div>
          </div>
          <!-- #item-nav -->
      </div>


      <div id="item-body" role="main" class="col-sm-12">


          <?php 
do_action('bp_before_member_body');
if (bp_is_user_activity() || !bp_current_component()) {
    bp_get_template_part('members/single/activity');
} elseif (bp_is_user_blogs()) {
    bp_get_template_part('members/single/blogs');
} elseif (bp_is_user_friends()) {
    bp_get_template_part('members/single/friends');
} elseif (bp_is_user_groups()) {
    bp_get_template_part('members/single/groups');
} elseif (bp_is_user_messages()) {
    bp_get_template_part('members/single/messages');
} elseif (bp_is_user_profile()) {
    bp_get_template_part('members/single/profile');
} elseif (bp_is_user_forums()) {
    bp_get_template_part('members/single/forums');
} elseif (bp_is_user_notifications()) {
    bp_get_template_part('members/single/notifications');
开发者ID:quyip8818,项目名称:wps,代码行数:31,代码来源:home.php

示例7: do_action

			</ul>
		</div>
	</div><!-- #item-nav -->

	<div id="item-body">

		<?php 
/**
 * Fires before the display of member body content.
 *
 * @since 1.2.0
 */
do_action('bp_before_member_body');
if (bp_is_user_front()) {
    bp_displayed_user_front_template_part();
} elseif (bp_is_user_activity()) {
    bp_get_template_part('members/single/activity');
} elseif (bp_is_user_blogs()) {
    bp_get_template_part('members/single/blogs');
} elseif (bp_is_user_friends()) {
    bp_get_template_part('members/single/friends');
} elseif (bp_is_user_groups()) {
    bp_get_template_part('members/single/groups');
} elseif (bp_is_user_messages()) {
    bp_get_template_part('members/single/messages');
} elseif (bp_is_user_profile()) {
    bp_get_template_part('members/single/profile');
} elseif (bp_is_user_forums()) {
    bp_get_template_part('members/single/forums');
} elseif (bp_is_user_notifications()) {
    bp_get_template_part('members/single/notifications');
开发者ID:CompositeUK,项目名称:clone.BuddyPress,代码行数:31,代码来源:home.php

示例8: bp_get_the_body_class

function bp_get_the_body_class($nxt_classes, $custom_classes = false)
{
    $bp_classes = array();
    /** Pages *************************************************************/
    if (is_front_page()) {
        $bp_classes[] = 'home-page';
    }
    if (bp_is_directory()) {
        $bp_classes[] = 'directory';
    }
    if (bp_is_single_item()) {
        $bp_classes[] = 'single-item';
    }
    /** Components ********************************************************/
    if (!bp_is_blog_page()) {
        if (bp_is_user_profile()) {
            $bp_classes[] = 'xprofile';
        }
        if (bp_is_activity_component()) {
            $bp_classes[] = 'activity';
        }
        if (bp_is_blogs_component()) {
            $bp_classes[] = 'blogs';
        }
        if (bp_is_messages_component()) {
            $bp_classes[] = 'messages';
        }
        if (bp_is_friends_component()) {
            $bp_classes[] = 'friends';
        }
        if (bp_is_groups_component()) {
            $bp_classes[] = 'groups';
        }
        if (bp_is_settings_component()) {
            $bp_classes[] = 'settings';
        }
    }
    /** User **************************************************************/
    if (!bp_is_directory()) {
        if (bp_is_user_blogs()) {
            $bp_classes[] = 'my-blogs';
        }
        if (bp_is_user_groups()) {
            $bp_classes[] = 'my-groups';
        }
        if (bp_is_user_activity()) {
            $bp_classes[] = 'my-activity';
        }
    }
    if (bp_is_my_profile()) {
        $bp_classes[] = 'my-account';
    }
    if (bp_is_user_profile()) {
        $bp_classes[] = 'my-profile';
    }
    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';
    }
    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';
//.........这里部分代码省略.........
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:101,代码来源:bp-core-template.php

示例9: rss_handler

 /**
  * RSS handler for a user's followed sites.
  *
  * When a user lands on /members/USERNAME/activity/followblogs/feed/, this
  * method generates the RSS feed for their followed sites.
  */
 public function rss_handler()
 {
     // only available in BP 1.8+
     if (!class_exists('BP_Activity_Feed')) {
         return;
     }
     if (!bp_is_user_activity() || !bp_is_current_action(constant('BP_FOLLOW_ACTIVITY_USER_ACTIVITY_SLUG')) || !bp_is_action_variable('feed', 0)) {
         return;
     }
     $args = array('user_id' => bp_displayed_user_id(), 'scope' => 'follow');
     // setup the feed
     buddypress()->activity->feed = new BP_Activity_Feed(array('id' => 'followedactivity', 'title' => sprintf(__('%1$s | %2$s | Followed Activity', 'bp-follow'), bp_get_site_name(), bp_get_displayed_user_fullname()), 'link' => esc_url(trailingslashit(bp_displayed_user_domain() . bp_get_activity_slug() . '/' . constant('BP_FOLLOW_ACTIVITY_USER_ACTIVITY_SLUG'))), 'description' => sprintf(__("Feed for activity that %s is following.", 'buddypress'), bp_get_displayed_user_fullname()), 'activity_args' => $args));
 }
开发者ID:wesavetheworld,项目名称:buddypress-followers,代码行数:19,代码来源:activity-module.php

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

示例11: buddyboss_body_class

/**
 * Extends the default WordPress body classes.
 *
 * @since Boss 1.0.0
 *
 * @param array Existing class values.
 * @return array Filtered class values.
 */
function buddyboss_body_class($classes)
{
    global $wp_customize;
    if (!empty($wp_customize)) {
        $classes[] = 'wp-customizer';
    }
    if (!is_multi_author()) {
        $classes[] = 'single-author';
    }
    if (current_user_can('manage_options')) {
        $classes[] = 'role-admin';
    }
    if (bp_is_user_activity() || bp_is_group_home() && bp_is_active('activity') || bp_is_group_activity() || bp_is_current_component('activity')) {
        $classes[] = 'has-activity';
    }
    return array_unique($classes);
}
开发者ID:tvolmari,项目名称:hammydowns,代码行数:25,代码来源:theme-functions.php

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

示例13: bp_get_the_body_class


//.........这里部分代码省略.........
			$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() )
			$bp_classes[] = 'friends-activity';

		if ( bp_is_user_activity() && !bp_is_directory() )
			$bp_classes[] = 'my-activity';

		if ( bp_is_activity_permalink() )
			$bp_classes[] = 'activity-permalink';

		if ( bp_is_register_page() )
			$bp_classes[] = 'registration';

		if ( bp_is_activation_page() )
			$bp_classes[] = 'activation';

		if ( is_user_logged_in() )
			$bp_classes[] = 'logged-in';

		/* Add the current_component, current_action into the bp classes */
		if ( !bp_is_blog_page() ) {
			if ( !empty( $bp->current_component ) )
				$bp_classes[] = $bp->current_component;

			if ( !empty( $bp->current_action ) )
				$bp_classes[] = $bp->current_action;
		}

		/* We don't want WordPress blog classes to appear on non-blog pages. */
		if ( !bp_is_blog_page() || is_home() ) {
			/* Preserve any custom classes already set */
			if ( !empty( $custom_classes ) )
				$wp_classes = (array) $custom_classes;
			else
				$wp_classes = array();
		}

		/* Merge WP classes with BP classes */
		$classes = array_merge( (array) $bp_classes, (array) $wp_classes );

		/* Remove any duplicates */
		$classes = array_unique( $classes );

		return apply_filters( 'bp_get_the_body_class', $classes, $bp_classes, $wp_classes, $custom_classes );
	}
开发者ID:n-sane,项目名称:zaroka,代码行数:101,代码来源:bp-core-templatetags.php

示例14: do_action

				<div id="item-buttons">
					<?php 
do_action('bp_member_header_actions');
?>
				</div>
				<?php 
do_action('bp_profile_header_meta');
?>
			</div>
		</div>


	<div id="subnav" class="item-list-tabs no-ajax" role="navigation">
			<ul>
<!--		<?php 
if (bp_is_user_activity() && !thatcamp_activity_type()) {
    ?>
		<li id="activity-filter-select" class="last">
			<label for="activity-filter-by"><?php 
    _e('Show:', 'thatcamp');
    ?>
</label>
			<select id="activity-filter-by">
				<option value="-1"><?php 
    _e('Everything', 'thatcamp');
    ?>
</option>

				<?php 
    if (!bp_is_current_action('groups')) {
        if (bp_is_active('blogs')) {
开发者ID:kosir,项目名称:thatcamp-org,代码行数:31,代码来源:sidebar-profile.php

示例15: test_member_activity_favourites

 function test_member_activity_favourites()
 {
     $this->go_to(bp_core_get_user_domain(bp_loggedin_user_id()) . bp_get_activity_slug() . '/favorites');
     $this->assertTrue(bp_is_user_activity());
 }
开发者ID:JeroenNouws,项目名称:BuddyPress,代码行数:5,代码来源:activity.php


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