本文整理汇总了PHP中bp_is_group_activity函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_is_group_activity函数的具体用法?PHP bp_is_group_activity怎么用?PHP bp_is_group_activity使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_is_group_activity函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bp_activity_do_heartbeat
/**
* Should we use Heartbeat to refresh activities?
*
* @since BuddyPress (2.0.0)
*
* @uses bp_is_activity_heartbeat_active() to check if heatbeat setting is on.
* @uses bp_is_activity_directory() to check if the current page is the activity
* directory.
* @uses bp_is_active() to check if the group component is active.
* @uses bp_is_group_activity() to check if on a single group, the current page
* is the group activities.
* @uses bp_is_group_home() to check if the current page is a single group home
* page.
*
* @return bool True if activity heartbeat is enabled, otherwise false.
*/
function bp_activity_do_heartbeat()
{
$retval = false;
if (!bp_is_activity_heartbeat_active()) {
return $retval;
}
if (bp_is_activity_directory()) {
$retval = true;
}
if (bp_is_active('groups')) {
// If no custom front, then activities are loaded in group's home
$has_custom_front = bp_locate_template(array('groups/single/front.php'), false, true);
if (bp_is_group_activity() || !$has_custom_front && bp_is_group_home()) {
$retval = true;
}
}
return $retval;
}
示例2: do_action
<?php
/**
* Fires after the display of the group status message.
*
* @since 1.1.0
*/
do_action('bp_after_group_status_message');
}
// 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 {
示例3: bp_activity_do_heartbeat
/**
* Should we use Heartbeat to refresh activities?
*
* @since 2.0.0
*
* @uses bp_is_activity_heartbeat_active() to check if heartbeat setting is on.
* @uses bp_is_activity_directory() to check if the current page is the activity
* directory.
* @uses bp_is_group_activity() to check if on a single group, the current page
* is the group activities.
*
* @return bool True if activity heartbeat is enabled, otherwise false.
*/
function bp_activity_do_heartbeat()
{
$retval = false;
if (!bp_is_activity_heartbeat_active()) {
return $retval;
}
if (bp_is_activity_directory() || bp_is_group_activity()) {
$retval = true;
}
return $retval;
}
示例4: bp_groups_maybe_load_mentions_scripts
/**
* Should BuddyPress load the mentions scripts and related assets, including results to prime the
* mentions suggestions?
*
* @param bool $load_mentions True to load mentions assets, false otherwise.
* @param bool $mentions_enabled True if mentions are enabled.
* @return bool True if mentions scripts should be loaded.
* @since BuddyPress (2.2.0)
*/
function bp_groups_maybe_load_mentions_scripts($load_mentions, $mentions_enabled)
{
if (!$mentions_enabled) {
return $load_mentions;
}
if ($load_mentions || (bp_is_group_activity() || bp_is_group_home())) {
return true;
}
return $load_mentions;
}
示例5: bp_activity_do_heartbeat
/**
* Should we use Heartbeat to refresh activities?
*
* @since 2.0.0
*
* @return bool True if activity heartbeat is enabled, otherwise false.
*/
function bp_activity_do_heartbeat()
{
$retval = false;
if (bp_is_activity_heartbeat_active() && (bp_is_activity_directory() || bp_is_group_activity())) {
$retval = true;
}
/**
* Filters whether the heartbeat feature in the activity stream should be active.
*
* @since 2.8.0
*
* @param bool $retval Whether or not activity heartbeat is active.
*/
return (bool) apply_filters('bp_activity_do_heartbeat', $retval);
}
示例6: miss_is_bp
/**
*
*/
function miss_is_bp()
{
if (function_exists('bp_is_group') && (bp_is_blog_page() || bp_is_my_profile() || bp_is_my_profile() || is_front_page() || bp_is_component_front_page('activity') || bp_is_directory() || bp_is_profile_component() || bp_is_activity_component() || bp_is_blogs_component() || bp_is_messages_component() || bp_is_friends_component() || bp_is_groups_component() || bp_is_settings_component() || bp_is_user_activity() || bp_is_user_friends_activity() || bp_is_activity_permalink() || bp_is_user_profile() || bp_is_profile_edit() || bp_is_change_avatar() || bp_is_user_groups() || bp_is_group() || bp_is_group_home() || bp_is_group_create() || bp_is_group_admin_page() || bp_is_group_forum() || bp_is_group_activity() || bp_is_group_forum_topic() || bp_is_group_forum_topic_edit() || bp_is_group_members() || bp_is_group_invites() || bp_is_group_membership_request() || bp_is_group_leave() || bp_is_group_single() || bp_is_user_blogs() || bp_is_user_recent_posts() || bp_is_user_recent_commments() || bp_is_create_blog() || bp_is_user_friends() || bp_is_friend_requests() || bp_is_user_messages() || bp_is_messages_inbox() || bp_is_messages_sentbox() || bp_is_notices() || bp_is_messages_compose_screen() || bp_is_activation_page() || bp_is_register_page())) {
return true;
}
return false;
}
示例7: 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 = " • ";
/*--------------------------------------------
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>';
//.........这里部分代码省略.........
示例8: 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);
}
示例9: 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()) {
//.........这里部分代码省略.........