Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/19/2016 03:46:29 AM (10 years ago)
Author:
boonebgorges
Message:

Pass parsed function parameters to a number of template filters.

The template filters in question are ones that get their main context from
a template global (say, $members_template), but get auxiliary information
about how to build markup from the function params. As such, it's useful to
have these parameters available via filter.

Props Offereins.
See #6997.

File:
1 edited

Legend:

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

    r10725 r10785  
    216216     *
    217217     * @since 1.9.0
     218     * @since 2.6.0 Added the `$r` parameter.
    218219     *
    219220     * @param bool                      $value      Whether or not there are notifications to display.
    220221     * @param BP_Notifications_Template $query_loop BP_Notifications_Template object instance.
    221      */
    222     return apply_filters( 'bp_has_notifications', $query_loop->has_notifications(), $query_loop );
     222     * @param array                     $r          Array of arguments passed into the BP_Notifications_Template class.
     223     */
     224    return apply_filters( 'bp_has_notifications', $query_loop->has_notifications(), $query_loop, $r );
    223225}
    224226
     
    827829         *
    828830         * @since 1.9.0
     831         * @since 2.6.0 Added the `$r` parameter.
    829832         *
    830833         * @param string $retval HTML links for actions to take on single notifications.
    831          */
    832         return apply_filters( 'bp_get_the_notification_action_links', $retval );
     834         * @param array  $r      Array of parsed arguments.
     835         */
     836        return apply_filters( 'bp_get_the_notification_action_links', $retval, $r );
    833837    }
    834838
Note: See TracChangeset for help on using the changeset viewer.