Skip to:
Content

BuddyPress.org

Ticket #5306: 5306.template_loops.01.patch

File 5306.template_loops.01.patch, 4.1 KB (added by r-a-y, 12 years ago)
  • bp-activity/bp-activity-template.php

    function bp_has_activities( $args = '' ) { 
    555555                'update_meta_cache' => true,
    556556        );
    557557
    558         $r = wp_parse_args( $args, $defaults );
     558        $r = bp_parse_args( $args, $defaults, 'has_activities' );
    559559        extract( $r );
    560560
    561561        // Translate various values for 'display_comments'
  • bp-blogs/bp-blogs-template.php

    function bp_has_blogs( $args = '' ) { 
    377377                'update_meta_cache' => true,
    378378        );
    379379
    380         $r = wp_parse_args( $args, $defaults );
     380        $r = bp_parse_args( $args, $defaults, 'has_blogs' );
    381381        extract( $r );
    382382
    383383        if ( is_null( $search_terms ) ) {
  • bp-forums/bp-forums-template.php

    function bp_has_forum_topics( $args = '' ) { 
    480480                'do_stickies'  => $do_stickies
    481481        );
    482482
    483         $r = wp_parse_args( $args, $defaults );
     483        $r = bp_parse_args( $args, $defaults, 'has_forum_topics' );
    484484        extract( $r );
    485485
    486486        // If we're viewing a tag URL in the directory, let's override the type and
    function bp_has_forum_topic_posts( $args = '' ) { 
    18441844                'order'    => 'ASC'
    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
    18501850        if ( empty( $topic_id ) && bp_is_groups_component() && bp_is_current_action( 'forum' ) && bp_is_action_variable( 'topic', 0 ) && bp_action_variable( 1 ) )
  • bp-groups/bp-groups-template.php

    function bp_has_groups( $args = '' ) { 
    333333                'update_meta_cache' => true,
    334334        );
    335335
    336         $r = wp_parse_args( $args, $defaults );
     336        $r = bp_parse_args( $args, $defaults, 'has_groups' );
    337337
    338338        if ( empty( $r['search_terms'] ) ) {
    339339                if ( isset( $_REQUEST['group-filter-box'] ) && !empty( $_REQUEST['group-filter-box'] ) )
  • bp-members/bp-members-template.php

    function bp_has_members( $args = '' ) { 
    300300                'populate_extras' => true           // Fetch usermeta? Friend count, last active etc.
    301301        );
    302302
    303         $r = wp_parse_args( $args, $defaults );
     303        $r = bp_parse_args( $args, $defaults, 'has_members' );
    304304        extract( $r );
    305305
    306306        // Pass a filter if ?s= is set.
  • bp-notifications/bp-notifications-template.php

    function bp_has_notifications( $args = '' ) { 
    478478        }
    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,
    484484                'page'         => 1,
    function bp_has_notifications( $args = '' ) { 
    486486                'max'          => false,
    487487                'search_terms' => isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : '',
    488488                'page_arg'     => 'npage',
    489         ) );
     489        ), 'has_notifications' );
    490490
    491491        // Get the notifications
    492492        $query_loop = new BP_Notifications_Template( $r );
  • bp-xprofile/bp-xprofile-template.php

    function bp_has_profile( $args = '' ) { 
    179179                'update_meta_cache'   => true,
    180180        );
    181181
    182         $r = wp_parse_args( $args, $defaults );
     182        $r = bp_parse_args( $args, $defaults, 'has_profile' );
    183183        extract( $r, EXTR_SKIP );
    184184
    185185        $profile_template = new BP_XProfile_Data_Template( $user_id, $profile_group_id, $hide_empty_groups, $fetch_fields, $fetch_field_data, $exclude_groups, $exclude_fields, $hide_empty_fields, $fetch_visibility_level, $update_meta_cache );