buddyboss_adminbar_myaccount(); ?> <?php if (!is_page_template('page-no-buddypanel.php') && !(!boss_get_option('boss_panel_hide') && !is_user_logged_in())) { wp_nav_menu(array('theme_location' => 'header-my-account', 'container_class' => 'boss-mobile-porfile-menu', 'fallback_cb' => '', 'menu_class' => 'links', 'depth' => 2, 'walker' => new BuddybossWalker())); } ?> <!-- Register/Login links for logged out users --> <?php if (!is_user_logged_in() && buddyboss_is_bp_active() && !bp_hide_loggedout_adminbar(false)) { ?> <?php if (buddyboss_is_bp_active() && bp_get_signup_allowed()) { ?> <a href="<?php echo bp_get_signup_page(); ?> " class="register-link screen-reader-shortcut"><?php _e('Register', 'boss'); ?> </a> <?php } ?> <a href="<?php echo wp_login_url(); ?>
/** * Correct notification count in header notification * * @since Boss 1.0.0 * */ function buddyboss_js_correct_notification_count() { if (!is_user_logged_in() || !buddyboss_is_bp_active() || !function_exists("bp_notifications_get_all_notifications_for_user")) { return; } $notifications = bp_notifications_get_all_notifications_for_user(bp_loggedin_user_id()); if (!empty($notifications)) { $count = count($notifications); ?> <script type="text/javascript"> jQuery('document').ready(function($){ $('.header-notifications .notification-link span.alert').html('<?php echo $count; ?> '); }); </script> <?php } }
<?php wp_nav_menu(array('theme_location' => 'primary-menu', 'menu_class' => 'nav-menu clearfix')); ?> </div> </nav><!-- #site-navigation --> </header><!-- #masthead --> <?php do_action('buddyboss_after_header'); ?> <div id="mobile-header"> <!-- Toolbar for Mobile --> <div class="mobile-header-inner"> <!-- Left button --> <?php if (is_user_logged_in() || !is_user_logged_in() && buddyboss_is_bp_active() && !bp_hide_loggedout_adminbar(false)) { ?> <div id="user-nav" class="left-btn"></div> <?php } ?> <!-- Right button --> <div id="main-nav" class="right-btn"></div> </div> <h1><a class="mobile-site-title" href="<?php echo esc_url(home_url('/')); ?> " title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?> " rel="home"><?php
function buddyboss_redirect_previous_page($redirect_to, $request, $user) { if (buddyboss_is_bp_active()) { $bp_pages = bp_get_option('bp-pages'); $activate_page_id = !empty($bp_pages) && isset($bp_pages['activate']) ? $bp_pages['activate'] : null; if ((int) $activate_page_id <= 0) { return $redirect_to; } $activate_page = get_post($activate_page_id); if (empty($activate_page) || empty($activate_page->post_name)) { return $redirect_to; } $activate_page_slug = $activate_page->post_name; if (strpos($request, '/' . $activate_page_slug) !== false) { $redirect_to = home_url(); } } $request = isset($_SERVER["HTTP_REFERER"]) && !empty($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : false; if (!$request) { return $redirect_to; } $req_parts = explode('/', $request); $req_part = array_pop($req_parts); if (substr($req_part, 0, 3) == 'wp-') { return $redirect_to; } $request = str_replace(array('?loggedout=true', '&loggedout=true'), '', $request); return $request; }