Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/19/2016 03:46:29 AM (8 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-messages/bp-messages-template.php

    r10781 r10785  
    683683         *
    684684         * @since 1.0.0
     685         * @since 2.6.0 Added the `$r` parameter.
    685686         *
    686687         * @param string $value User avatar string.
     688         * @param array  $r     Array of parsed arguments.
    687689         */
    688690        return apply_filters( 'bp_get_message_thread_avatar', bp_core_fetch_avatar( array(
     
    694696            'width'   => $r['width'],
    695697            'height'  => $r['height'],
    696         ) ) );
     698        ) ), $r );
    697699    }
    698700
     
    18091811         *
    18101812         * @since 1.1.0
     1813         * @since 2.6.0 Added the `$r` parameter.
    18111814         *
    18121815         * @param string $value <img> tag containing the avatar value.
     1816         * @param array  $r     Array of parsed arguments.
    18131817         */
    18141818        return apply_filters( 'bp_get_the_thread_message_sender_avatar_thumb', bp_core_fetch_avatar( array(
     
    18181822            'height'  => $r['height'],
    18191823            'alt'     => bp_core_get_user_displayname( $thread_template->message->sender_id )
    1820         ) ) );
     1824        ) ), $r );
    18211825    }
    18221826
Note: See TracChangeset for help on using the changeset viewer.