buddypress/bp-notifications/bp-notifications-screens.php
John James Jacoby 4730af60bd First pass at bp-notifications component. Includes:
* Backwards compatibility for old core functions.
* Screens, functions, classes, and actions for Notifications.
* Improved class methods for getting, updating, and deleting notifications.
* Template parts in bp-legacy for theme compatibility.
* A few basic unit tests.

@todo's:

* Improve template output with dedicated functions, markup, classes, et all.
* More unit tests.
* Pagination links.
* Auto-activate on update, so existing installations do not lose previously core functionality.

See #5148. Props johnjamesjacoby, boonebgorges, r-a-y.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7521 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
2013-11-07 17:15:51 +00:00

46 lines
1.1 KiB
PHP

<?php
/**
* BuddyPress Notifications Screen Functions.
*
* Screen functions are the controllers of BuddyPress. They will execute when
* their specific URL is caught. They will first save or manipulate data using
* business functions, then pass on the user to a template file.
*
* @package BuddyPress
* @subpackage NotificationsScreens
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Catch and route the 'unread' notifications screen.
*
* @since BuddyPress (1.9.0)
*/
function bp_notifications_screen_unread() {
do_action( 'bp_notifications_screen_unread' );
bp_core_load_template( apply_filters( 'bp_notifications_template_unread', 'members/single/home' ) );
}
/**
* Catch and route the 'read' notifications screen.
*
* @since BuddyPress (1.9.0)
*/
function bp_notifications_screen_read() {
do_action( 'bp_notifications_screen_read' );
bp_core_load_template( apply_filters( 'bp_notifications_template_read', 'members/single/home' ) );
}
/**
* Catch and route the 'settings' notifications screen.
*
* @since BuddyPress (1.9.0)
*/
function bp_notifications_screen_settings() {
}