<div id="sidebar" class="dir-sidebar"> <div class="padder"> <?php do_action('bp_inside_before_sidebar'); ?> <?php if (function_exists('dynamic_sidebar')) { ?> <!-- Members Sidebar --> <?php if (bp_is_page(BP_MEMBERS_SLUG) || bp_is_member()) { ?> <?php if (buddyboss_is_plugin_active('bp-profile-search/bps-main.php')) { ?> <div class="widget no-search"> <h3 class="widgettitle">Search Members</h3> <?php do_action('bp_profile_search_form'); ?> </div> <?php } ?>
function bp_is_user() { return bp_is_member(); }
function vibe_fillblank($atts, $content = null) { global $post; $user_id = get_current_user_id(); $answers = get_comments(array('post_id' => $post->ID, 'status' => 'approve', 'user_id' => $user_id)); $content = ' '; if (isset($answers) && is_array($answers) && count($answers)) { $answer = reset($answers); $content = $answer->comment_content; } if (bp_is_member()) { return '____________'; } $return = '<i class="live-edit" data-model="article" data-url="/articles"><span class="vibe_fillblank" data-editable="true" data-name="content" data-max-length="250" data-text-options="true">' . $content . '</span></i>'; return $return; }
function wplms_bp_get_send_private_message_button($args) { if (bp_is_member()) { $args['link_text'] = '<i class="icon-letter-mail-1"></i>'; } return $args; }
if (is_front_page() && is_active_sidebar('home_sidebar')) { dynamic_sidebar('home_sidebar'); } else { if (is_category() || is_home() && !is_front_page()) { $cat_id = get_query_var('cat'); $style = get_option("cat_layout_{$cat_id}") ? get_option("cat_layout_{$cat_id}") : ot_get_option('blog_style', 'video'); if ($style == 'video' && is_active_sidebar('video_listing_sidebar')) { dynamic_sidebar('video_listing_sidebar'); } elseif ($style == 'blog' && is_active_sidebar('blog_sidebar')) { dynamic_sidebar('blog_sidebar'); } elseif (is_active_sidebar('main_sidebar')) { dynamic_sidebar('main_sidebar'); } } elseif (is_plugin_active('buddypress/bp-loader.php') && bp_current_component()) { //buddypress if (bp_is_member() && is_active_sidebar('bp_single_member_sidebar')) { //single member dynamic_sidebar('bp_single_member_sidebar'); } elseif (bp_is_group() && is_active_sidebar('bp_single_group_sidebar')) { //single group dynamic_sidebar('bp_single_group_sidebar'); } elseif (bp_is_register_page() && is_active_sidebar('bp_register_sidebar')) { //register dynamic_sidebar('bp_register_sidebar'); } elseif (bp_is_directory()) { //sitewide if (bp_is_activity_component() && is_active_sidebar('bp_activity_sidebar')) { dynamic_sidebar('bp_activity_sidebar'); //activity } elseif (bp_is_groups_component() && is_active_sidebar('bp_group_sidebar')) { dynamic_sidebar('bp_group_sidebar');
<div id="header"> <h1 id="logo"><a href="<?php echo site_url() ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php bp_site_name() ?></a></h1> <ul id="nav"> <li<?php if ( bp_is_front_page() ) : ?> class="selected"<?php endif; ?>> <a href="<?php echo site_url() ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php _e( 'Home', 'buddypress' ) ?></a> </li> <?php if ( 'activity' != bp_dtheme_page_on_front() && bp_is_active( 'activity' ) ) : ?> <li<?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?> class="selected"<?php endif; ?>> <a href="<?php echo site_url() ?>/<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( 'Activity', 'buddypress' ) ?>"><?php _e( 'Activity', 'buddypress' ) ?></a> </li> <?php endif; ?> <li<?php if ( bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ) : ?> class="selected"<?php endif; ?>> <a href="<?php echo site_url() ?>/<?php echo BP_MEMBERS_SLUG ?>/" title="<?php _e( 'Members', 'buddypress' ) ?>"><?php _e( 'Members', 'buddypress' ) ?></a> </li> <?php if ( bp_is_active( 'groups' ) ) : ?> <li<?php if ( bp_is_page( BP_GROUPS_SLUG ) || bp_is_group() ) : ?> class="selected"<?php endif; ?>> <a href="<?php echo site_url() ?>/<?php echo BP_GROUPS_SLUG ?>/" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?></a> </li> <?php if ( bp_is_active( 'forums' ) && ( function_exists( 'bp_forums_is_installed_correctly' ) && !(int) bp_get_option( 'bp-disable-forum-directory' ) ) && bp_forums_is_installed_correctly() ) : ?> <li<?php if ( bp_is_page( BP_FORUMS_SLUG ) ) : ?> class="selected"<?php endif; ?>> <a href="<?php echo site_url() ?>/<?php echo BP_FORUMS_SLUG ?>/" title="<?php _e( 'Forums', 'buddypress' ) ?>"><?php _e( 'Forums', 'buddypress' ) ?></a> </li> <?php endif; ?> <?php endif; ?>
<?php } ?> </textarea> </div> <div id="whats-new-options"> <div id="whats-new-submit"> <input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php _e('Post Update', 'buddypress'); ?> " /> </div> <?php if (bp_is_active('groups') && !bp_is_my_profile() && !bp_is_group() && bp_is_member()) { ?> <div id="whats-new-post-in-box"> <?php _e('Post in', 'buddypress'); ?> : <select id="whats-new-post-in" name="whats-new-post-in"> <option selected="selected" value="0"><?php _e('My Profile', 'buddypress'); ?> </option>
function bp_mytheme_post_update() { global $bp; // Check the nonce check_admin_referer('post_update', '_wpnonce_post_update'); if (!is_user_logged_in()) { echo '-1'; return false; } if (empty($_POST['content'])) { echo '-1<div id="message" class="error"><p>' . __('Please enter some content to post.', 'buddypress') . '</p></div>'; return false; } if (empty($_POST['object']) && function_exists('bp_activity_post_update')) { if (!bp_is_home() && bp_is_member()) { $content = "@" . bp_get_displayed_user_username() . " " . $_POST['content']; } else { $content = $_POST['content']; } $activity_id = bp_activity_post_update(array('content' => $content)); } elseif ($_POST['object'] == 'groups') { if (!empty($_POST['item_id']) && function_exists('groups_post_update')) { $activity_id = groups_post_update(array('content' => $_POST['content'], 'group_id' => $_POST['item_id'])); } } else { $activity_id = apply_filters('bp_activity_custom_update', $_POST['object'], $_POST['item_id'], $_POST['content']); } if (!$activity_id) { echo '-1<div id="message" class="error"><p>' . __('There was a problem posting your update, please try again.', 'buddypress') . '</p></div>'; return false; } if (bp_has_activities('include=' . $activity_id)) { ?> <?php while (bp_activities()) { bp_the_activity(); ?> <?php locate_template(array('activity/entry-wall.php'), true); ?> <?php } ?> <?php } }
function check_if_privacy_on() { global $bp; $privacy_enable = get_option('tn_blogsmu_privacy_status'); $privacy_redirect = get_option('tn_blogsmu_privacy_redirect'); if ($privacy_enable == "enable") { if (bp_is_profile_component() || bp_is_activity_component() || bp_is_page(bp_get_root_slug('members')) || bp_is_member()) { if (!is_user_logged_in()) { if ($privacy_redirect == '') { bp_core_redirect($bp->root_domain . '/' . bp_get_root_slug('register')); } else { bp_core_redirect($privacy_redirect); } } } } //off }
if ($bp_existed == 'true') { if (function_exists('bp_sitewide_activity_feed_link')) { ?> <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php _e('Site Wide Activity RSS Feed', 'buddypress'); ?> " href="<?php bp_sitewide_activity_feed_link(); ?> " /> <?php } if (function_exists('bp_member_activity_feed_link') && bp_is_member()) { ?> <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_displayed_user_fullname(); ?> | <?php _e('Activity RSS Feed', 'buddypress'); ?> " href="<?php bp_member_activity_feed_link(); ?> " /> <?php
function display_cover_image() { global $bp; if (bp_is_member() || bp_is_group()) { if (!empty($this->cover_image)) { echo '<style> #item-header{background:url("' . $this->cover_image . '") !important;} #buddypress div#item-header div#item-header-content, #buddypress div#item-header #latest-update h6, #buddypress div#item-header div#item-header-content a, #buddypress div#item-header div#item-header-content h3 a, header.sleek.transparent nav>.menu>li>a,header.sleek.transparent .topmenu>li>a { color:#FFF !important; mix-blend-mode:difference; } </style>'; } } }
/** * 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()) { $css[] = 'group-single'; } if (function_exists('bp_is_user_blogs') && bp_is_user_blogs()) { $css[] = 'user-blogs'; } if (function_exists('bp_is_user_recent_posts') && bp_is_user_recent_posts()) { $css[] = 'user-recent-posts'; } if (function_exists('bp_is_user_recent_commments') && bp_is_user_recent_commments()) { $css[] = 'user-recent-commments'; } if (function_exists('bp_is_create_blog') && bp_is_create_blog()) { $css[] = 'create-blog'; } if (function_exists('bp_is_user_friends') && bp_is_user_friends()) { $css[] = 'user-friends'; } if (function_exists('bp_is_friend_requests') && bp_is_friend_requests()) { $css[] = 'friend-requests'; } if (function_exists('bp_is_user_messages') && bp_is_user_messages()) { $css[] = 'user-messages'; } if (function_exists('bp_is_messages_inbox') && bp_is_messages_inbox()) { $css[] = 'messages-inbox'; } if (function_exists('bp_is_messages_sentbox') && bp_is_messages_sentbox()) { $css[] = 'messages-sentbox'; } if (function_exists('bp_is_notices') && bp_is_notices()) { $css[] = 'notices'; } if (function_exists('bp_is_messages_compose_screen') && bp_is_messages_compose_screen()) { $css[] = 'messages-compose-screen'; } if (function_exists('bp_is_single_item') && bp_is_single_item()) { $css[] = 'single-item'; } if (function_exists('bp_is_activation_page') && bp_is_activation_page()) { $css[] = 'activation-page'; } if (function_exists('bp_is_register_page') && bp_is_register_page()) { $css[] = 'register-page'; } $css[] = 'fix'; if (is_array($custom)) { foreach ($custom as $class) { if (!in_array($class, $css)) { $css[] = esc_attr($class); } } } else { if ($custom != false) { $css[] = $custom; } } $css_class = implode(' ', $css); if ($echo) { echo ' class="' . $css_class . '" '; } return ' class="' . $css_class . '" '; }