Changeset 13765 for trunk/src/bp-notifications/screens/unread.php
- Timestamp:
- 03/09/2024 11:03:34 AM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-notifications/screens/unread.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-notifications/screens/unread.php
r13091 r13765 22 22 do_action( 'bp_notifications_screen_unread' ); 23 23 24 /** 25 * Filters the template to load for the notifications unread screen. 26 * 27 * @since 1.9.0 28 * 29 * @param string $template Path to the notifications unread template to load. 30 */ 31 bp_core_load_template( apply_filters( 'bp_notifications_template_unread', 'members/single/home' ) ); 24 $templates = array( 25 /** 26 * Filters the template to load for the notifications unread screen. 27 * 28 * @since 1.9.0 29 * 30 * @param string $template Path to the notifications unread template to load. 31 */ 32 apply_filters( 'bp_notifications_template_unread', 'members/single/home' ), 33 'members/single/index', 34 ); 35 36 bp_core_load_template( $templates ); 32 37 } 33 38 … … 37 42 * @since 1.9.0 38 43 * 39 * @return bool44 * @return void 40 45 */ 41 46 function bp_notifications_action_mark_read() { … … 43 48 // Bail if not the unread screen. 44 49 if ( ! bp_is_notifications_component() || ! bp_is_current_action( 'unread' ) ) { 45 return false;50 return; 46 51 } 47 52 48 53 // Get the action. 49 $action = ! empty( $_GET['action'] ) ? $_GET['action'] : '';50 $nonce = ! empty( $_GET['_wpnonce'] ) ? $_GET['_wpnonce'] : '';51 $id = ! empty( $_GET['notification_id'] ) ? $_GET['notification_id'] : '';54 $action = ! empty( $_GET['action'] ) ? $_GET['action'] : ''; 55 $nonce = ! empty( $_GET['_wpnonce'] ) ? $_GET['_wpnonce'] : ''; 56 $id = ! empty( $_GET['notification_id'] ) ? $_GET['notification_id'] : ''; 52 57 53 58 // Bail if no action or no ID. 54 59 if ( ( 'read' !== $action ) || empty( $id ) || empty( $nonce ) ) { 55 return false;60 return; 56 61 } 57 62
Note: See TracChangeset
for help on using the changeset viewer.