Ticket #8228: 8228.patch
File 8228.patch, 9.9 KB (added by , 5 years ago) |
---|
-
src/bp-core/deprecated/1.5.php
7 7 * @deprecated Since 1.5.0 8 8 */ 9 9 10 // Exit if accessed directly 10 // Exit if accessed directly. 11 11 defined( 'ABSPATH' ) || exit; 12 12 13 13 /** Loader ********************************************************************/ … … 74 74 75 75 /** 76 76 * In BuddyPress 1.1 - 1.2.x, this function provided a better version of add_menu_page() 77 * that allowed positioning of menus. Deprecated in 1.5 in favo ur of a WP core function.77 * that allowed positioning of menus. Deprecated in 1.5 in favor of a WP core function. 78 78 * 79 79 * @deprecated 1.5.0 80 80 * @deprecated Use add_menu_page(). … … 341 341 if ( !groups_is_user_member( $receiver_user_id, $group_id ) ) 342 342 continue; 343 343 344 // Now email the user with the contents of the message (if they have enabled email notifications) 344 // Now email the user with the contents of the message (if they have enabled email notifications). 345 345 if ( 'no' != bp_get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) { 346 346 $poster_name = bp_core_get_user_displayname( $poster_user_id ); 347 347 … … 352 352 $poster_name = stripslashes( $poster_name ); 353 353 $content = bp_groups_filter_kses( stripslashes( $content ) ); 354 354 355 // Set up and send the message 355 // Set up and send the message. 356 356 $ud = bp_core_get_core_userdata( $receiver_user_id ); 357 357 $to = $ud->user_email; 358 358 $subject = bp_get_email_subject( array( 'text' => sprintf( __( '%1$s mentioned you in the group "%2$s"', 'buddypress' ), $poster_name, $group->name ) ) ); -
src/bp-core/deprecated/1.6.php
7 7 * @deprecated 1.6.0 8 8 */ 9 9 10 // Exit if accessed directly 10 // Exit if accessed directly. 11 11 defined( 'ABSPATH' ) || exit; 12 12 13 13 /** Toolbar functions *********************************************************/ … … 224 224 function bp_die_legacy_ajax_callbacks() { 225 225 226 226 // This is a list of the BP wp_ajax_ hook suffixes whose associated functions did 227 // not die properly before BP 1.6 227 // not die properly before BP 1.6. 228 228 $actions = array( 229 // Directory template loaders 229 // Directory template loaders. 230 230 'members_filter', 231 231 'groups_filter', 232 232 'blogs_filter', … … 233 233 'forums_filter', 234 234 'messages_filter', 235 235 236 // Activity 236 // Activity. 237 237 'activity_widget_filter', 238 238 'activity_get_older_updates', 239 239 'post_update', … … 245 245 'activity_mark_fav', 246 246 'activity_mark_unfav', 247 247 248 // Groups 248 // Groups. 249 249 'groups_invite_user', 250 250 'joinleave_group', 251 251 252 // Members 252 // Members. 253 253 'addremove_friend', 254 254 'accept_friendship', 255 255 'reject_friendship', 256 256 257 // Messages 257 // Messages. 258 258 'messages_close_notice', 259 259 'messages_send_reply', 260 260 'messages_markunread', … … 263 263 'messages_autocomplete_results' 264 264 ); 265 265 266 // For each of the problematic hooks, exit at the very end of execution 266 // For each of the problematic hooks, exit at the very end of execution. 267 267 foreach( $actions as $action ) { 268 268 add_action( 'wp_ajax_' . $action, function() { 269 269 exit; -
src/bp-core/deprecated/1.7.php
7 7 * @deprecated Since 1.7.0 8 8 */ 9 9 10 // Exit if accessed directly 10 // Exit if accessed directly. 11 11 defined( 'ABSPATH' ) || exit; 12 12 13 13 /** … … 153 153 bp_core_add_illegal_names(); 154 154 } 155 155 156 // Update and remove the message threads table if it exists 156 // Update and remove the message threads table if it exists. 157 157 if ( $wpdb->get_var( "SHOW TABLES LIKE '%{$bp_prefix}bp_messages_threads%'" ) ) { 158 158 if ( BP_Messages_Thread::update_tables() ) { 159 159 $wpdb->query( "DROP TABLE {$bp_prefix}bp_messages_threads" ); -
src/bp-core/deprecated/1.9.php
9 9 * @subpackage MembersNotifications 10 10 */ 11 11 12 // Exit if accessed directly 12 // Exit if accessed directly. 13 13 defined( 'ABSPATH' ) || exit; 14 14 15 15 /** … … 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 ) { 32 32 33 // Bail if notifications is not active 33 // Bail if notifications is not active. 34 34 if ( ! bp_is_active( 'notifications' ) ) { 35 35 return false; 36 36 } 37 37 38 // Trigger the deprecated function notice 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, 49 49 'user_id' => $user_id, … … 68 68 */ 69 69 function bp_core_delete_notification( $id ) { 70 70 71 // Bail if notifications is not active 71 // Bail if notifications is not active. 72 72 if ( ! bp_is_active( 'notifications' ) ) { 73 73 return false; 74 74 } 75 75 76 // Trigger the deprecated function notice 76 // Trigger the deprecated function notice. 77 77 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notification()' ); 78 78 79 79 return BP_Notifications_Notification::delete_by_id( $id ); … … 91 91 */ 92 92 function bp_core_get_notification( $id ) { 93 93 94 // Bail if notifications is not active 94 // Bail if notifications is not active. 95 95 if ( ! bp_is_active( 'notifications' ) ) { 96 96 return false; 97 97 } 98 98 99 // Trigger the deprecated function notice 99 // Trigger the deprecated function notice. 100 100 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_get_notification()' ); 101 101 102 102 return bp_notifications_get_notification( $id ); … … 115 115 */ 116 116 function bp_core_get_notifications_for_user( $user_id, $format = 'string' ) { 117 117 118 // Bail if notifications is not active 118 // Bail if notifications is not active. 119 119 if ( ! bp_is_active( 'notifications' ) ) { 120 120 return false; 121 121 } 122 122 123 // Trigger the deprecated function notice 123 // Trigger the deprecated function notice. 124 124 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_get_notifications_for_user()' ); 125 125 126 126 return bp_notifications_get_notifications_for_user( $user_id, $format ); … … 145 145 */ 146 146 function bp_core_delete_notifications_by_type( $user_id, $component_name, $component_action ) { 147 147 148 // Bail if notifications is not active 148 // Bail if notifications is not active. 149 149 if ( ! bp_is_active( 'notifications' ) ) { 150 150 return false; 151 151 } 152 152 153 // Trigger the deprecated function notice 153 // Trigger the deprecated function notice. 154 154 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notifications_by_type()' ); 155 155 156 156 return bp_notifications_delete_notifications_by_type( $user_id, $component_name, $component_action ); … … 174 174 */ 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 177 // Bail if notifications is not active. 178 178 if ( ! bp_is_active( 'notifications' ) ) { 179 179 return false; 180 180 } 181 181 182 // Trigger the deprecated function notice 182 // Trigger the deprecated function notice. 183 183 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notifications_by_item_id()' ); 184 184 185 185 return bp_notifications_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id ); … … 200 200 */ 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 203 // Bail if notifications is not active. 204 204 if ( ! bp_is_active( 'notifications' ) ) { 205 205 return false; 206 206 } 207 207 208 // Trigger the deprecated function notice 208 // Trigger the deprecated function notice. 209 209 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_all_notifications_by_type()' ); 210 210 211 211 bp_notifications_delete_all_notifications_by_type( $item_id, $component_name, $component_action, $secondary_item_id ); … … 214 214 /** 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 220 220 * bp_notifications_delete_notifications_from_user() instead. … … 227 227 */ 228 228 function bp_core_delete_notifications_from_user( $user_id, $component_name, $component_action ) { 229 229 230 // Bail if notifications is not active 230 // Bail if notifications is not active. 231 231 if ( ! bp_is_active( 'notifications' ) ) { 232 232 return false; 233 233 } 234 234 235 // Trigger the deprecated function notice 235 // Trigger the deprecated function notice. 236 236 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notifications_from_user()' ); 237 237 238 238 return bp_notifications_delete_notifications_from_user( $user_id, $component_name, $component_action ); … … 255 255 */ 256 256 function bp_core_check_notification_access( $user_id, $notification_id ) { 257 257 258 // Bail if notifications is not active 258 // Bail if notifications is not active. 259 259 if ( ! bp_is_active( 'notifications' ) ) { 260 260 return false; 261 261 } 262 262 263 // Trigger the deprecated function notice 263 // Trigger the deprecated function notice. 264 264 _deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_check_notification_access()' ); 265 265 266 266 return bp_notifications_check_notification_access( $user_id, $notification_id );