Changeset 7523
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-notifications/bp-notifications-template.php
r7521 r7523 512 512 513 513 /** 514 * Output the pagination for the current notification loop. 514 * Output the pagination count for the current notification loop. 515 * 516 * @since BuddyPress (1.9.0) 517 */ 518 function bp_notifications_pagination_count() { 519 echo bp_get_notifications_pagination_count(); 520 } 521 /** 522 * Return the pagination count for the current notification loop. 523 * 524 * @since BuddyPress (1.9.0) 525 * 526 * @return string HTML for the pagination count. 527 */ 528 function bp_get_notifications_pagination_count() { 529 $query_loop = buddypress()->notifications->query_loop; 530 $start_num = intval( ( $query_loop->pag_page - 1 ) * $query_loop->pag_num ) + 1; 531 $from_num = bp_core_number_format( $start_num ); 532 $to_num = bp_core_number_format( ( $start_num + ( $query_loop->pag_num - 1 ) > $query_loop->total_notification_count ) ? $query_loop->total_notification_count : $start_num + ( $query_loop->pag_num - 1 ) ); 533 $total = bp_core_number_format( $query_loop->total_notification_count ); 534 $pag = sprintf( _n( 'Viewing %1$s to %2$s (of %3$s notification)', 'Viewing %1$s to %2$s (of %3$s notifications)', $total, 'buddypress' ), $from_num, $to_num, $total ); 535 536 return apply_filters( 'bp_notifications_pagination_count', $pag ); 537 } 538 539 /** 540 * Output the pagination links for the current notification loop. 515 541 * 516 542 * @since BuddyPress (1.9.0) … … 520 546 } 521 547 /** 522 * Return the pagination for the current notification loop.523 * 524 * @since BuddyPress (1.9.0) 525 * 526 * @return string HTML for the pagination .548 * Return the pagination links for the current notification loop. 549 * 550 * @since BuddyPress (1.9.0) 551 * 552 * @return string HTML for the pagination links. 527 553 */ 528 554 function bp_get_notifications_pagination_links() { -
trunk/bp-templates/bp-legacy/buddypress/members/single/notifications/read.php
r7521 r7523 1 1 <?php if ( bp_has_notifications() ) : ?> 2 3 <div id="pag-top" class="pagination no-ajax"> 4 <div class="pag-count" id="notifications-count-top"> 5 <?php bp_notifications_pagination_count(); ?> 6 </div> 7 8 <div class="pagination-links" id="notifications-pag-top"> 9 <?php bp_notifications_pagination_links(); ?> 10 </div> 11 </div> 2 12 3 13 <table class="notification-settings"> … … 16 26 </table> 17 27 28 <div id="pag-bottom" class="pagination no-ajax"> 29 <div class="pag-count" id="notifications-count-bottom"> 30 <?php bp_notifications_pagination_count(); ?> 31 </div> 32 33 <div class="pagination-links" id="notifications-pag-bottom"> 34 <?php bp_notifications_pagination_links(); ?> 35 </div> 36 </div> 37 18 38 <?php else : ?> 19 39 -
trunk/bp-templates/bp-legacy/buddypress/members/single/notifications/unread.php
r7521 r7523 1 1 <?php if ( bp_has_notifications() ) : ?> 2 3 <div id="pag-top" class="pagination no-ajax"> 4 <div class="pag-count" id="notifications-count-top"> 5 <?php bp_notifications_pagination_count(); ?> 6 </div> 7 8 <div class="pagination-links" id="notifications-pag-top"> 9 <?php bp_notifications_pagination_links(); ?> 10 </div> 11 </div> 2 12 3 13 <table class="notification-settings"> … … 16 26 </table> 17 27 28 <div id="pag-bottom" class="pagination no-ajax"> 29 <div class="pag-count" id="notifications-count-bottom"> 30 <?php bp_notifications_pagination_count(); ?> 31 </div> 32 33 <div class="pagination-links" id="notifications-pag-bottom"> 34 <?php bp_notifications_pagination_links(); ?> 35 </div> 36 </div> 37 18 38 <?php else : ?> 19 39
Note: See TracChangeset
for help on using the changeset viewer.