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-xprofile/bp-xprofile-functions.php

    r13088 r13108  
    6161
    6262    // Parse the arguments.
    63     $r = bp_parse_args( $args, array(
    64         'field_group_id' => false,
    65         'name'           => false,
    66         'description'    => '',
    67         'can_delete'     => true
    68     ), 'xprofile_insert_field_group' );
     63    $r = bp_parse_args(
     64        $args,
     65        array(
     66            'field_group_id' => false,
     67            'name'           => false,
     68            'description'    => '',
     69            'can_delete'     => true,
     70        ),
     71        'xprofile_insert_field_group'
     72    );
    6973
    7074    // Bail if no group name.
     
    231235function xprofile_insert_field( $args = '' ) {
    232236
    233     $r = wp_parse_args( $args, array(
    234         'field_id'          => null,
    235         'field_group_id'    => null,
    236         'parent_id'         => null,
    237         'type'              => '',
    238         'name'              => '',
    239         'description'       => '',
    240         'is_required'       => false,
    241         'can_delete'        => true,
    242         'order_by'          => '',
    243         'is_default_option' => false,
    244         'option_order'      => null,
    245         'field_order'       => null,
    246     ) );
     237    $r = bp_parse_args(
     238        $args,
     239        array(
     240            'field_id'          => null,
     241            'field_group_id'    => null,
     242            'parent_id'         => null,
     243            'type'              => '',
     244            'name'              => '',
     245            'description'       => '',
     246            'is_required'       => false,
     247            'can_delete'        => true,
     248            'order_by'          => '',
     249            'is_default_option' => false,
     250            'option_order'      => null,
     251            'field_order'       => null,
     252        )
     253    );
    247254
    248255    // Field_group_id is required.
Note: See TracChangeset for help on using the changeset viewer.