Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/12/2021 08:43:39 PM (4 years ago)
Author:
espellcaste
Message:

Update all references from wp_parse_args to bp_parse_args.

Also, add WPCS improvements to align bp_parse_args correctly.

Props imath
Fixes #8564

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-activity.php

    r12629 r13108  
    522522    }
    523523
    524     $r = bp_parse_args( $args, array(
    525         'id'                => false,
    526         'user_id'           => bp_loggedin_user_id(),
    527         'action'            => '',
    528         'content'           => '',
    529         'primary_link'      => '',
    530         'component'         => buddypress()->groups->id,
    531         'type'              => false,
    532         'item_id'           => false,
    533         'secondary_item_id' => false,
    534         'recorded_time'     => bp_core_current_time(),
    535         'hide_sitewide'     => $hide_sitewide,
    536         'error_type'        => 'bool'
    537     ), 'groups_record_activity' );
     524    $r = bp_parse_args(
     525        $args,
     526        array(
     527            'id'                => false,
     528            'user_id'           => bp_loggedin_user_id(),
     529            'action'            => '',
     530            'content'           => '',
     531            'primary_link'      => '',
     532            'component'         => buddypress()->groups->id,
     533            'type'              => false,
     534            'item_id'           => false,
     535            'secondary_item_id' => false,
     536            'recorded_time'     => bp_core_current_time(),
     537            'hide_sitewide'     => $hide_sitewide,
     538            'error_type'        => 'bool',
     539        ),
     540        'groups_record_activity'
     541    );
    538542
    539543    return bp_activity_add( $r );
     
    559563    $bp = buddypress();
    560564
    561     $r = bp_parse_args( $args, array(
    562         'content'    => false,
    563         'user_id'    => bp_loggedin_user_id(),
    564         'group_id'   => 0,
    565         'error_type' => 'bool'
    566     ), 'groups_post_update' );
     565    $r = bp_parse_args(
     566        $args,
     567        array(
     568            'content'    => false,
     569            'user_id'    => bp_loggedin_user_id(),
     570            'group_id'   => 0,
     571            'error_type' => 'bool',
     572        ),
     573        'groups_post_update'
     574    );
    567575
    568576    $group_id = (int) $r['group_id'];
Note: See TracChangeset for help on using the changeset viewer.