<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][12692] trunk: Convert `BP_Core_Members_Template` to accept array of arguments.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/12692">12692</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/12692","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>boonebgorges</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2020-07-27 19:33:55 +0000 (Mon, 27 Jul 2020)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Convert `BP_Core_Members_Template` to accept array of arguments.

This changeset also eliminates the use of `extract()` in
`BP_Core_Members_Template::__construct()`.

Props Mamaduka.

See <a href="http://buddypress.trac.wordpress.org/ticket/3797">#3797</a>, <a href="http://buddypress.trac.wordpress.org/ticket/7999">#7999</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpmembersbpmemberstemplatephp">trunk/src/bp-members/bp-members-template.php</a></li>
<li><a href="#trunksrcbpmembersclassesclassbpcorememberstemplatephp">trunk/src/bp-members/classes/class-bp-core-members-template.php</a></li>
<li><a href="#trunktestsphpunittestcasesmemberstemplatephp">trunk/tests/phpunit/testcases/members/template.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpmembersbpmemberstemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-members/bp-members-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-members/bp-members-template.php      2020-07-26 02:40:58 UTC (rev 12691)
+++ trunk/src/bp-members/bp-members-template.php        2020-07-27 19:33:55 UTC (rev 12692)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -400,24 +400,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        // Query for members and populate $members_template global.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $members_template = new BP_Core_Members_Template(
-               $r['type'],
-               $r['page'],
-               $r['per_page'],
-               $r['max'],
-               $r['user_id'],
-               $r['search_terms'],
-               $r['include'],
-               $r['populate_extras'],
-               $r['exclude'],
-               $r['meta_key'],
-               $r['meta_value'],
-               $r['page_arg'],
-               $r['member_type'],
-               $r['member_type__in'],
-               $r['member_type__not_in'],
-               $r['xprofile_query']
-       );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $members_template = new BP_Core_Members_Template( $r );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><span class="cx" style="display: block; padding: 0 10px">         * Filters whether or not BuddyPress has members to iterate over.
</span></span></pre></div>
<a id="trunksrcbpmembersclassesclassbpcorememberstemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-members/classes/class-bp-core-members-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-members/classes/class-bp-core-members-template.php   2020-07-26 02:40:58 UTC (rev 12691)
+++ trunk/src/bp-members/classes/class-bp-core-members-template.php     2020-07-27 19:33:55 UTC (rev 12692)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -114,35 +114,71 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @see BP_User_Query for an in-depth description of parameters.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @param string       $type                Sort order.
-        * @param int          $page_number         Page of results.
-        * @param int          $per_page            Number of results per page.
-        * @param int          $max                 Max number of results to return.
-        * @param int          $user_id             Limit to friends of a user.
-        * @param string       $search_terms        Limit to users matching search terms.
-        * @param array        $include             Limit results by these user IDs.
-        * @param bool         $populate_extras     Fetch optional extras.
-        * @param array        $exclude             Exclude these IDs from results.
-        * @param array        $meta_key            Limit to users with a meta_key.
-        * @param array        $meta_value          Limit to users with a meta_value (with meta_key).
-        * @param string       $page_arg            Optional. The string used as a query parameter in pagination links.
-        *                                          Default: 'upage'.
-        * @param array|string $member_type         Array or comma-separated string of member types to limit results to.
-        * @param array|string $member_type__in     Array or comma-separated string of member types to limit results to.
-        * @param array|string $member_type__not_in Array or comma-separated string of member types to exclude
-        *                                          from results.
- *     @param array        $xprofile_query      Filter results by xprofile data. Requires the xprofile
- *                                              component. See {@see BP_XProfile_Query} for details.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param array $args {
+        *     Array of arguments. Supports all arguments of BP_User_Query. Additional
+        *     arguments, or those with different defaults, are described below.
+        *
+        *     @type int    $page_number Page of results. Accepted for legacy reasons. Use 'page' instead.
+        *     @type int    $max         Max number of results to return.
+        *     @type string $page_arg    Optional. The string used as a query parameter in pagination links.
+        * }
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        function __construct( $type, $page_number, $per_page, $max, $user_id, $search_terms, $include, $populate_extras, $exclude, $meta_key, $meta_value, $page_arg = 'upage', $member_type = '', $member_type__in = '', $member_type__not_in = '', $xprofile_query = false ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function __construct( $args ) {
+               // Backward compatibility with old method of passing arguments.
+               if ( ! is_array( $args ) || func_num_args() > 1 ) {
+                       _deprecated_argument( __METHOD__, '7.0.0', sprintf( __( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->pag_arg  = sanitize_key( $page_arg );
-               $this->pag_page = bp_sanitize_pagination_arg( $this->pag_arg, $page_number );
-               $this->pag_num  = bp_sanitize_pagination_arg( 'num',          $per_page    );
-               $this->type     = $type;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $old_args_keys = array(
+                               0  => 'type',
+                               1  => 'page_number',
+                               2  => 'per_page',
+                               3  => 'max',
+                               4  => 'user_id',
+                               5  => 'search_terms',
+                               6  => 'include',
+                               7  => 'populate_extras',
+                               8  => 'exclude',
+                               9  => 'meta_key',
+                               10 => 'meta_value',
+                               11 => 'page_arg',
+                               12 => 'member_type',
+                               13 => 'member_type__in',
+                               14 => 'member_type__not_in'
+                       );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        $args = bp_core_parse_args_array( $old_args_keys, func_get_args() );
+               }
+
+               // Support both 'page_number' and 'page' for backward compatibility.
+               $args['page_number'] = isset( $args['page_number'] ) ? $args['page_number'] : $args['page'];
+
+               $defaults = array(
+                       'type'                => 'active',
+                       'page_number'         => 1,
+                       'per_page'            => 20,
+                       'max'                 => false,
+                       'user_id'             => false,
+                       'search_terms'        => null,
+                       'include'             => false,
+                       'populate_extras'     => true,
+                       'exclude'             => false,
+                       'meta_key'            => false,
+                       'meta_value'          => false,
+                       'page_arg'            => 'upage',
+                       'member_type'         => '',
+                       'member_type__in'     => '',
+                       'member_type__not_in' => '',
+                       'xprofile_query'      => false,
+               );
+               $r = wp_parse_args( $args, $defaults );
+
+               $this->pag_arg  = sanitize_key( $r['page_arg'] );
+               $this->pag_page = bp_sanitize_pagination_arg( $this->pag_arg, $r['page_number'] );
+               $this->pag_num  = bp_sanitize_pagination_arg( 'num',          $r['per_page']    );
+               $this->type     = $r['type'];
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( ! empty( $_REQUEST['letter'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $this->members = BP_Core_User::get_users_by_letter( $_REQUEST['letter'], $this->pag_num, $this->pag_page, $populate_extras, $exclude );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $this->members = BP_Core_User::get_users_by_letter( $_REQUEST['letter'], $this->pag_num, $this->pag_page, $r['populate_extras'], $r['exclude'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                 } else {
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->members = bp_core_get_users(
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -149,33 +185,34 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        'type'                => $this->type,
</span><span class="cx" style="display: block; padding: 0 10px">                                        'per_page'            => $this->pag_num,
</span><span class="cx" style="display: block; padding: 0 10px">                                        'page'                => $this->pag_page,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        'user_id'             => $user_id,
-                                       'include'             => $include,
-                                       'search_terms'        => $search_terms,
-                                       'populate_extras'     => $populate_extras,
-                                       'exclude'             => $exclude,
-                                       'meta_key'            => $meta_key,
-                                       'meta_value'          => $meta_value,
-                                       'member_type'         => $member_type,
-                                       'member_type__in'     => $member_type__in,
-                                       'member_type__not_in' => $member_type__not_in,
-                                       'xprofile_query'      => $xprofile_query,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 'user_id'             => $r['user_id'],
+                                       'include'             => $r['include'],
+                                       'search_terms'        => $r['search_terms'],
+                                       'populate_extras'     => $r['populate_extras'],
+                                       'exclude'             => $r['exclude'],
+                                       'meta_key'            => $r['meta_key'],
+                                       'meta_value'          => $r['meta_value'],
+                                       'member_type'         => $r['member_type'],
+                                       'member_type__in'     => $r['member_type__in'],
+                                       'member_type__not_in' => $r['member_type__not_in'],
+                                       'xprofile_query'      => $r['xprofile_query'],
</ins><span class="cx" style="display: block; padding: 0 10px">                                 )
</span><span class="cx" style="display: block; padding: 0 10px">                        );
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( !$max || $max >= (int) $this->members['total'] )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if ( ! $r['max'] || $r['max'] >= (int) $this->members['total'] ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         $this->total_member_count = (int) $this->members['total'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                else
-                       $this->total_member_count = (int) $max;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         } else {
+                       $this->total_member_count = (int) $r['max'];
+               }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->members = $this->members['users'];
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( $max ) {
-                       if ( $max >= count( $this->members ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if ( $r['max'] ) {
+                       if ( $r['max'] >= count( $this->members ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $this->member_count = count( $this->members );
</span><span class="cx" style="display: block; padding: 0 10px">                        } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $this->member_count = (int) $max;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $this->member_count = (int) $r['max'];
</ins><span class="cx" style="display: block; padding: 0 10px">                         }
</span><span class="cx" style="display: block; padding: 0 10px">                } else {
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->member_count = count( $this->members );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -199,9 +236,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                         */
</span><span class="cx" style="display: block; padding: 0 10px">                        $add_args = array();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        if ( ! empty( $search_terms ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 if ( ! empty( $r['search_terms'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $query_arg = bp_core_get_component_search_query_arg( 'members' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                $add_args[ $query_arg ] = urlencode( $search_terms );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         $add_args[ $query_arg ] = urlencode( $r['search_terms'] );
</ins><span class="cx" style="display: block; padding: 0 10px">                         }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->pag_links = paginate_links( array(
</span></span></pre></div>
<a id="trunktestsphpunittestcasesmemberstemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/testcases/members/template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/testcases/members/template.php        2020-07-26 02:40:58 UTC (rev 12691)
+++ trunk/tests/phpunit/testcases/members/template.php  2020-07-27 19:33:55 UTC (rev 12692)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -292,21 +292,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'search_terms'    => ''
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $at = new BP_Core_Members_Template(
-                       $r['type'],
-                       $r['page'],
-                       $r['per_page'],
-                       $r['max'],
-                       $r['user_id'],
-                       $r['search_terms'],
-                       $r['include'],
-                       $r['populate_extras'],
-                       $r['exclude'],
-                       $r['meta_key'],
-                       $r['meta_value'],
-                       $r['page_arg'],
-                       $r['member_type']
-               );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $at = new BP_Core_Members_Template( $r );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( 5, $at->pag_page );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -338,21 +324,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'search_terms'    => ''
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $at = new BP_Core_Members_Template(
-                       $r['type'],
-                       $r['page'],
-                       $r['per_page'],
-                       $r['max'],
-                       $r['user_id'],
-                       $r['search_terms'],
-                       $r['include'],
-                       $r['populate_extras'],
-                       $r['exclude'],
-                       $r['meta_key'],
-                       $r['meta_value'],
-                       $r['page_arg'],
-                       $r['member_type']
-               );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $at = new BP_Core_Members_Template( $r );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( 8, $at->pag_page );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -384,21 +356,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'search_terms'    => ''
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $at = new BP_Core_Members_Template(
-                       $r['type'],
-                       $r['page'],
-                       $r['per_page'],
-                       $r['max'],
-                       $r['user_id'],
-                       $r['search_terms'],
-                       $r['include'],
-                       $r['populate_extras'],
-                       $r['exclude'],
-                       $r['meta_key'],
-                       $r['meta_value'],
-                       $r['page_arg'],
-                       $r['member_type']
-               );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $at = new BP_Core_Members_Template( $r );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( 14, $at->pag_num );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -430,21 +388,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'search_terms'    => ''
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $at = new BP_Core_Members_Template(
-                       $r['type'],
-                       $r['page'],
-                       $r['per_page'],
-                       $r['max'],
-                       $r['user_id'],
-                       $r['search_terms'],
-                       $r['include'],
-                       $r['populate_extras'],
-                       $r['exclude'],
-                       $r['meta_key'],
-                       $r['meta_value'],
-                       $r['page_arg'],
-                       $r['member_type']
-               );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $at = new BP_Core_Members_Template( $r );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertEquals( 13, $at->pag_num );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre>
</div>
</div>

</body>
</html>