Changeset 13614
- Timestamp:
- 10/19/2023 11:34:45 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 12 edited
-
bp-core/admin/bp-core-admin-functions.php (modified) (5 diffs)
-
bp-core/admin/css/common-rtl.css (modified) (3 diffs)
-
bp-core/admin/css/common.css (modified) (3 diffs)
-
bp-core/admin/js/dismissible-admin-notices.js (modified) (1 diff)
-
bp-core/bp-core-functions.php (modified) (1 diff)
-
bp-core/bp-core-update.php (modified) (2 diffs)
-
bp-core/classes/class-bp-admin.php (modified) (4 diffs)
-
bp-core/css/admin-bar-rtl.css (modified) (1 diff)
-
bp-core/css/admin-bar.css (modified) (1 diff)
-
bp-members/bp-members-adminbar.php (modified) (2 diffs)
-
bp-notifications/bp-notifications-adminbar.php (modified) (2 diffs)
-
js/admin/bp-core/dismissible-admin-notices.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-functions.php
r13586 r13614 505 505 'name' => __( 'Options', 'buddypress' ), 506 506 ), 507 ' 3' => array(507 '4' => array( 508 508 'id' => 'bp-credits', 509 509 'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-credits' ), 'admin.php' ) ), … … 517 517 'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-rewrites' ), 'admin.php' ) ), 518 518 'name' => __( 'URLs', 'buddypress' ), 519 ); 520 } 521 522 if ( bp_core_get_unread_admin_notifications() || ( isset( $_GET['page'] ) && 'bp-admin-notifications' === $_GET['page'] ) ) { 523 $settings_tabs['3'] = array( 524 'id' => 'bp-admin-notifications', 525 'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-admin-notifications' ), 'admin.php' ) ), 526 'name' => __( 'Notifications', 'buddypress' ), 519 527 ); 520 528 } … … 1450 1458 */ 1451 1459 function bp_core_admin_notice_dismiss_callback() { 1452 if ( ! current_user_can( ' install_plugins' ) ) {1460 if ( ! current_user_can( 'manage_options' ) ) { 1453 1461 wp_send_json_error(); 1454 1462 } … … 1477 1485 } 1478 1486 1479 bp_ update_option( "bp-dismissed-notice-{$notice_id}", true);1487 bp_core_dismiss_admin_notification( $notice_id ); 1480 1488 1481 1489 wp_send_json_success(); … … 1555 1563 } 1556 1564 add_action( 'bp_init', 'bp_block_init_category_filter' ); 1565 1566 /** 1567 * Outputs an Admin Notification. 1568 * 1569 * @since 11.4.0 1570 * 1571 * @param object $notification An Admin Notification object. 1572 */ 1573 function bp_core_admin_format_notifications( $notification = null ) { 1574 if ( ! isset( $notification->id ) ) { 1575 return ''; 1576 } 1577 ?> 1578 <div class="bp-welcome-panel bp-notice-container"> 1579 <a class="bp-welcome-panel-close bp-is-dismissible" href="#" data-notice_id="<?php echo esc_attr( $notification->id ); ?>" aria-label="<?php esc_attr_e( 'Dismiss the notification', 'buddypress' ); ?>"><?php esc_html_e( 'Dismiss', 'buddypress' ); ?></a> 1580 <div class="bp-welcome-panel-content"> 1581 <h2><span class="bp-version"><?php echo number_format_i18n( $notification->version, 1 ); ?></span> <?php echo esc_html( $notification->title ); ?></h2> 1582 <p class="about-description"> 1583 <?php echo wp_kses( $notification->content, array( 'a' => array( 'href' => true ), 'br' => array(), 'strong' => array() ) ); ?> 1584 </p> 1585 <div class="bp-admin-notification-action"><a href="<?php echo esc_url( $notification->href ); ?>" class="button button-primary"><?php echo esc_html( $notification->text ); ?></a></div> 1586 </div> 1587 </div> 1588 <?php 1589 } -
trunk/src/bp-core/admin/css/common-rtl.css
r13368 r13614 41 41 .bp-badge:before { 42 42 content: "\f448"; 43 } 44 45 .bp-version { 46 color: #fff; 47 background: #d84800; 48 padding: 2px 5px; 43 49 } 44 50 … … 614 620 615 621 .buddypress .bp-welcome-panel-content p { 616 padding-bottom: 23px;617 622 font-size: 14px; 623 } 624 625 .buddypress .bp-welcome-panel-content .bp-admin-notification-action { 626 margin: 23px 0; 618 627 } 619 628 … … 698 707 } 699 708 709 .buddypress-body .form-table.hide { 710 display: none; 711 } 712 700 713 /* Media queries */ 701 714 @media screen and (max-width: 782px) { -
trunk/src/bp-core/admin/css/common.css
r13368 r13614 41 41 .bp-badge:before { 42 42 content: "\f448"; 43 } 44 45 .bp-version { 46 color: #fff; 47 background: #d84800; 48 padding: 2px 5px; 43 49 } 44 50 … … 614 620 615 621 .buddypress .bp-welcome-panel-content p { 616 padding-bottom: 23px;617 622 font-size: 14px; 623 } 624 625 .buddypress .bp-welcome-panel-content .bp-admin-notification-action { 626 margin: 23px 0; 618 627 } 619 628 … … 698 707 } 699 708 709 .buddypress-body .form-table.hide { 710 display: none; 711 } 712 700 713 /* Media queries */ 701 714 @media screen and (max-width: 782px) { -
trunk/src/bp-core/admin/js/dismissible-admin-notices.js
r13463 r13614 1 !function(){window.bp=window.bp||{},bp.DismissibleAdminNotices=class{constructor( t){this.settings=t||{}}start(){const{url:t,nonce:e}=this.settings;t&&e&&document.querySelectorAll(".bp-is-dismissible").forEach((s=>{s.addEventListener("click",(s=>{s.preventDefault();const n=s.target;if(n.classList.contains("loading"))return;n.classList.add("loading");const{notice_id:i}=n.dataset,o=n.closest(".bp-notice-container"),c=new Headers({"X-BP-Nonce":e}),d=new FormData;d.append("action","bp_dismiss_notice"),d.append("notice_id",i),fetch(t,{method:"POST",headers:c,body:d}).then((t=>t.json())).then((t=>{const{success:e}=t;e?o.remove():n.classList.remove("loading")}))}))}))}};const t=window.bpDismissibleAdminNoticesSettings||{},e=new bp.DismissibleAdminNotices(t);"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e.start()):e.start()}();1 !function(){window.bp=window.bp||{},bp.DismissibleAdminNotices=class{constructor(e){this.settings=e||{}}start(){const{url:e,nonce:t}=this.settings;e&&t&&document.querySelectorAll(".bp-is-dismissible").forEach((n=>{n.addEventListener("click",(n=>{n.preventDefault();const s=n.target;if(s.classList.contains("loading"))return;s.classList.add("loading");const{notice_id:i}=s.dataset,o=s.closest(".bp-notice-container"),c=new Headers({"X-BP-Nonce":t}),d=new FormData;d.append("action","bp_dismiss_notice"),d.append("notice_id",i),fetch(e,{method:"POST",headers:c,body:d}).then((e=>e.json())).then((e=>{const{success:t}=e;t?(o.remove(),0===document.querySelectorAll(".bp-notice-container").length&&document.querySelector("#no-admin-notifications").classList.remove("hide")):s.classList.remove("loading")}))}))}))}};const e=window.bpDismissibleAdminNoticesSettings||{},t=new bp.DismissibleAdminNotices(e);"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t.start()):t.start()}(); -
trunk/src/bp-core/bp-core-functions.php
r13547 r13614 5049 5049 return apply_filters( 'bp_get_community_visibility', $retval, $component ); 5050 5050 } 5051 5052 /** 5053 * Returns the list of unread Admin Notification IDs. 5054 * 5055 * @since 11.4.0 5056 * 5057 * @return array The list of unread Admin Notification IDs. 5058 */ 5059 function bp_core_get_unread_admin_notifications() { 5060 return (array) bp_get_option( 'bp_unread_admin_notifications', array() ); 5061 } 5062 5063 /** 5064 * Dismisses an Admin Notification. 5065 * 5066 * @since 11.4.0 5067 * 5068 * @param string $notification_id The Admin Notification to dismiss. 5069 */ 5070 function bp_core_dismiss_admin_notification( $notification_id = '' ) { 5071 $unread = bp_core_get_unread_admin_notifications(); 5072 $remaining = array_diff( $unread, array( $notification_id ) ); 5073 bp_update_option( 'bp_unread_admin_notifications', $remaining ); 5074 } 5075 5076 /** 5077 * @since 11.4.0 5078 * 5079 * @return array The list of Admin notifications. 5080 */ 5081 function bp_core_get_admin_notifications() { 5082 $unreads = bp_core_get_unread_admin_notifications(); 5083 if ( ! $unreads ) { 5084 return array(); 5085 } 5086 5087 $admin_notifications = array( 5088 'bp100-welcome-addons' => (object) array( 5089 'id' => 'bp100-welcome-addons', 5090 'href' => add_query_arg( 5091 array( 5092 'tab' => 'bp-add-ons', 5093 'n' => 'bp100-welcome-addons', 5094 ), 5095 bp_get_admin_url( 'plugin-install.php' ) 5096 ), 5097 'text' => __( 'Discover BuddyPress Add-ons', 'buddypress' ), 5098 'title' => __( 'Hello BuddyPress Add-ons!', 'buddypress' ), 5099 'content' => __( 'Add-ons are features as Plugins or Blocks maintained by the BuddyPress development team & hosted on the WordPress.org plugins directory.', 'buddypress' ) . 5100 __( 'Thanks to this new tab inside your Dashboard screen to add plugins, you’ll be able to find them faster and eventually contribute to beta features early to give the BuddyPress development team your feedbacks.', 'buddypress' ), 5101 'version' => 10.0, 5102 ), 5103 'bp114-prepare-for-rewrites' => (object) array( 5104 'id' => 'bp114-prepare-for-rewrites', 5105 'href' => add_query_arg( 5106 array( 5107 'tab' => 'bp-add-ons', 5108 'show' => 'bp-classic', 5109 'n' => 'bp114-prepare-for-rewrites' 5110 ), 5111 bp_get_admin_url( 'plugin-install.php' ) 5112 ), 5113 'text' => __( 'Get The BP Classic Add-on', 'buddypress' ), 5114 'title' => __( 'Get ready for the brand-new BP Rewrites API!', 'buddypress' ), 5115 'content' => __( 'Our next major version (12.0.0) will introduce several large changes that could be incompatible with your site\'s configuration. To prevent problems, we\'ve built the BP Classic Add-on, which you may want to proactively install if any of the following cases:', 'buddypress' ) . '<br><br>' . 5116 '<strong>' . __( 'Some of your BuddyPress plugins have not been updated lately.', 'buddypress' ) . '</strong><br>' . 5117 __( 'BuddyPress 12.0.0 introduces the BP Rewrites API, which completely changes the way BuddyPress URLs are built and routed. This fundamental change requires most BuddyPress plugins to update how they deal with BuddyPress URLs. If your BuddyPress plugins have not been updated in the last few months, they are probably not ready for BuddyPress 12.0.0.', 'buddypress' ) . '<br><br>' . 5118 '<strong>' . __( 'You are still using the BP Default theme.', 'buddypress' ) . '</strong><br><br>' . 5119 '<strong>' . __( 'You still use a BP Legacy Widget.', 'buddypress' ) . '</strong><br><br>' . 5120 __( 'If any of the above items are true, we strongly advise you to install and activate the Classic Add-on before updating to BuddyPress 12.0.0.', 'buddypress' ), 5121 'version' => 11.4, 5122 ) 5123 ); 5124 5125 // Only keep unread notifications. 5126 foreach ( array_keys( $admin_notifications ) as $notification_id ) { 5127 if ( ! in_array( $notification_id, $unreads, true ) ) { 5128 unset( $admin_notifications[ $notification_id ] ); 5129 } 5130 } 5131 5132 return $admin_notifications; 5133 } -
trunk/src/bp-core/bp-core-update.php
r13536 r13614 288 288 289 289 // Version 11.0.0. 290 if ( $raw_db_version < 13271 ) {290 if ( $raw_db_version < 13271 ) { 291 291 bp_update_to_11_0(); 292 292 } 293 293 294 // Version 11.4.0. 295 if ( $raw_db_version < 13408 ) { 296 bp_update_to_11_4(); 297 } 298 294 299 // Version 12.0.0. 295 if ( $raw_db_version < 13422 ) {300 if ( $raw_db_version < 13422 ) { 296 301 bp_update_to_12_0(); 297 302 } … … 796 801 797 802 return $new_emails; 803 } 804 805 /** 806 * 11.4.0 update routine. 807 * 808 * @since 11.4.0 809 */ 810 function bp_update_to_11_4() { 811 $unread = array( 'bp114-prepare-for-rewrites' ); 812 813 // Check if 10.0 notice was dismissed. 814 $old_dismissed = (bool) bp_get_option( 'bp-dismissed-notice-bp100-welcome-addons', false ); 815 if ( ! $old_dismissed ) { 816 $unread[] = 'bp100-welcome-addons'; 817 } 818 819 // Remove the dismissible option. 820 bp_delete_option( 'bp-dismissed-notice-bp100-welcome-addons' ); 821 822 // Create unread Admin notifications. 823 bp_update_option( 'bp_unread_admin_notifications', $unread ); 798 824 } 799 825 -
trunk/src/bp-core/classes/class-bp-admin.php
r13595 r13614 304 304 $this->submenu_pages['settings']['bp-settings'] = $bp_settings_page; 305 305 $hooks[] = $bp_settings_page; 306 307 // Admin notifications. 308 $bp_admin_notifications = add_submenu_page( 309 $this->settings_page, 310 __( 'BuddyPress Admin Notifications', 'buddypress' ), 311 __( 'BuddyPress Admin Notifications', 'buddypress' ), 312 $this->capability, 313 'bp-admin-notifications', 314 array( $this, 'admin_notifications' ) 315 ); 316 317 $this->submenu_pages['settings']['bp-admin-notifications'] = $bp_admin_notifications; 318 $hooks[] = $bp_admin_notifications; 306 319 307 320 // Credits. … … 642 655 643 656 // Settings pages. 644 remove_submenu_page( $this->settings_page, 'bp-rewrites' ); 645 remove_submenu_page( $this->settings_page, 'bp-settings' ); 646 remove_submenu_page( $this->settings_page, 'bp-credits' ); 657 remove_submenu_page( $this->settings_page, 'bp-rewrites' ); 658 remove_submenu_page( $this->settings_page, 'bp-settings' ); 659 remove_submenu_page( $this->settings_page, 'bp-credits' ); 660 remove_submenu_page( $this->settings_page, 'bp-admin-notifications' ); 647 661 648 662 // Network Admin Tools. … … 1556 1570 */ 1557 1571 public function display_addons_table() { 1558 $notice_id = 'bp100-welcome-addons';1559 $dismissed = bp_get_option( "bp-dismissed-notice-{$notice_id}", false );1560 1561 if ( ! $dismissed ) {1562 // Enqueue the Script to Ajax Dismiss an Admin notice.1563 wp_enqueue_script( 'bp-dismissible-admin-notices' );1564 1565 ?>1566 <div class="bp-welcome-panel bp-notice-container">1567 <a class="bp-welcome-panel-close bp-is-dismissible" href="#" data-notice_id="<?php echo esc_attr( $notice_id ); ?>" aria-label="<?php esc_attr_e( 'Dismiss the welcome panel', 'buddypress' ); ?>"><?php esc_html_e( 'Dismiss', 'buddypress' ); ?></a>1568 <div class="bp-welcome-panel-content">1569 <h2><span class="bp-badge"></span> <?php esc_html_e( 'Hello BuddyPress Add-ons!', 'buddypress' ); ?></h2>1570 <p class="about-description">1571 <?php esc_html_e( 'Add-ons are features as Plugins or Blocks maintained by the BuddyPress development team & hosted on the WordPress.org plugins directory.', 'buddypress' ); ?>1572 <?php esc_html_e( 'Thanks to this new tab inside your Dashboard screen to add plugins, you’ll be able to find them faster and eventually contribute to beta features early to give the BuddyPress development team your feedbacks.', 'buddypress' ); ?>1573 </p>1574 </div>1575 </div>1576 <?php1577 }1578 1579 1572 if ( isset( $_GET['show'] ) && 'bp-classic' === $_GET['show'] ) { 1580 1573 wp_add_inline_script( … … 1592 1585 } 1593 1586 1587 if ( isset( $_GET['n'] ) && $_GET['n'] ) { 1588 $notification_id = sanitize_text_field( wp_unslash( $_GET['n'] ) ); 1589 bp_core_dismiss_admin_notification( $notification_id ); 1590 } 1591 1594 1592 // Display the "buddypress" favorites. 1595 1593 display_plugins_table(); 1596 1594 } 1595 1596 /** 1597 * Display the Admin Notifications screen. 1598 * 1599 * @since 11.4.0 1600 */ 1601 public function admin_notifications() { 1602 bp_core_admin_tabbed_screen_header( __( 'BuddyPress Settings', 'buddypress' ), __( 'Notifications', 'buddypress' ) ); 1603 $notifications = bp_core_get_admin_notifications(); 1604 $class = ''; 1605 1606 if ( $notifications ) { 1607 wp_enqueue_script( 'bp-dismissible-admin-notices' ); 1608 $notifications = array_reverse( bp_sort_by_key( $notifications, 'version', 'num' ) ); 1609 $class = 'hide'; 1610 } 1611 ?> 1612 <div class="buddypress-body admin-notifications"> 1613 <table id="no-admin-notifications" class="form-table <?php echo sanitize_html_class( $class ); ?>" role="presentation"> 1614 <tbody> 1615 <tr><td><?php esc_html_e( 'No new Admin Notfications', 'buddypress' ); ?></td><tr> 1616 </tbody> 1617 </table> 1618 1619 <?php if ( $notifications ) : foreach ( $notifications as $notification ) : ?> 1620 <?php bp_core_admin_format_notifications( $notification ); ?> 1621 <?php endforeach; endif; ?> 1622 </div> 1623 <?php 1624 } 1597 1625 } 1598 1626 endif; // End class_exists check. -
trunk/src/bp-core/css/admin-bar-rtl.css
r12877 r13614 47 47 } 48 48 49 #wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications.alert.admin-type { 50 background-color: #d84800; 51 } 52 49 53 #wpadminbar .quicklinks li#wp-admin-bar-bp-notifications > a { 50 54 padding: 0 0.5em; -
trunk/src/bp-core/css/admin-bar.css
r12877 r13614 47 47 } 48 48 49 #wpadminbar .quicklinks li#wp-admin-bar-bp-notifications #ab-pending-notifications.alert.admin-type { 50 background-color: #d84800; 51 } 52 49 53 #wpadminbar .quicklinks li#wp-admin-bar-bp-notifications > a { 50 54 padding: 0 0.5em; -
trunk/src/bp-members/bp-members-adminbar.php
r13503 r13614 168 168 * Build the "Notifications" dropdown. 169 169 * 170 * @since 11.4.0 171 */ 172 function bp_members_admin_bar_notifications_dropdown( $notifications = array(), $menu_link = '', $type = 'members' ) { 173 if ( ! $menu_link || ( 'admin' === $type && empty( $notifications ) ) ) { 174 return false; 175 } 176 177 global $wp_admin_bar; 178 179 $count = 0; 180 $alert_class = array( 'count', 'no-alert' ); 181 182 if ( ! empty( $notifications ) ) { 183 $count = number_format_i18n( count( $notifications ) ); 184 $alert_class = array( 'pending-count', 'alert' ); 185 186 if ( 'admin' === $type ) { 187 $count = '!'; 188 } 189 }; 190 191 $alert_class[] = $type . '-type'; 192 $menu_title = sprintf( 193 '<span id="ab-pending-notifications" class="%1$s">%2$s</span>', 194 implode( ' ', array_map( 'sanitize_html_class', $alert_class ) ), 195 $count 196 ); 197 198 // Add the top-level Notifications button. 199 $wp_admin_bar->add_node( array( 200 'parent' => 'top-secondary', 201 'id' => 'bp-notifications', 202 'title' => $menu_title, 203 'href' => $menu_link, 204 ) ); 205 206 if ( ! empty( $notifications ) ) { 207 foreach ( (array) $notifications as $notification ) { 208 $wp_admin_bar->add_node( array( 209 'parent' => 'bp-notifications', 210 'id' => 'notification-' . $notification->id, 211 'title' => $notification->content, 212 'href' => $notification->href, 213 ) ); 214 } 215 } else { 216 $wp_admin_bar->add_node( array( 217 'parent' => 'bp-notifications', 218 'id' => 'no-notifications', 219 'title' => __( 'No new notifications', 'buddypress' ), 220 'href' => $menu_link, 221 ) ); 222 } 223 224 return true; 225 } 226 227 /** 228 * Build the Admin or Members "Notifications" dropdown. 229 * 170 230 * @since 1.5.0 171 231 * … … 173 233 */ 174 234 function bp_members_admin_bar_notifications_menu() { 175 176 // Bail if notifications is not active. 177 if ( ! bp_is_active( 'notifications' ) ) { 178 return false; 179 } 180 181 bp_notifications_toolbar_menu(); 235 $admins_notifications = array(); 236 $capability = 'manage_options'; 237 238 if ( bp_core_do_network_admin() ) { 239 $capability = 'manage_network_options'; 240 } 241 242 if ( bp_current_user_can( $capability ) ) { 243 $notifications = bp_core_get_admin_notifications(); 244 245 if ( $notifications ) { 246 $menu_link = esc_url( bp_get_admin_url( add_query_arg( 'page', 'bp-admin-notifications', 'admin.php' ) ) ); 247 $count = count( $notifications ); 248 249 $notifications = array( 250 (object) array( 251 'id' => 'bp-admin-notifications', 252 'href' => $menu_link, 253 'content' => sprintf( 254 /* translators: %s: the number of admin notifications */ 255 _n( 'You have %s new important admin notification.', 'You have %s new important admin notifications.', $count, 'buddypress' ), 256 number_format_i18n( $count ) 257 ), 258 ), 259 ); 260 261 return bp_members_admin_bar_notifications_dropdown( $notifications, $menu_link, 'admin' ); 262 } 263 } 264 265 // Use Members notifications if the component is active. 266 if ( bp_is_active( 'notifications' ) ) { 267 return bp_notifications_toolbar_menu(); 268 } 182 269 } 183 270 add_action( 'admin_bar_menu', 'bp_members_admin_bar_notifications_menu', 90 ); -
trunk/src/bp-notifications/bp-notifications-adminbar.php
r13503 r13614 23 23 */ 24 24 function bp_notifications_toolbar_menu() { 25 global $wp_admin_bar;26 27 25 if ( ! is_user_logged_in() ) { 28 26 return false; … … 30 28 31 29 $notifications = bp_notifications_get_notifications_for_user( bp_loggedin_user_id(), 'object' ); 32 $count = ! empty( $notifications ) ? count( $notifications ) : 0; 33 $alert_class = (int) $count > 0 ? 'pending-count alert' : 'count no-alert'; 34 $menu_title = '<span id="ab-pending-notifications" class="' . $alert_class . '">' . number_format_i18n( $count ) . '</span>'; 35 $menu_link = bp_loggedin_user_url( bp_members_get_path_chunks( array( bp_get_notifications_slug() ) ) ); 30 $menu_link = bp_loggedin_user_url( bp_members_get_path_chunks( array( bp_get_notifications_slug() ) ) ); 36 31 37 // Add the top-level Notifications button. 38 $wp_admin_bar->add_node( array( 39 'parent' => 'top-secondary', 40 'id' => 'bp-notifications', 41 'title' => $menu_title, 42 'href' => $menu_link, 43 ) ); 44 45 if ( ! empty( $notifications ) ) { 46 foreach ( (array) $notifications as $notification ) { 47 $wp_admin_bar->add_node( array( 48 'parent' => 'bp-notifications', 49 'id' => 'notification-' . $notification->id, 50 'title' => $notification->content, 51 'href' => $notification->href, 52 ) ); 53 } 54 } else { 55 $wp_admin_bar->add_node( array( 56 'parent' => 'bp-notifications', 57 'id' => 'no-notifications', 58 'title' => __( 'No new notifications', 'buddypress' ), 59 'href' => $menu_link, 60 ) ); 61 } 62 63 return true; 32 return bp_members_admin_bar_notifications_dropdown( $notifications, $menu_link ); 64 33 } 65 add_action( 'admin_bar_menu', 'bp_members_admin_bar_notifications_menu', 90 ); -
trunk/src/js/admin/bp-core/dismissible-admin-notices.js
r13463 r13614 56 56 if ( success ) { 57 57 noticeContainer.remove(); 58 59 if ( 0 === document.querySelectorAll( '.bp-notice-container' ).length ) { 60 document.querySelector( '#no-admin-notifications' ).classList.remove( 'hide' ); 61 } 58 62 } else { 59 63 noticeLink.classList.remove( 'loading' );
Note: See TracChangeset
for help on using the changeset viewer.