Skip to:
Content
Pages
Categories
Search
Top
Bottom

Customize Notification wp admin bar with font-awesome


  • Dono12
    Participant

    @dono12

    @djpaul and @danbp How can I turn these Notification hacks into apply_filter functions for the bp/wp admin bar menu to display with font awesome for bp-custom or functions.php?

    <div class="site-header-user-notifcations">
    <a href="<?php global $current_user; echo home_url() . '/members/' . $current_user->user_login . '/notifications/'; ?>"><i class="fa fa-bell-o" aria-hidden="true"></i></a> 
    
    <?php
    $count = bp_notifications_get_unread_notification_count( bp_loggedin_user_id() );
    if ( $count > 0 ) {
    echo '<div class="site-header-user-notifcations-bubble">'; echo $count; echo '</div>';  
    } else {
    }
    ?>
    </div>
    <div class="site-header-user-notifcations">
    <a href="<?php global $current_user; echo home_url() . '/members/' . $current_user->user_login . '/friends/requests/'; ?>"><i class="fa fa-users" aria-hidden="true"></i></a>
    <?php
    $count_requests = bp_friend_get_total_requests_count( bp_loggedin_user_id() );
    if ( $count_requests > 0 ) {
    echo '<div class="site-header-user-notifcations-bubble">'; echo $count_requests; echo '</div>';
    } else {
    }
    ?>
    </div>
    <div class="site-header-user-notifcations">
    <a href="<?php global $current_user; echo home_url() . '/members/' . $current_user->user_login . '/messages/'; ?>"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
    <?php
    $count_messages = bp_get_total_unread_messages_count( bp_loggedin_user_id() );
    if ( $count_messages > 0 ) {
    echo '<div class="site-header-user-notifcations-bubble">'; echo $count_messages; echo '</div>';
    } else {
    }
    ?>
    </div>
  • You must be logged in to reply to this topic.
Skip to toolbar