Skip to:
Content

BuddyPress.org

Changeset 2358


Ignore:
Timestamp:
01/19/2010 03:21:30 PM (16 years ago)
Author:
apeatling
Message:

Fixes #1581 - hiding "Load More" when total activity count does not hit the max per page.

Location:
trunk
Files:
2 edited

Legend:

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

    r2355 r2358  
    187187
    188188                return apply_filters( 'bp_get_activity_pagination_links', $activities_template->pag_links );
     189        }
     190
     191function bp_activity_count() {
     192        echo bp_get_activity_count();
     193}
     194        function bp_get_activity_count() {
     195                global $activities_template;
     196
     197                return apply_filters( 'bp_get_activity_count', (int)$activities_template->activity_count );
     198        }
     199
     200function bp_activity_per_page() {
     201        echo bp_get_activity_per_page();
     202}
     203        function bp_get_activity_per_page() {
     204                global $activities_template;
     205
     206                return apply_filters( 'bp_get_activity_per_page', (int)$activities_template->pag_num );
    189207        }
    190208
  • trunk/bp-themes/bp-default/activity/activity-loop.php

    r2287 r2358  
    1515        <?php endwhile; ?>
    1616
     17        <?php if ( bp_get_activity_count() == bp_get_activity_per_page() ) : ?>
    1718                <li class="load-more">
    1819                        <a href="#more"><?php _e( 'Load More', 'buddypress' ) ?></a> &nbsp; <span class="ajax-loader"></span>
    1920                </li>
     21        <?php endif; ?>
    2022
    2123        <?php if ( empty( $_POST['page'] ) ) : ?>
Note: See TracChangeset for help on using the changeset viewer.