Changeset 11447 for trunk/src/bp-core/deprecated/1.9.php
- Timestamp:
- 03/04/2017 06:26:55 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/deprecated/1.9.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/deprecated/1.9.php
r10108 r11447 20 20 * 21 21 * @since 1.0.0 22 * @param string $item_id23 * @param int $user_id24 * @param string $component_name25 * @param string $component_action26 * @param string$secondary_item_id27 * @param string $date_notified28 * @param int $is_new29 * @return boolean True on success, false on failure.22 * @param string $item_id 23 * @param int $user_id 24 * @param string $component_name 25 * @param string $component_action 26 * @param int $secondary_item_id 27 * @param false|string $date_notified 28 * @param int $is_new 29 * @return int|boolean True on success, false on failure. 30 30 */ 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 ) { … … 63 63 * 64 64 * @since 1.0.0 65 * 65 66 * @param int $id ID of notification. 66 * @return booleanTrue on success, false on failure.67 * @return false|integer True on success, false on failure. 67 68 */ 68 69 function bp_core_delete_notification( $id ) { … … 87 88 * @since 1.0.0 88 89 * @param int $id ID of notification. 89 * @return BP_Core_Notification90 * @return false|BP_Core_Notification 90 91 */ 91 92 function bp_core_get_notification( $id ) { … … 141 142 * @param string $component_name 142 143 * @param string $component_action 143 * @return booleanTrue on success, false on failure.144 * @return false|int True on success, false on failure. 144 145 */ 145 146 function bp_core_delete_notifications_by_type( $user_id, $component_name, $component_action ) { … … 166 167 * 167 168 * @since 1.0.0 169 * 168 170 * @param int $user_id 169 171 * @param string $component_name 170 172 * @param string $component_action 173 * @return false|int True on success, false on failure. 174 */ 175 function bp_core_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) { 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 183 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notifications_by_item_id()' ); 184 185 return bp_notifications_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id ); 186 } 187 188 /** 189 * Delete all notifications for by type. 190 * 191 * @deprecated Deprecated since BuddyPress 1.9.0. Use 192 * bp_notifications_delete_all_notifications_by_type() instead. 193 * 194 * @since 1.0.0 195 * 196 * @param int $user_id 197 * @param string $component_name 198 * @param false|string $component_action 171 199 * @return boolean True on success, false on failure. 172 200 */ 173 function bp_core_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) { 174 175 // Bail if notifications is not active 176 if ( ! bp_is_active( 'notifications' ) ) { 177 return false; 178 } 179 180 // Trigger the deprecated function notice 181 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notifications_by_item_id()' ); 182 183 return bp_notifications_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id ); 184 } 185 186 /** 187 * Delete all notifications for by type. 188 * 189 * @deprecated Deprecated since BuddyPress 1.9.0. Use 190 * bp_notifications_delete_all_notifications_by_type() instead. 201 function bp_core_delete_all_notifications_by_type( $item_id, $component_name, $component_action = false, $secondary_item_id = false ) { 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 209 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_all_notifications_by_type()' ); 210 211 bp_notifications_delete_all_notifications_by_type( $item_id, $component_name, $component_action, $secondary_item_id ); 212 } 213 214 /** 215 * Delete all notifications for a user. 216 * 217 * Used when clearing out all notifications for a user, when deleted or spammed 218 * 219 * @deprecated Deprecated since BuddyPress 1.9.0. Use 220 * bp_notifications_delete_notifications_from_user() instead. 191 221 * 192 222 * @since 1.0.0 … … 194 224 * @param string $component_name 195 225 * @param string $component_action 196 * @return boolean True on success, false on failure. 197 */ 198 function bp_core_delete_all_notifications_by_type( $item_id, $component_name, $component_action = false, $secondary_item_id = false ) { 199 200 // Bail if notifications is not active 201 if ( ! bp_is_active( 'notifications' ) ) { 202 return false; 203 } 204 205 // Trigger the deprecated function notice 206 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_all_notifications_by_type()' ); 207 208 bp_notifications_delete_all_notifications_by_type( $item_id, $component_name, $component_action, $secondary_item_id ); 209 } 210 211 /** 212 * Delete all notifications for a user. 213 * 214 * Used when clearing out all notifications for a user, when deleted or spammed 215 * 216 * @deprecated Deprecated since BuddyPress 1.9.0. Use 217 * bp_notifications_delete_notifications_from_user() instead. 218 * 219 * @since 1.0.0 220 * @param int $user_id 221 * @param string $component_name 222 * @param string $component_action 223 * @return boolean True on success, false on failure. 226 * @return false|int True on success, false on failure. 224 227 */ 225 228 function bp_core_delete_notifications_from_user( $user_id, $component_name, $component_action ) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)