Skip to:
Content

BuddyPress.org

Changeset 10906


Ignore:
Timestamp:
06/27/2016 05:50:09 PM (9 years ago)
Author:
imath
Message:

Blogs: introduce a function to return the blogs pagination

Unlike other components, the blogs component was not including a function to only return the pagination content, but only a function to display it.
bp_get_blogs_pagination_count() will now do this job and the bp_blogs_pagination_count() is using it to display the pagination.

Fixes #7118

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/bp-blogs-template.php

    r10904 r10906  
    221221 * Output the blogs pagination count.
    222222 *
     223 * @since 1.0.0
     224 */
     225function 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 *
    223234 * @global object $blogs_template {@link BP_Blogs_Template}
    224235 */
    225 function bp_blogs_pagination_count() {
     236function bp_get_blogs_pagination_count() {
    226237    global $blogs_template;
    227238
     
    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
Note: See TracChangeset for help on using the changeset viewer.