Skip to:
Content

BuddyPress.org

Changeset 8062


Ignore:
Timestamp:
03/06/2014 02:50:40 PM (12 years ago)
Author:
boonebgorges
Message:

Change default per_page for bp_group_has_invites() to false

This change is necessary for backward compatibility, as the old internals
did not have pagination parameters. See eg bp-default.

See #5423

File:
1 edited

Legend:

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

    r8050 r8062  
    31363136                $this->invite_count       = count( $this->invites );
    31373137
    3138                 $this->pag_links = paginate_links( array(
    3139                         'base'      => add_query_arg( 'invitepage', '%#%' ),
    3140                         'format'    => '',
    3141                         'total'     => ceil( $this->total_invite_count / $this->pag_num ),
    3142                         'current'   => $this->pag_page,
    3143                         'prev_text' => '←',
    3144                         'next_text' => '→',
    3145                         'mid_size'  => 1,
    3146                 ) );
     3138                // If per_page is set to 0 (show all results), don't generate
     3139                // pag_links
     3140                if ( ! empty( $this->pag_num ) ) {
     3141                        $this->pag_links = paginate_links( array(
     3142                                'base'      => add_query_arg( 'invitepage', '%#%' ),
     3143                                'format'    => '',
     3144                                'total'     => ceil( $this->total_invite_count / $this->pag_num ),
     3145                                'current'   => $this->pag_page,
     3146                                'prev_text' => '←',
     3147                                'next_text' => '→',
     3148                                'mid_size'  => 1,
     3149                        ) );
     3150                } else {
     3151                        $this->pag_links = '';
     3152                }
    31473153        }
    31483154
     
    32313237                'group_id' => false,
    32323238                'user_id'  => bp_loggedin_user_id(),
    3233                 'per_page' => 10,
     3239                'per_page' => false,
    32343240                'page'     => 1,
    32353241        ) );
Note: See TracChangeset for help on using the changeset viewer.