Changeset 12547
- Timestamp:
- 01/29/2020 09:43:16 PM (5 years ago)
- Location:
- trunk/src/bp-core
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-attachment-avatar.php
r11447 r12547 131 131 $original_max_width = $ui_available_width; 132 132 133 // $original_max_width has to be larger than the avatar's full width 133 // $original_max_width has to be larger than the avatar's full width. 134 134 if ( $original_max_width < bp_core_avatar_full_width() ) { 135 135 $original_max_width = bp_core_avatar_full_width(); … … 338 338 339 339 /** 340 * Build script data sfor the Uploader UI.340 * Build script data for the Uploader UI. 341 341 * 342 342 * @since 2.3.0 -
trunk/src/bp-core/classes/class-bp-attachment.php
r11602 r12547 78 78 /** 79 79 * Max file size defaults to php ini settings or, in the case of 80 * a multisite config, the root site fileupload_maxk option 80 * a multisite config, the root site fileupload_maxk option. 81 81 */ 82 82 $this->default_args['original_max_filesize'] = (int) wp_max_upload_size(); -
trunk/src/bp-core/classes/class-bp-component.php
r12495 r12547 462 462 add_action( 'bp_generate_rewrite_rules', array( $this, 'generate_rewrite_rules' ), 10 ); 463 463 464 // Register BP REST Endpoints 464 // Register BP REST Endpoints. 465 465 if ( bp_rest_in_buddypress() && bp_rest_api_is_available() ) { 466 466 add_action( 'bp_rest_api_init', array( $this, 'rest_api_init' ), 10 ); … … 579 579 $pos = $nav['position']; 580 580 581 // Reset not set pos to 1 581 // Reset not set pos to 1. 582 582 if ( $pos % 10 === 0 ) { 583 583 $not_set_pos = 1; -
trunk/src/bp-core/classes/class-bp-core-nav.php
r11797 r12547 217 217 public function delete_nav( $slug = '', $parent_slug = '' ) { 218 218 219 // Bail if slug is empty 219 // Bail if slug is empty. 220 220 if ( empty( $slug ) ) { 221 221 return false; 222 222 } 223 223 224 // We're deleting a child 224 // We're deleting a child. 225 225 if ( ! empty( $parent_slug ) ) { 226 226 227 // Validate the subnav 227 // Validate the subnav. 228 228 $sub_items = $this->get_secondary( array( 'parent_slug' => $parent_slug, 'slug' => $slug ), false ); 229 229 … … 238 238 } 239 239 240 // Delete the child 240 // Delete the child. 241 241 unset( $this->nav[ $this->object_id ][ $parent_slug . '/' . $slug ] ); 242 242 243 // Return the deleted item's screen function 243 // Return the deleted item's screen function. 244 244 return array( $sub_item->screen_function ); 245 245 246 // We're deleting a parent 246 // We're deleting a parent. 247 247 } else { 248 // Validate the nav 248 // Validate the nav. 249 249 $nav_items = $this->get_primary( array( 'slug' => $slug ), false ); 250 250 … … 268 268 $screen_functions[] = $sub_item->screen_function; 269 269 270 // Delete the child 270 // Delete the child. 271 271 unset( $this->nav[ $this->object_id ][ $nav_item->slug . '/' . $sub_item->slug ] ); 272 272 } … … 293 293 294 294 foreach ( $items as $item ) { 295 // Default position 295 // Default position. 296 296 $position = 99; 297 297 … … 300 300 } 301 301 302 // If position is already taken, move to the first next available 302 // If position is already taken, move to the first next available. 303 303 if ( isset( $sorted[ $position ] ) ) { 304 304 $sorted_keys = array_keys( $sorted ); -
trunk/src/bp-core/classes/class-bp-invitation.php
r12428 r12547 188 188 do_action_ref_array( 'bp_invitation_before_save', array( &$this ) ); 189 189 190 // Update 190 // Update. 191 191 if ( ! empty( $this->id ) ) { 192 192 $result = self::_update( $data, array( 'ID' => $this->id ), $data_format, array( '%d' ) ); 193 // Insert 193 // Insert. 194 194 } else { 195 195 $result = self::_insert( $data, $data_format ); 196 196 } 197 197 198 // Set the invitation ID if successful 198 // Set the invitation ID if successful. 199 199 if ( ! empty( $result ) && ! is_wp_error( $result ) ) { 200 200 global $wpdb; … … 215 215 do_action_ref_array( 'bp_invitation_after_save', array( &$this ) ); 216 216 217 // Return the result 217 // Return the result. 218 218 return $retval; 219 219 } … … 347 347 $where = ''; 348 348 349 // id 349 // id. 350 350 if ( false !== $args['id'] ) { 351 351 $id_in = implode( ',', wp_parse_id_list( $args['id'] ) ); … … 353 353 } 354 354 355 // user_id 355 // user_id. 356 356 if ( ! empty( $args['user_id'] ) ) { 357 357 $user_id_in = implode( ',', wp_parse_id_list( $args['user_id'] ) ); … … 365 365 } 366 366 367 // invitee_email 367 // invitee_email. 368 368 if ( ! empty( $args['invitee_email'] ) ) { 369 369 if ( ! is_array( $args['invitee_email'] ) ) { … … 382 382 } 383 383 384 // class 384 // class. 385 385 if ( ! empty( $args['class'] ) ) { 386 386 if ( ! is_array( $args['class'] ) ) { … … 399 399 } 400 400 401 // item_id 401 // item_id. 402 402 if ( ! empty( $args['item_id'] ) ) { 403 403 $item_id_in = implode( ',', wp_parse_id_list( $args['item_id'] ) ); … … 405 405 } 406 406 407 // secondary_item_id 407 // secondary_item_id. 408 408 if ( ! empty( $args['secondary_item_id'] ) ) { 409 409 $secondary_item_id_in = implode( ',', wp_parse_id_list( $args['secondary_item_id'] ) ); … … 411 411 } 412 412 413 // type413 // Type. 414 414 if ( ! empty( $args['type'] ) && 'all' !== $args['type'] ) { 415 415 if ( 'invite' == $args['type'] || 'request' == $args['type'] ) { … … 432 432 } 433 433 434 // accepted434 // Accepted. 435 435 if ( ! empty( $args['accepted'] ) && 'all' !== $args['accepted'] ) { 436 436 if ( $args['accepted'] == 'pending' ) { … … 441 441 } 442 442 443 // search_terms 443 // search_terms. 444 444 if ( ! empty( $args['search_terms'] ) ) { 445 445 $search_terms_like = '%' . bp_esc_like( $args['search_terms'] ) . '%'; … … 447 447 } 448 448 449 // Custom WHERE 449 // Custom WHERE. 450 450 if ( ! empty( $where_conditions ) ) { 451 451 $where = 'WHERE ' . implode( ' AND ', $where_conditions ); … … 468 468 protected static function get_order_by_sql( $args = array() ) { 469 469 470 // Setup local variable 470 // Setup local variable. 471 471 $conditions = array(); 472 472 $retval = ''; 473 473 474 // Order by 474 // Order by. 475 475 if ( ! empty( $args['order_by'] ) ) { 476 476 $order_by = implode( ', ', (array) $args['order_by'] ); … … 478 478 } 479 479 480 // Sort order direction 480 // Sort order direction. 481 481 if ( ! empty( $args['sort_order'] ) ) { 482 482 $sort_order = bp_esc_sql_order( $args['sort_order'] ); … … 484 484 } 485 485 486 // Custom ORDER BY 486 // Custom ORDER BY. 487 487 if ( ! empty( $conditions ) ) { 488 488 $retval = 'ORDER BY ' . implode( ' ', $conditions ); … … 505 505 global $wpdb; 506 506 507 // Setup local variable 507 // Setup local variable. 508 508 $retval = ''; 509 509 510 // Custom LIMIT 510 // Custom LIMIT. 511 511 if ( ! empty( $args['page'] ) && ! empty( $args['per_page'] ) ) { 512 512 $page = absint( $args['page'] ); … … 565 565 ); 566 566 567 // id 567 // id. 568 568 if ( ! empty( $args['id'] ) ) { 569 569 $where_clauses['data']['id'] = absint( $args['id'] ); … … 571 571 } 572 572 573 // user_id 573 // user_id. 574 574 if ( ! empty( $args['user_id'] ) ) { 575 575 $where_clauses['data']['user_id'] = absint( $args['user_id'] ); … … 577 577 } 578 578 579 // inviter_id 579 // inviter_id. 580 580 if ( ! empty( $args['inviter_id'] ) ) { 581 581 $where_clauses['data']['inviter_id'] = absint( $args['inviter_id'] ); … … 583 583 } 584 584 585 // invitee_email 585 // invitee_email. 586 586 if ( ! empty( $args['invitee_email'] ) ) { 587 587 $where_clauses['data']['invitee_email'] = $args['invitee_email']; … … 589 589 } 590 590 591 // class 591 // class. 592 592 if ( ! empty( $args['class'] ) ) { 593 593 $where_clauses['data']['class'] = $args['class']; … … 595 595 } 596 596 597 // item_id 597 // item_id. 598 598 if ( ! empty( $args['item_id'] ) ) { 599 599 $where_clauses['data']['item_id'] = absint( $args['item_id'] ); … … 601 601 } 602 602 603 // secondary_item_id 603 // secondary_item_id. 604 604 if ( ! empty( $args['secondary_item_id'] ) ) { 605 605 $where_clauses['data']['secondary_item_id'] = absint( $args['secondary_item_id'] ); … … 607 607 } 608 608 609 // type 609 // type. 610 610 if ( ! empty( $args['type'] ) && 'all' !== $args['type'] ) { 611 611 if ( 'invite' == $args['type'] || 'request' == $args['type'] ) { … … 630 630 } 631 631 632 // accepted 632 // accepted. 633 633 if ( ! empty( $args['accepted'] ) && 'all' !== $args['accepted'] ) { 634 634 if ( $args['accepted'] == 'pending' ) { … … 700 700 * } 701 701 * 702 * @return array BP_Invitation objects | IDs of found invit .702 * @return array BP_Invitation objects | IDs of found invite. 703 703 */ 704 704 public static function get( $args = array() ) { … … 706 706 $invites_table_name = BP_Invitation_Manager::get_table_name(); 707 707 708 // Parse the arguments 708 // Parse the arguments. 709 709 $r = bp_parse_args( $args, array( 710 710 'id' => false, … … 745 745 } 746 746 747 // WHERE 747 // WHERE. 748 748 $sql['where'] = self::get_where_sql( array( 749 749 'id' => $r['id'], … … 760 760 ) ); 761 761 762 // ORDER BY 762 // ORDER BY. 763 763 $sql['orderby'] = self::get_order_by_sql( array( 764 764 'order_by' => $r['order_by'], … … 766 766 ) ); 767 767 768 // LIMIT %d, %d 768 // LIMIT %d, %d. 769 769 $sql['pagination'] = self::get_paged_sql( array( 770 770 'page' => $r['page'], … … 977 977 } 978 978 979 // Values to be updated 979 // Values to be updated. 980 980 $update_args = array( 981 981 'invite_sent' => 'sent', 982 982 ); 983 983 984 // WHERE clauses 984 // WHERE clauses. 985 985 $where_args = array( 986 986 'id' => $id, … … 1000 1000 public static function mark_sent_by_data( $args ) { 1001 1001 1002 // Values to be updated 1002 // Values to be updated. 1003 1003 $update_args = array( 1004 1004 'invite_sent' => 'sent', … … 1023 1023 } 1024 1024 1025 // Values to be updated 1025 // Values to be updated. 1026 1026 $update_args = array( 1027 1027 'accepted' => 'accepted', 1028 1028 ); 1029 1029 1030 // WHERE clauses 1030 // WHERE clauses. 1031 1031 $where_args = array( 1032 1032 'id' => $id, … … 1046 1046 public static function mark_accepted_by_data( $args ) { 1047 1047 1048 // Values to be updated 1048 // Values to be updated. 1049 1049 $update_args = array( 1050 1050 'accepted' => 'accepted', -
trunk/src/bp-core/classes/class-bp-phpmailer.php
r11536 r12547 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 -
trunk/src/bp-core/classes/class-bp-recursive-query.php
r10417 r12547 85 85 $relation = $query['relation']; 86 86 } elseif ( is_array( $clause ) ) { 87 // This is a first-order clause 87 // This is a first-order clause. 88 88 if ( $this->is_first_order_clause( $clause ) ) { 89 89 $clause_sql = $this->get_sql_for_clause( $clause, $query ); … … 99 99 100 100 $sql_chunks['join'] = array_merge( $sql_chunks['join'], $clause_sql['join'] ); 101 // This is a subquery 101 // This is a subquery. 102 102 } else { 103 103 $clause_sql = $this->get_sql_for_query( $clause, $depth + 1 ); … … 109 109 } 110 110 111 // Filter empties 111 // Filter empties. 112 112 $sql_chunks['join'] = array_filter( $sql_chunks['join'] ); 113 113 $sql_chunks['where'] = array_filter( $sql_chunks['where'] ); -
trunk/src/bp-core/classes/class-bp-user-query.php
r12329 r12547 184 184 do_action_ref_array( 'bp_pre_user_query_construct', array( &$this ) ); 185 185 186 // Get user ids 186 // Get user ids. 187 187 // If the user_ids param is present, we skip the query. 188 188 if ( false !== $this->query_vars['user_ids'] ) { -
trunk/src/bp-core/deprecated/1.2.php
r11447 r12547 23 23 24 24 $defaults = array( 25 'max' => false, // Maximum number of results to return26 'page' => 1, // page 1 without a per_page will result in no pagination.27 'per_page' => false, // results per page28 'sort' => 'DESC', // sort ASC or DESC29 'display_comments' => false, // false for no comments. 'stream' for within stream display, 'threaded' for below each activity item25 'max' => false, // Maximum number of results to return. 26 'page' => 1, // Page 1 without a per_page will result in no pagination. 27 'per_page' => false, // Results per page. 28 'sort' => 'DESC', // Sort ASC or DESC. 29 'display_comments' => false, // False for no comments. 'stream' for within stream display, 'threaded' for below each activity item. 30 30 31 'search_terms' => false, // Pass search terms as a string32 'show_hidden' => false,// Show activity items that are hidden site-wide?31 'search_terms' => false, // Pass search terms as a string. 32 'show_hidden' => false, // Show activity items that are hidden site-wide? 33 33 34 34 /** 35 35 * Pass filters as an array: 36 36 * array( 37 * 'user_id' => false, // user_id to filter on38 * 'object' => false, // object to filter on e.g. groups, profile, status, friends39 * 'action' => false, // action to filter on e.g. new_wire_post, new_forum_post, profile_updated40 * 'primary_id' => false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.41 * 'secondary_id' => false, // secondary object ID to filter on e.g. a post_id37 * 'user_id' => false, // user_id to filter on. 38 * 'object' => false, // Object to filter on e.g. groups, profile, status, friends. 39 * 'action' => false, // Action to filter on e.g. new_wire_post, new_forum_post, profile_updated. 40 * 'primary_id' => false, // Object ID to filter on e.g. a group_id or forum_id or blog_id etc. 41 * 'secondary_id' => false, // Secondary object ID to filter on e.g. a post_id. 42 42 * ); 43 43 */ -
trunk/src/bp-core/deprecated/1.5.php
r11763 r12547 8 8 */ 9 9 10 // Exit if accessed directly 10 // Exit if accessed directly. 11 11 defined( 'ABSPATH' ) || exit; 12 12 … … 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 … … 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 ); … … 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; -
trunk/src/bp-core/deprecated/1.6.php
r11773 r12547 8 8 */ 9 9 10 // Exit if accessed directly 10 // Exit if accessed directly. 11 11 defined( 'ABSPATH' ) || exit; 12 12 … … 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', … … 234 234 'messages_filter', 235 235 236 // Activity 236 // Activity. 237 237 'activity_widget_filter', 238 238 'activity_get_older_updates', … … 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', … … 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() { -
trunk/src/bp-core/deprecated/1.7.php
r11447 r12547 8 8 */ 9 9 10 // Exit if accessed directly 10 // Exit if accessed directly. 11 11 defined( 'ABSPATH' ) || exit; 12 12 … … 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() ) { -
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 -
trunk/src/bp-core/deprecated/2.0.php
r10108 r12547 8 8 */ 9 9 10 // Exit if accessed directly 10 // Exit if accessed directly. 11 11 defined( 'ABSPATH' ) || exit; 12 12 -
trunk/src/bp-core/deprecated/2.1.php
r12401 r12547 8 8 */ 9 9 10 // Exit if accessed directly 10 // Exit if accessed directly. 11 11 defined( 'ABSPATH' ) || exit; 12 12 … … 190 190 echo '<li class="bp-login no-arrow"><a href="' . wp_login_url() . '">' . __( 'Log In', 'buddypress' ) . '</a></li>'; 191 191 192 // Show "Sign Up" link if user registrations are allowed 192 // Show "Sign Up" link if user registrations are allowed. 193 193 if ( bp_get_signup_allowed() ) { 194 194 echo '<li class="bp-signup no-arrow"><a href="' . bp_get_signup_page() . '">' . __( 'Sign Up', 'buddypress' ) . '</a></li>'; … … 214 214 echo '<ul>'; 215 215 216 // Loop through each navigation item 216 // Loop through each navigation item. 217 217 $counter = 0; 218 218 foreach( (array) $bp->bp_nav as $nav_item ) { … … 327 327 $min = bp_core_get_minified_asset_suffix(); 328 328 329 if ( file_exists( get_stylesheet_directory() . '/_inc/css/adminbar.css' ) ) { // Backwards compatibility 329 if ( file_exists( get_stylesheet_directory() . '/_inc/css/adminbar.css' ) ) { // Backwards compatibility. 330 330 $stylesheet = get_stylesheet_directory_uri() . '/_inc/css/adminbar.css'; 331 331 } else { … … 356 356 } 357 357 358 // Only group admins and site admins can see this menu 358 // Only group admins and site admins can see this menu. 359 359 if ( !current_user_can( 'edit_users' ) && !bp_current_user_can( 'bp_moderate' ) && !bp_is_item_admin() ) { 360 360 return false; … … 407 407 function bp_adminbar_notifications_menu() { 408 408 409 // Bail if notifications is not active 409 // Bail if notifications is not active. 410 410 if ( ! bp_is_active( 'notifications' ) ) { 411 411 return false; … … 424 424 global $wpdb; 425 425 426 // Only for multisite 426 // Only for multisite. 427 427 if ( ! is_multisite() ) { 428 428 return false; 429 429 } 430 430 431 // Hide on root blog 431 // Hide on root blog. 432 432 if ( bp_is_root_blog( $wpdb->blogid ) || ! bp_is_active( 'blogs' ) ) { 433 433 return false; … … 438 438 439 439 if ( !empty( $authors ) ) { 440 // This is a blog, render a menu with links to all authors 440 // This is a blog, render a menu with links to all authors. 441 441 echo '<li id="bp-adminbar-authors-menu"><a href="/">'; 442 442 _e('Blog Authors', 'buddypress'); … … 479 479 function bp_members_adminbar_admin_menu() { 480 480 481 // Only show if viewing a user 481 // Only show if viewing a user. 482 482 if ( ! bp_displayed_user_id() ) { 483 483 return false; 484 484 } 485 485 486 // Don't show this menu to non site admins or if you're viewing your own profile 486 // Don't show this menu to non site admins or if you're viewing your own profile. 487 487 if ( !current_user_can( 'edit_users' ) || bp_is_my_profile() ) { 488 488 return false; -
trunk/src/bp-core/deprecated/2.2.php
r10108 r12547 8 8 */ 9 9 10 // Exit if accessed directly 10 // Exit if accessed directly. 11 11 defined( 'ABSPATH' ) || exit; 12 12 … … 23 23 * @deprecated 2.2.0 24 24 * 25 * @todo Support untrashing better 25 * @todo Support untrashing better. 26 26 * 27 27 * @param string $new_status New status for the post. … … 97 97 98 98 /** 99 * Add 'bp' to global group of network wide ca chable objects.99 * Add 'bp' to global group of network wide catchable objects. 100 100 * 101 101 * @since 1.1.0 -
trunk/src/bp-core/deprecated/2.5.php
r11447 r12547 80 80 81 81 $value = array_shift( $original_value ); 82 $recipient_name = $value->get_name(); // Value - name 83 $value = $value->get_address(); // Key - email 82 $recipient_name = $value->get_name(); // Value - name. 83 $value = $value->get_address(); // Key - email. 84 84 } 85 85
Note: See TracChangeset
for help on using the changeset viewer.