Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/12/2010 12:31:49 PM (15 years ago)
Author:
apeatling
Message:

Fixing the use of deprecated template tags in bp-default. Merged the fetching of BP runtime settings into one query to significantly reduce the number of run time database hits. Fixed #1916

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-templatetags.php

    r2626 r2695  
    255255}
    256256
    257 
    258 function bp_group_id( $deprecated = true, $deprecated2 = false ) {
    259     global $groups_template;
    260 
    261     if ( !$deprecated )
    262         return bp_get_group_id();
    263     else
    264         echo bp_get_group_id();
     257function bp_group_id() {
     258    echo bp_get_group_id();
    265259}
    266260    function bp_get_group_id( $group = false ) {
     
    273267    }
    274268
    275 function bp_group_name( $deprecated = true, $deprecated2 = false ) {
    276     global $groups_template;
    277 
    278     if ( !$deprecated )
    279         return bp_get_group_name();
    280     else
    281         echo bp_get_group_name();
     269function bp_group_name() {
     270    echo bp_get_group_name();
    282271}
    283272    function bp_get_group_name( $group = false ) {
     
    363352    }
    364353
    365 function bp_group_last_active( $deprecated = true, $deprecated2 = false ) {
    366     if ( !$deprecated )
    367         return bp_get_group_last_active();
    368     else
    369         echo bp_get_group_last_active();
     354function bp_group_last_active() {
     355    echo bp_get_group_last_active();
    370356}
    371357    function bp_get_group_last_active( $group = false ) {
     
    387373    }
    388374
    389 function bp_group_permalink( $deprecated = false, $deprecated2 = true ) {
    390     if ( !$deprecated2 )
    391         return bp_get_group_permalink();
    392     else
    393         echo bp_get_group_permalink();
     375function bp_group_permalink() {
     376    echo bp_get_group_permalink();
    394377}
    395378    function bp_get_group_permalink( $group = false ) {
     
    402385    }
    403386
    404 function bp_group_admin_permalink( $deprecated = true, $deprecated2 = false ) {
    405     if ( !$deprecated )
    406         return bp_get_group_admin_permalink();
    407     else
    408         echo bp_get_group_admin_permalink();
     387function bp_group_admin_permalink() {
     388    echo bp_get_group_admin_permalink();
    409389}
    410390    function bp_get_group_admin_permalink( $group = false ) {
     
    429409    }
    430410
    431 function bp_group_description( $deprecated = false, $deprecated2 = true ) {
    432     if ( !$deprecated2 )
    433         return bp_get_group_description();
    434     else
    435         echo bp_get_group_description();
     411function bp_group_description() {
     412    echo bp_get_group_description();
    436413}
    437414    function bp_get_group_description( $group = false ) {
     
    444421    }
    445422
    446 function bp_group_description_editable( $deprecated = false ) {
     423function bp_group_description_editable() {
    447424    echo bp_get_group_description_editable();
    448425}
     
    456433    }
    457434
    458 function bp_group_description_excerpt( $deprecated = false ) {
     435function bp_group_description_excerpt() {
    459436    echo bp_get_group_description_excerpt();
    460437}
     
    469446
    470447
    471 function bp_group_public_status( $deprecated = false ) {
     448function bp_group_public_status() {
    472449    echo bp_get_group_public_status();
    473450}
     
    485462    }
    486463
    487 function bp_group_is_public( $deprecated = false ) {
     464function bp_group_is_public() {
    488465    echo bp_get_group_is_public();
    489466}
     
    497474    }
    498475
    499 function bp_group_date_created( $deprecated = false ) {
     476function bp_group_date_created() {
    500477    echo bp_get_group_date_created();
    501478}
     
    521498}
    522499
    523 function bp_group_list_admins( $deprecated = true, $group = false ) {
     500function bp_group_list_admins( $group = false ) {
    524501    global $groups_template;
    525502
     
    541518}
    542519
    543 function bp_group_list_mods( $deprecated = true, $group = false ) {
     520function bp_group_list_mods( $group = false ) {
    544521    global $groups_template;
    545522
     
    561538}
    562539
    563 function bp_group_all_members_permalink( $deprecated = true, $deprecated2 = false ) {
    564     global $groups_template, $bp;
    565 
    566     if ( !$group )
    567         $group =& $groups_template->group;
    568 
    569     if ( !$deprecated )
    570         return bp_get_group_all_members_permalink();
    571     else
    572         echo bp_get_group_all_members_permalink();
     540function bp_group_all_members_permalink() {
     541    echo bp_get_group_all_members_permalink();
    573542}
    574543    function bp_get_group_all_members_permalink( $group = false ) {
     
    636605}
    637606
    638 function bp_group_total_members( $deprecated = true, $deprecated2 = false ) {
    639     if ( !$deprecated )
    640         return bp_get_group_total_members();
    641     else
    642         echo bp_get_group_total_members();
    643 }
    644     function bp_get_group_total_members( $echo = true, $group = false ) {
     607function bp_group_total_members() {
     608    echo bp_get_group_total_members();
     609}
     610    function bp_get_group_total_members( $group = false ) {
    645611        global $groups_template;
    646612
     
    663629    }
    664630
    665 function bp_group_forum_permalink( $deprecated = false ) {
     631function bp_group_forum_permalink() {
    666632    echo bp_get_group_forum_permalink();
    667633}
     
    902868    }
    903869
    904 function bp_group_member_demote_link( $user_id = false, $deprecated = false ) {
     870function bp_group_member_demote_link( $user_id = false ) {
    905871    global $members_template;
    906872
     
    922888    }
    923889
    924 function bp_group_member_ban_link( $user_id = false, $deprecated = false ) {
     890function bp_group_member_ban_link( $user_id = false ) {
    925891    global $members_template;
    926892
     
    939905    }
    940906
    941 function bp_group_member_unban_link( $user_id = false, $deprecated = false ) {
     907function bp_group_member_unban_link( $user_id = false ) {
    942908    global $members_template;
    943909
     
    996962    }
    997963
    998 function bp_group_form_action( $page, $deprecated = false ) {
     964function bp_group_form_action( $page ) {
    999965    echo bp_get_group_form_action( $page );
    1000966}
     
    1008974    }
    1009975
    1010 function bp_group_admin_form_action( $page = false, $deprecated = false ) {
     976function bp_group_admin_form_action( $page = false ) {
    1011977    echo bp_get_group_admin_form_action( $page );
    1012978}
     
    10501016}
    10511017
    1052 function bp_group_accept_invite_link( $deprecated = false ) {
     1018function bp_group_accept_invite_link() {
    10531019    echo bp_get_group_accept_invite_link();
    10541020}
     
    10621028    }
    10631029
    1064 function bp_group_reject_invite_link( $deprecated = false ) {
     1030function bp_group_reject_invite_link() {
    10651031    echo bp_get_group_reject_invite_link();
    10661032}
     
    10741040    }
    10751041
    1076 function bp_group_leave_confirm_link( $deprecated = false ) {
     1042function bp_group_leave_confirm_link() {
    10771043    echo bp_get_group_leave_confirm_link();
    10781044}
     
    10861052    }
    10871053
    1088 function bp_group_leave_reject_link( $deprecated = false ) {
     1054function bp_group_leave_reject_link() {
    10891055    echo bp_get_group_leave_reject_link();
    10901056}
     
    10981064    }
    10991065
    1100 function bp_group_send_invite_form_action( $deprecated = false ) {
     1066function bp_group_send_invite_form_action() {
    11011067    echo bp_get_group_send_invite_form_action();
    11021068}
Note: See TracChangeset for help on using the changeset viewer.