Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/12/2021 08:43:39 PM (5 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-xprofile/bp-xprofile-activity.php

    r12851 r13108  
    8888
    8989        // Parse the arguments.
    90         $r = bp_parse_args( $args, array(
    91                 'user_id'           => bp_loggedin_user_id(),
    92                 'action'            => '',
    93                 'content'           => '',
    94                 'primary_link'      => '',
    95                 'component'         => buddypress()->profile->id,
    96                 'type'              => false,
    97                 'item_id'           => false,
    98                 'secondary_item_id' => false,
    99                 'recorded_time'     => bp_core_current_time(),
    100                 'hide_sitewide'     => false
    101         ) );
     90        $r = bp_parse_args(
     91                $args,
     92                array(
     93                        'user_id'           => bp_loggedin_user_id(),
     94                        'action'            => '',
     95                        'content'           => '',
     96                        'primary_link'      => '',
     97                        'component'         => buddypress()->profile->id,
     98                        'type'              => false,
     99                        'item_id'           => false,
     100                        'secondary_item_id' => false,
     101                        'recorded_time'     => bp_core_current_time(),
     102                        'hide_sitewide'     => false,
     103                )
     104        );
    102105
    103106        return bp_activity_add( $r );
     
    123126
    124127        // Parse the arguments.
    125         $r = bp_parse_args( $args, array(
    126                 'component' => buddypress()->profile->id
    127         ), 'xprofile_delete_activity' );
     128        $r = bp_parse_args(
     129                $args,
     130                array(
     131                        'component' => buddypress()->profile->id,
     132                ),
     133                'xprofile_delete_activity'
     134        );
    128135
    129136        // Delete the activity item.
Note: See TracChangeset for help on using the changeset viewer.