Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/12/2021 08:43:39 PM (3 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-notifications/classes/class-bp-notifications-template.php

    r13091 r13108  
    153153
    154154        // Parse arguments.
    155         $r = wp_parse_args( $args, array(
    156             'id'                => false,
    157             'user_id'           => 0,
    158             'item_id'           => false,
    159             'secondary_item_id' => false,
    160             'component_name'    => bp_notifications_get_registered_components(),
    161             'component_action'  => false,
    162             'is_new'            => true,
    163             'search_terms'      => '',
    164             'order_by'          => 'date_notified',
    165             'sort_order'        => 'DESC',
    166             'page_arg'          => 'npage',
    167             'page'              => 1,
    168             'per_page'          => 25,
    169             'max'               => null,
    170             'meta_query'        => false,
    171             'date_query'        => false,
    172         ) );
     155        $r = bp_parse_args(
     156            $args,
     157            array(
     158                'id'                => false,
     159                'user_id'           => 0,
     160                'item_id'           => false,
     161                'secondary_item_id' => false,
     162                'component_name'    => bp_notifications_get_registered_components(),
     163                'component_action'  => false,
     164                'is_new'            => true,
     165                'search_terms'      => '',
     166                'order_by'          => 'date_notified',
     167                'sort_order'        => 'DESC',
     168                'page_arg'          => 'npage',
     169                'page'              => 1,
     170                'per_page'          => 25,
     171                'max'               => null,
     172                'meta_query'        => false,
     173                'date_query'        => false,
     174            )
     175        );
    173176
    174177        // Sort order direction.
Note: See TracChangeset for help on using the changeset viewer.