Changeset 12547 for trunk/src/bp-core/deprecated/1.9.php
- Timestamp:
- 01/29/2020 09:43:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/deprecated/1.9.php
r11447 r12547 10 10 */ 11 11 12 // Exit if accessed directly 12 // Exit if accessed directly. 13 13 defined( 'ABSPATH' ) || exit; 14 14 … … 31 31 function bp_core_add_notification( $item_id, $user_id, $component_name, $component_action, $secondary_item_id = 0, $date_notified = false, $is_new = 1 ) { 32 32 33 // Bail if notifications is not active 34 if ( ! bp_is_active( 'notifications' ) ) { 35 return false; 36 } 37 38 // Trigger the deprecated function notice 33 // Bail if notifications is not active. 34 if ( ! bp_is_active( 'notifications' ) ) { 35 return false; 36 } 37 38 // Trigger the deprecated function notice. 39 39 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_add_notification()' ); 40 40 41 // Notifications must always have a time 41 // Notifications must always have a time. 42 42 if ( false === $date_notified ) { 43 43 $date_notified = bp_core_current_time(); 44 44 } 45 45 46 // Add the notification 46 // Add the notification. 47 47 return bp_notifications_add_notification( array( 48 48 'item_id' => $item_id, … … 69 69 function bp_core_delete_notification( $id ) { 70 70 71 // Bail if notifications is not active 72 if ( ! bp_is_active( 'notifications' ) ) { 73 return false; 74 } 75 76 // Trigger the deprecated function notice 71 // Bail if notifications is not active. 72 if ( ! bp_is_active( 'notifications' ) ) { 73 return false; 74 } 75 76 // Trigger the deprecated function notice. 77 77 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notification()' ); 78 78 … … 92 92 function bp_core_get_notification( $id ) { 93 93 94 // Bail if notifications is not active 95 if ( ! bp_is_active( 'notifications' ) ) { 96 return false; 97 } 98 99 // Trigger the deprecated function notice 94 // Bail if notifications is not active. 95 if ( ! bp_is_active( 'notifications' ) ) { 96 return false; 97 } 98 99 // Trigger the deprecated function notice. 100 100 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_get_notification()' ); 101 101 … … 116 116 function bp_core_get_notifications_for_user( $user_id, $format = 'string' ) { 117 117 118 // Bail if notifications is not active 119 if ( ! bp_is_active( 'notifications' ) ) { 120 return false; 121 } 122 123 // Trigger the deprecated function notice 118 // Bail if notifications is not active. 119 if ( ! bp_is_active( 'notifications' ) ) { 120 return false; 121 } 122 123 // Trigger the deprecated function notice. 124 124 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_get_notifications_for_user()' ); 125 125 … … 146 146 function bp_core_delete_notifications_by_type( $user_id, $component_name, $component_action ) { 147 147 148 // Bail if notifications is not active 149 if ( ! bp_is_active( 'notifications' ) ) { 150 return false; 151 } 152 153 // Trigger the deprecated function notice 148 // Bail if notifications is not active. 149 if ( ! bp_is_active( 'notifications' ) ) { 150 return false; 151 } 152 153 // Trigger the deprecated function notice. 154 154 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notifications_by_type()' ); 155 155 … … 175 175 function bp_core_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) { 176 176 177 // Bail if notifications is not active 178 if ( ! bp_is_active( 'notifications' ) ) { 179 return false; 180 } 181 182 // Trigger the deprecated function notice 177 // Bail if notifications is not active. 178 if ( ! bp_is_active( 'notifications' ) ) { 179 return false; 180 } 181 182 // Trigger the deprecated function notice. 183 183 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notifications_by_item_id()' ); 184 184 … … 201 201 function bp_core_delete_all_notifications_by_type( $item_id, $component_name, $component_action = false, $secondary_item_id = false ) { 202 202 203 // Bail if notifications is not active 204 if ( ! bp_is_active( 'notifications' ) ) { 205 return false; 206 } 207 208 // Trigger the deprecated function notice 203 // Bail if notifications is not active. 204 if ( ! bp_is_active( 'notifications' ) ) { 205 return false; 206 } 207 208 // Trigger the deprecated function notice. 209 209 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_all_notifications_by_type()' ); 210 210 … … 215 215 * Delete all notifications for a user. 216 216 * 217 * Used when clearing out all notifications for a user, when deleted or spammed 217 * Used when clearing out all notifications for a user, when deleted or spammed. 218 218 * 219 219 * @deprecated Deprecated since BuddyPress 1.9.0. Use … … 228 228 function bp_core_delete_notifications_from_user( $user_id, $component_name, $component_action ) { 229 229 230 // Bail if notifications is not active 231 if ( ! bp_is_active( 'notifications' ) ) { 232 return false; 233 } 234 235 // Trigger the deprecated function notice 230 // Bail if notifications is not active. 231 if ( ! bp_is_active( 'notifications' ) ) { 232 return false; 233 } 234 235 // Trigger the deprecated function notice. 236 236 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notifications_from_user()' ); 237 237 … … 256 256 function bp_core_check_notification_access( $user_id, $notification_id ) { 257 257 258 // Bail if notifications is not active 259 if ( ! bp_is_active( 'notifications' ) ) { 260 return false; 261 } 262 263 // Trigger the deprecated function notice 258 // Bail if notifications is not active. 259 if ( ! bp_is_active( 'notifications' ) ) { 260 return false; 261 } 262 263 // Trigger the deprecated function notice. 264 264 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_check_notification_access()' ); 265 265
Note: See TracChangeset
for help on using the changeset viewer.