Skip to:
Content

BuddyPress.org

Changeset 8142


Ignore:
Timestamp:
03/18/2014 02:09:33 AM (13 years ago)
Author:
r-a-y
Message:

Replace wp_parse_args() with bp_parse_args() for all template loops.

bp_parse_args() allows developers to filter the template arguments
before the loop is rendered. This will allow for greater
flexibility to manipulate template loops in plugins.

See #5306

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-template.php

    r7952 r8142  
    556556        );
    557557
    558         $r = wp_parse_args( $args, $defaults );
     558        $r = bp_parse_args( $args, $defaults, 'has_activities' );
    559559        extract( $r );
    560560
  • trunk/bp-blogs/bp-blogs-template.php

    r8042 r8142  
    378378        );
    379379
    380         $r = wp_parse_args( $args, $defaults );
     380        $r = bp_parse_args( $args, $defaults, 'has_blogs' );
    381381        extract( $r );
    382382
  • trunk/bp-forums/bp-forums-template.php

    r7554 r8142  
    481481        );
    482482
    483         $r = wp_parse_args( $args, $defaults );
     483        $r = bp_parse_args( $args, $defaults, 'has_forum_topics' );
    484484        extract( $r );
    485485
    … …  
    18451845        );
    18461846
    1847         $r = wp_parse_args( $args, $defaults );
     1847        $r = bp_parse_args( $args, $defaults, 'has_forum_topic_posts' );
    18481848        extract( $r, EXTR_SKIP );
    18491849
  • trunk/bp-groups/bp-groups-template.php

    r8116 r8142  
    343343        );
    344344
    345         $r = wp_parse_args( $args, $defaults );
     345        $r = bp_parse_args( $args, $defaults, 'has_groups' );
    346346
    347347        $groups_template = new BP_Groups_Template( array(
  • trunk/bp-members/bp-members-template.php

    r8083 r8142  
    301301        );
    302302
    303         $r = wp_parse_args( $args, $defaults );
     303        $r = bp_parse_args( $args, $defaults, 'has_members' );
    304304        extract( $r );
    305305
  • trunk/bp-notifications/bp-notifications-template.php

    r8115 r8142  
    479479
    480480        // Parse the args
    481         $r = wp_parse_args( $args, array(
     481        $r = bp_parse_args( $args, array(
    482482                'user_id'      => $user_id,
    483483                'is_new'       => $is_new,
    … …  
    487487                'search_terms' => isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : '',
    488488                'page_arg'     => 'npage',
    489         ) );
     489        ), 'has_notifications' );
    490490
    491491        // Get the notifications
  • trunk/bp-xprofile/bp-xprofile-template.php

    r7965 r8142  
    180180        );
    181181
    182         $r = wp_parse_args( $args, $defaults );
     182        $r = bp_parse_args( $args, $defaults, 'has_profile' );
    183183        extract( $r, EXTR_SKIP );
    184184
Note: See TracChangeset for help on using the changeset viewer.