mirror of
https://gh.wpcy.net/https://github.com/buddypress/buddypress.git
synced 2026-06-01 06:04:04 +08:00
* 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
46 lines
1.1 KiB
PHP
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() {
|
|
|
|
}
|