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-notifications/classes/class-bp-notifications-notification.php

    r13091 r13108  
    617617         */
    618618        public static function parse_args( $args = '' ) {
    619                 return wp_parse_args( $args, array(
    620                         'id'                => false,
    621                         'user_id'           => false,
    622                         'item_id'           => false,
    623                         'secondary_item_id' => false,
    624                         'component_name'    => bp_notifications_get_registered_components(),
    625                         'component_action'  => false,
    626                         'is_new'            => true,
    627                         'search_terms'      => '',
    628                         'order_by'          => false,
    629                         'sort_order'        => false,
    630                         'page'              => false,
    631                         'per_page'          => false,
    632                         'meta_query'        => false,
    633                         'date_query'        => false,
    634                         'update_meta_cache' => true,
    635                 ) );
     619                return bp_parse_args(
     620                        $args,
     621                        array(
     622                                'id'                => false,
     623                                'user_id'           => false,
     624                                'item_id'           => false,
     625                                'secondary_item_id' => false,
     626                                'component_name'    => bp_notifications_get_registered_components(),
     627                                'component_action'  => false,
     628                                'is_new'            => true,
     629                                'search_terms'      => '',
     630                                'order_by'          => false,
     631                                'sort_order'        => false,
     632                                'page'              => false,
     633                                'per_page'          => false,
     634                                'meta_query'        => false,
     635                                'date_query'        => false,
     636                                'update_meta_cache' => true,
     637                        )
     638                );
    636639        }
    637640
     
    10311034         */
    10321035        public static function get_current_notifications_for_user( $args = array() ) {
    1033                 $r = wp_parse_args( $args, array(
    1034                         'user_id'      => bp_loggedin_user_id(),
    1035                         'is_new'       => true,
    1036                         'page'         => 1,
    1037                         'per_page'     => 25,
    1038                         'search_terms' => '',
    1039                 ) );
     1036                $r = bp_parse_args(
     1037                        $args,
     1038                        array(
     1039                                'user_id'      => bp_loggedin_user_id(),
     1040                                'is_new'       => true,
     1041                                'page'         => 1,
     1042                                'per_page'     => 25,
     1043                                'search_terms' => '',
     1044                        )
     1045                );
    10401046
    10411047                $notifications = self::get( $r );
Note: See TracChangeset for help on using the changeset viewer.