/bp-notifications/bp-notifications-screens.php

  1. <?php 
  2. /** 
  3. * BuddyPress Notifications Screen Functions. 
  4. * 
  5. * Screen functions are the controllers of BuddyPress. They will execute when 
  6. * their specific URL is caught. They will first save or manipulate data using 
  7. * business functions, then pass on the user to a template file. 
  8. * 
  9. * @package BuddyPress 
  10. * @subpackage NotificationsScreens 
  11. * @since 1.9.0 
  12. */ 
  13.  
  14. // Exit if accessed directly. 
  15. defined( 'ABSPATH' ) || exit; 
  16.  
  17. /** 
  18. * Catch and route the 'unread' notifications screen. 
  19. * 
  20. * @since 1.9.0 
  21. */ 
  22. function bp_notifications_screen_unread() { 
  23.  
  24. /** 
  25. * Fires right before the loading of the notifications unread screen template file. 
  26. * 
  27. * @since 1.9.0 
  28. */ 
  29. do_action( 'bp_notifications_screen_unread' ); 
  30.  
  31. /** 
  32. * Filters the template to load for the notifications unread screen. 
  33. * 
  34. * @since 1.9.0 
  35. * 
  36. * @param string $template Path to the notifications unread template to load. 
  37. */ 
  38. bp_core_load_template( apply_filters( 'bp_notifications_template_unread', 'members/single/home' ) ); 
  39.  
  40. /** 
  41. * Catch and route the 'read' notifications screen. 
  42. * 
  43. * @since 1.9.0 
  44. */ 
  45. function bp_notifications_screen_read() { 
  46.  
  47. /** 
  48. * Fires right before the loading of the notifications read screen template file. 
  49. * 
  50. * @since 1.9.0 
  51. */ 
  52. do_action( 'bp_notifications_screen_read' ); 
  53.  
  54. /** 
  55. * Filters the template to load for the notifications read screen. 
  56. * 
  57. * @since 1.9.0 
  58. * 
  59. * @param string $template Path to the notifications read template to load. 
  60. */ 
  61. bp_core_load_template( apply_filters( 'bp_notifications_template_read', 'members/single/home' ) ); 
  62.  
  63. /** 
  64. * Catch and route the 'settings' notifications screen. 
  65. * 
  66. * @since 1.9.0 
  67. */ 
  68. function bp_notifications_screen_settings() { 
  69.  
.