Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/10/2021 04:55:25 PM (5 years ago)
Author:
imath
Message:

BP Nouveau: include a notification to the active Site Wide Notice

When a Site Wide notice is active the BP Nouveau template pack is prepending a notification to the logged in user notifications list.

FYI: This feature was "missing in action" since the introduction of the bp_notifications_get_grouped_notifications_for_user() and its use inside the bp_notifications_get_notifications_for_user() function in replacement of bp_notifications_get_all_notifications_for_user().

Fixes #8547

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/messages/loader.php

    r12192 r13036  
    44 *
    55 * @since 3.0.0
    6  * @version 3.0.0
     6 * @version 10.0.0
    77 */
    88
     
    8989         */
    9090        protected function setup_filters() {
    91                 // Enqueue specific styles
     91                // Enqueue specific styles.
    9292                add_filter( 'bp_nouveau_enqueue_styles', 'bp_nouveau_messages_enqueue_styles', 10, 1 );
    9393
    94                 // Register messages scripts
     94                // Register messages scripts.
    9595                add_filter( 'bp_nouveau_register_scripts', 'bp_nouveau_messages_register_scripts', 10, 1 );
    9696
    97                 // Localize Scripts
     97                // Localize Scripts.
    9898                add_filter( 'bp_core_get_js_strings', 'bp_nouveau_messages_localize_scripts', 10, 1 );
    9999
    100                 // Notices
    101                 add_filter( 'bp_messages_single_new_message_notification', 'bp_nouveau_format_notice_notification_for_user', 10, 1 );
    102                 add_filter( 'bp_notifications_get_all_notifications_for_user', 'bp_nouveau_add_notice_notification_for_user', 10, 2 );
     100                // Notices.
     101                add_filter( 'bp_core_get_notifications_for_user', 'bp_nouveau_add_notice_notification_for_user', 10, 2 );
    103102
    104                 // Messages
     103                // Messages.
    105104                add_filter( 'bp_messages_admin_nav', 'bp_nouveau_messages_adjust_admin_nav', 10, 1 );
    106105        }
Note: See TracChangeset for help on using the changeset viewer.