Skip to:
Content

BuddyPress.org

Ticket #7118: 7118.patch

File 7118.patch, 1.5 KB (added by imath, 8 years ago)
  • src/bp-blogs/bp-blogs-template.php

    diff --git src/bp-blogs/bp-blogs-template.php src/bp-blogs/bp-blogs-template.php
    index b7f0077..cbe37ed 100644
    function bp_the_blog() { 
    220220/**
    221221 * Output the blogs pagination count.
    222222 *
    223  * @global object $blogs_template {@link BP_Blogs_Template}
     223 * @since 1.0.0
    224224 */
    225225function bp_blogs_pagination_count() {
     226        echo bp_get_blogs_pagination_count();
     227}
     228
     229/**
     230 * Get the blogs pagination count.
     231 *
     232 * @since 2.7.0
     233 *
     234 * @global object $blogs_template {@link BP_Blogs_Template}
     235 */
     236function bp_get_blogs_pagination_count() {
    226237        global $blogs_template;
    227238
    228239        $start_num = intval( ( $blogs_template->pag_page - 1 ) * $blogs_template->pag_num ) + 1;
    function bp_blogs_pagination_count() { 
    236247                $message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s site', 'Viewing %1$s - %2$s of %3$s sites', $blogs_template->total_blog_count, 'buddypress' ), $from_num, $to_num, $total );
    237248        }
    238249
    239         echo $message;
     250        /**
     251         * Filters the "Viewing x-y of z blogs" pagination message.
     252         *
     253         * @since 2.7.0
     254         *
     255         * @param string $message  "Viewing x-y of z blogs" text.
     256         * @param string $from_num Total amount for the low value in the range.
     257         * @param string $to_num   Total amount for the high value in the range.
     258         * @param string $total    Total amount of blogs found.
     259         */
     260        return apply_filters( 'bp_get_blogs_pagination_count', $message, $from_num, $to_num, $total );
    240261}
    241262
    242263/**