Changeset 11805
- Timestamp:
- 01/10/2018 12:49:30 PM (7 years ago)
- Location:
- trunk/src/bp-groups
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-activity.php
r11763 r11805 340 340 } 341 341 342 $r = wp_parse_args( $args, array(342 $r = bp_parse_args( $args, array( 343 343 'id' => false, 344 344 'user_id' => bp_loggedin_user_id(), … … 353 353 'hide_sitewide' => $hide_sitewide, 354 354 'error_type' => 'bool' 355 ) );355 ), 'groups_record_activity' ); 356 356 357 357 return bp_activity_add( $r ); -
trunk/src/bp-groups/bp-groups-functions.php
r11792 r11805 49 49 */ 50 50 if ( ! is_numeric( $group_id ) ) { 51 $r = wp_parse_args( $group_id, array(51 $r = bp_parse_args( $group_id, array( 52 52 'group_id' => false, 53 53 'load_users' => false, 54 54 'populate_extras' => false, 55 ) );55 ), 'groups_get_group' ); 56 56 57 57 $group_id = $r['group_id']; … … 98 98 function groups_create_group( $args = '' ) { 99 99 100 $ defaults =array(100 $args = bp_parse_args( $args, array( 101 101 'group_id' => 0, 102 102 'creator_id' => 0, … … 108 108 'enable_forum' => null, 109 109 'date_created' => null 110 ); 111 112 $args = wp_parse_args( $args, $defaults ); 110 ), 'groups_create_group' ); 111 113 112 extract( $args, EXTR_SKIP ); 114 113 … … 256 255 } 257 256 258 $r = wp_parse_args( $args, array(257 $r = bp_parse_args( $args, array( 259 258 'group_id' => bp_get_current_group_id(), 260 259 'name' => null, … … 262 261 'description' => null, 263 262 'notify_members' => false, 264 ) );263 ), 'groups_edit_base_group_details' ); 265 264 266 265 if ( ! $r['group_id'] ) { … … 682 681 } 683 682 684 $r = wp_parse_args( $args, array(683 $r = bp_parse_args( $args, array( 685 684 'group_id' => bp_get_current_group_id(), 686 685 'per_page' => false, … … 692 691 'search_terms' => false, 693 692 'type' => 'last_joined', 694 ) );693 ), 'groups_get_group_members' ); 695 694 696 695 // For legacy users. Use of BP_Groups_Member::get_all_for_group() is deprecated. … … 1266 1265 $bp = buddypress(); 1267 1266 1268 $ defaults =array(1267 $r = bp_parse_args( $args, array( 1269 1268 'content' => false, 1270 1269 'user_id' => bp_loggedin_user_id(), 1271 1270 'group_id' => 0, 1272 1271 'error_type' => 'bool' 1273 ); 1274 1275 $r = wp_parse_args( $args, $defaults ); 1272 ), 'groups_post_update' ); 1276 1273 extract( $r, EXTR_SKIP ); 1277 1274 … … 1395 1392 function groups_invite_user( $args = '' ) { 1396 1393 1397 $ defaults =array(1394 $args = bp_parse_args( $args, array( 1398 1395 'user_id' => false, 1399 1396 'group_id' => false, … … 1401 1398 'date_modified' => bp_core_current_time(), 1402 1399 'is_confirmed' => 0 1403 ); 1404 1405 $args = wp_parse_args( $args, $defaults ); 1400 ), 'groups_invite_user' ); 1406 1401 extract( $args, EXTR_SKIP ); 1407 1402 -
trunk/src/bp-groups/bp-groups-template.php
r11782 r11805 922 922 } 923 923 924 $r = wp_parse_args( $args, array(924 $r = bp_parse_args( $args, array( 925 925 'relative' => true, 926 ) );926 ), 'group_last_active' ); 927 927 928 928 $last_active = $group->last_activity; … … 1350 1350 global $groups_template; 1351 1351 1352 $r = wp_parse_args( $args, array(1352 $r = bp_parse_args( $args, array( 1353 1353 'relative' => true, 1354 ) );1354 ), 'group_date_created' ); 1355 1355 1356 1356 if ( empty( $group ) ) { … … 1558 1558 } 1559 1559 1560 $ defaults =array(1560 $r = bp_parse_args( $args, array( 1561 1561 'type' => 'full', 1562 1562 'width' => false, … … 1565 1565 'id' => false, 1566 1566 'alt' => sprintf( __( 'Group creator profile photo of %s', 'buddypress' ), bp_core_get_user_displayname( $group->creator_id ) ) 1567 ); 1568 1569 $r = wp_parse_args( $args, $defaults ); 1567 ), 'group_creator_avatar' ); 1570 1568 extract( $r, EXTR_SKIP ); 1571 1569 … … 2445 2443 global $members_template, $groups_template; 2446 2444 2447 $ defaults =array(2445 $r = bp_parse_args( $args, array( 2448 2446 'user_id' => $members_template->member->user_id, 2449 2447 'group' => &$groups_template->group 2450 ); 2451 2452 $r = wp_parse_args( $args, $defaults ); 2448 ), 'group_member_promote_mod_link' ); 2453 2449 extract( $r, EXTR_SKIP ); 2454 2450 … … 2488 2484 global $members_template, $groups_template; 2489 2485 2490 $ defaults =array(2486 $r = bp_parse_args( $args, array( 2491 2487 'user_id' => !empty( $members_template->member->user_id ) ? $members_template->member->user_id : false, 2492 2488 'group' => &$groups_template->group 2493 ); 2494 2495 $r = wp_parse_args( $args, $defaults ); 2489 ), 'group_member_promote_admin_link' ); 2496 2490 extract( $r, EXTR_SKIP ); 2497 2491 … … 3697 3691 } 3698 3692 3699 $r = wp_parse_args( $args, array(3693 $r = bp_parse_args( $args, array( 3700 3694 'group_id' => bp_get_current_group_id(), 3701 3695 'page' => 1, … … 3708 3702 'search_terms' => $search_terms_default, 3709 3703 'type' => 'last_joined', 3710 ) );3704 ), 'group_has_members' ); 3711 3705 3712 3706 /* … … 4083 4077 global $members_template; 4084 4078 4085 $r = wp_parse_args( $args, array(4079 $r = bp_parse_args( $args, array( 4086 4080 'relative' => true, 4087 ) );4081 ), 'group_member_joined_since' ); 4088 4082 4089 4083 // We do not want relative time, so return now. … … 5022 5016 5023 5017 // Parse arguments. 5024 $r = wp_parse_args( $args, array(5018 $r = bp_parse_args( $args, array( 5025 5019 'user_id' => bp_loggedin_user_id(), 5026 5020 'group_id' => false, 5027 5021 'separator' => 'li' 5028 ) );5022 ), 'group_invite_friend_list' ); 5029 5023 5030 5024 // No group passed, so look for new or current group ID's. … … 5374 5368 global $requests_template; 5375 5369 5376 $ defaults =array(5370 $r = bp_parse_args( $args, array( 5377 5371 'group_id' => bp_get_current_group_id(), 5378 5372 'per_page' => 10, 5379 5373 'page' => 1, 5380 5374 'max' => false 5381 ); 5382 5383 $r = wp_parse_args( $args, $defaults ); 5375 ), 'group_has_membership_requests' ); 5384 5376 5385 5377 $requests_template = new BP_Groups_Membership_Requests_Template( $r ); … … 5623 5615 global $invites_template, $group_id; 5624 5616 5625 $r = wp_parse_args( $args, array(5617 $r = bp_parse_args( $args, array( 5626 5618 'group_id' => false, 5627 5619 'user_id' => bp_loggedin_user_id(), 5628 5620 'per_page' => false, 5629 5621 'page' => 1, 5630 ) );5622 ), 'group_has_invites' ); 5631 5623 5632 5624 if ( empty( $r['group_id'] ) ) { -
trunk/src/bp-groups/classes/class-bp-group-member-query.php
r11792 r11805 88 88 // values passed to the constructor will, as usual, override 89 89 // these defaults). 90 $this->query_vars = wp_parse_args( $this->query_vars, array(90 $this->query_vars = bp_parse_args( $this->query_vars, array( 91 91 'group_id' => 0, 92 92 'group_role' => array( 'member' ), … … 95 95 'inviter_id' => null, 96 96 'type' => 'last_joined', 97 ) );97 ), 'bp_group_member_query_get_include_ids' ); 98 98 99 99 $group_member_ids = $this->get_group_member_ids(); -
trunk/src/bp-groups/classes/class-bp-groups-group-members-template.php
r11363 r11805 112 112 } 113 113 114 $r = wp_parse_args( $args, array(114 $r = bp_parse_args( $args, array( 115 115 'group_id' => bp_get_current_group_id(), 116 116 'page' => 1, … … 124 124 'search_terms' => false, 125 125 'type' => 'last_joined', 126 ) );126 ), 'group_members_template' ); 127 127 128 128 $this->pag_arg = sanitize_key( $r['page_arg'] ); -
trunk/src/bp-groups/classes/class-bp-groups-group.php
r11763 r11805 1085 1085 ); 1086 1086 1087 $r = wp_parse_args( $args, $defaults);1087 $r = bp_parse_args( $args, $defaults, 'bp_groups_group_get' ); 1088 1088 1089 1089 $bp = buddypress(); -
trunk/src/bp-groups/classes/class-bp-groups-invite-template.php
r11606 r11805 92 92 } 93 93 94 $r = wp_parse_args( $args, array(94 $r = bp_parse_args( $args, array( 95 95 'page' => 1, 96 96 'per_page' => 10, … … 98 98 'user_id' => bp_loggedin_user_id(), 99 99 'group_id' => bp_get_current_group_id(), 100 ) );100 ), 'groups_invite_template' ); 101 101 102 102 $this->pag_arg = sanitize_key( $r['page_arg'] ); -
trunk/src/bp-groups/classes/class-bp-groups-membership-requests-template.php
r11363 r11805 100 100 } 101 101 102 $r = wp_parse_args( $args, array(102 $r = bp_parse_args( $args, array( 103 103 'page' => 1, 104 104 'per_page' => 10, … … 107 107 'type' => 'first_joined', 108 108 'group_id' => bp_get_current_group_id(), 109 ) );109 ), 'groups_membership_requests_template' ); 110 110 111 111 $this->pag_arg = sanitize_key( $r['page_arg'] ); -
trunk/src/bp-groups/classes/class-bp-groups-template.php
r11383 r11805 176 176 ); 177 177 178 $r = wp_parse_args( $args, $defaults);178 $r = bp_parse_args( $args, $defaults, 'groups_template' ); 179 179 extract( $r ); 180 180 -
trunk/src/bp-groups/classes/class-bp-groups-widget.php
r11564 r11805 207 207 'link_title' => false 208 208 ); 209 $instance = wp_parse_args( (array) $instance, $defaults);209 $instance = bp_parse_args( (array) $instance, $defaults, 'groups_widget_form' ); 210 210 211 211 $title = strip_tags( $instance['title'] );
Note: See TracChangeset
for help on using the changeset viewer.