Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/09/2011 06:40:20 PM (15 years ago)
Author:
djpaul
Message:

Fix pagination symbol i18n. Tidy whitespace. Fixes #3456, props r-a-y

File:
1 edited

Legend:

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

    r4907 r4955  
    169169                                'total'     => ceil( (int)$this->total_group_count / (int)$this->pag_num ),
    170170                                'current'   => $this->pag_page,
    171                                 'prev_text' => '←',
    172                                 'next_text' => '→',
     171                                'prev_text' => _x( '←', 'Group pagination previous text', 'buddypress' ),
     172                                'next_text' => _x( '→', 'Group pagination next text', 'buddypress' ),
    173173                                'mid_size'  => 1
    174174                        ) );
     
    626626        $admin_ids = array();
    627627
    628         if ( $group->admins ) { 
     628        if ( $group->admins ) {
    629629                foreach( $group->admins as $admin ) {
    630630                        $admin_ids[] = $admin->user_id;
    631631                }
    632632        }
    633                        
    634         if ( 'string' == $format ) 
     633
     634        if ( 'string' == $format )
    635635                $admin_ids = implode( ',', $admin_ids );
    636        
     636
    637637        return apply_filters( 'bp_group_admin_ids', $admin_ids );
    638638}
     
    656656        $mod_ids = array();
    657657
    658         if ( $group->mods ) { 
     658        if ( $group->mods ) {
    659659                foreach( $group->mods as $mod ) {
    660660                        $mod_ids[] = $mod->user_id;
    661661                }
    662662        }
    663        
    664         if ( 'string' == $format ) 
     663
     664        if ( 'string' == $format )
    665665                $mod_ids = implode( ',', $mod_ids );
    666        
     666
    667667        return apply_filters( 'bp_group_mod_ids', $mod_ids );
    668668}
     
    897897 * @param obj $group (optional) The group whose status you want to check
    898898 */
    899 function bp_group_show_invite_status_setting( $setting, $group = false ) { 
     899function bp_group_show_invite_status_setting( $setting, $group = false ) {
    900900        $group_id = isset( $group->id ) ? $group->id : false;
    901        
     901
    902902        $invite_status = bp_group_get_invite_status( $group_id );
    903        
     903
    904904        if ( $setting == $invite_status )
    905905                echo ' checked="checked"';
     
    925925function bp_group_get_invite_status( $group_id = false ) {
    926926        global $bp, $groups_template;
    927                
     927
    928928        if ( !$group_id ) {
    929929                if ( isset( $bp->groups->current_group->id ) ) {
     
    937937                }
    938938        }
    939        
     939
    940940        $invite_status = groups_get_groupmeta( $group_id, 'invite_status' );
    941941
     
    958958 * @return bool $can_send_invites
    959959 */
    960 function bp_groups_user_can_send_invites( $group_id = false ) { 
    961         global $bp; 
     960function bp_groups_user_can_send_invites( $group_id = false ) {
     961        global $bp;
    962962
    963963        $can_send_invites = false;
    964964        $invite_status    = false;
    965        
     965
    966966        if ( is_user_logged_in() ) {
    967                 if ( is_super_admin() ) { 
    968                         // Super admins can always send invitations 
     967                if ( is_super_admin() ) {
     968                        // Super admins can always send invitations
    969969                        $can_send_invites = true;
    970970
     
    983983
    984984                        switch ( $invite_status ) {
    985                                 case 'admins' : 
    986                                         if ( groups_is_user_admin( bp_loggedin_user_id(), $group_id ) ) 
     985                                case 'admins' :
     986                                        if ( groups_is_user_admin( bp_loggedin_user_id(), $group_id ) )
    987987                                                $can_send_invites = true;
    988988                                        break;
     
    10021002
    10031003        return apply_filters( 'bp_groups_user_can_send_invites', $can_send_invites, $group_id, $invite_status );
    1004 } 
     1004}
    10051005
    10061006/**
     
    16691669
    16701670        function bp_groups_group_members_template( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude ) {
    1671                 $this->__construct( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude );     
    1672         }
    1673        
     1671                $this->__construct( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude );
     1672        }
     1673
    16741674        function __construct( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude ) {
    16751675                global $bp;
     
    23992399                $this->__construct( $group_id, $per_page, $max );
    24002400        }
    2401        
    2402        
     2401
     2402
    24032403        function __construct( $group_id, $per_page, $max ) {
    2404                
     2404
    24052405                global $bp;
    24062406
     
    25732573
    25742574        function bp_groups_invite_template( $user_id, $group_id ) {
    2575                 $this->__construct( $user_id, $group_id ); 
    2576         }
    2577                
     2575                $this->__construct( $user_id, $group_id );
     2576        }
     2577
    25782578        function __construct( $user_id, $group_id ) {
    25792579
    25802580                global $bp;
    2581                
     2581
    25822582                $this->invites = groups_get_invites_for_group( $user_id, $group_id );
    25832583                $this->invite_count = count( $this->invites );
     
    27532753function bp_current_group_id() {
    27542754        echo bp_get_current_group_id();
    2755 }       
     2755}
    27562756        /**
    27572757         * Returns the ID of the current group
     
    27612761         * @uses apply_filters() Filter bp_get_current_group_id to modify this output
    27622762         *
    2763          * @return int $current_group_id The id of the current group, if there is one 
     2763         * @return int $current_group_id The id of the current group, if there is one
    27642764         */
    27652765        function bp_get_current_group_id() {
    27662766                $current_group = groups_get_current_group();
    2767                
     2767
    27682768                $current_group_id = isset( $current_group->id ) ? (int)$current_group->id : 0;
    2769                
     2769
    27702770                return apply_filters( 'bp_get_current_group_id', $current_group_id, $current_group );
    27712771        }
     
    27792779function bp_current_group_slug() {
    27802780        echo bp_get_current_group_slug();
    2781 }       
     2781}
    27822782        /**
    27832783         * Returns the slug of the current group
     
    27872787         * @uses apply_filters() Filter bp_get_current_group_slug to modify this output
    27882788         *
    2789          * @return str $current_group_slug The slug of the current group, if there is one 
     2789         * @return str $current_group_slug The slug of the current group, if there is one
    27902790         */
    27912791        function bp_get_current_group_slug() {
    27922792                $current_group = groups_get_current_group();
    2793                
     2793
    27942794                $current_group_slug = isset( $current_group->slug ) ? $current_group->slug : '';
    2795                
     2795
    27962796                return apply_filters( 'bp_get_current_group_slug', $current_group_slug, $current_group );
    27972797        }
     
    28122812         * @uses apply_filters() Filter bp_get_current_group_name to modify this output
    28132813         *
    2814          * @return str The name of the current group, if there is one 
     2814         * @return str The name of the current group, if there is one
    28152815         */
    28162816        function bp_get_current_group_name() {
Note: See TracChangeset for help on using the changeset viewer.