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-core/classes/class-bp-core-nav.php

    r12547 r13108  
    176176            }
    177177
    178             $nav_item = reset( $nav_items );
    179             $this->nav[ $this->object_id ][ $slug ] = new BP_Core_Nav_Item( wp_parse_args( $args, (array) $nav_item ) );
     178            $nav_item                               = reset( $nav_items );
     179            $this->nav[ $this->object_id ][ $slug ] = new BP_Core_Nav_Item(
     180                bp_parse_args(
     181                    $args,
     182                    (array) $nav_item
     183                )
     184            );
    180185
    181186            // Return the edited object.
     
    191196
    192197            $sub_item = reset( $sub_items );
    193 
    194             $params = wp_parse_args( $args, (array) $sub_item );
     198            $params   = bp_parse_args(
     199                $args,
     200                (array) $sub_item
     201            );
    195202
    196203            // When we have parents, it's for life, we can't change them!
     
    326333     */
    327334    public function get_primary( $args = array(), $sort = true ) {
    328         $params = wp_parse_args( $args, array( 'primary' => true ) );
     335        $params = bp_parse_args(
     336            $args,
     337            array(
     338                'primary' => true,
     339            )
     340        );
    329341
    330342        // This parameter is not overridable.
     
    356368     */
    357369    public function get_secondary( $args = array(), $sort = true ) {
    358         $params = wp_parse_args( $args, array( 'parent_slug' => '' ) );
     370        $params = bp_parse_args(
     371            $args,
     372            array(
     373                'parent_slug' => '',
     374            )
     375        );
    359376
    360377        // No need to search children if the parent is not set.
Note: See TracChangeset for help on using the changeset viewer.