Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/26/2013 01:59:46 AM (12 years ago)
Author:
boonebgorges
Message:

Introduces bp_get_send_message_button_args filter

Most buttons have a filter on the args that are passed to bp_has_button().
The bp-messages Send Message button filter 'bp_get_send_message_button', in
contrast, is on the HTML return value of bp_has_button(). This was probably
a mistake in the original implementation. However, simply moving the existing
filter would break compatibility with existing implementations that use it. So
we've added a new filter, which works the same as other button filters, but has
a slightly different naming convention.

Fixes #4536

Props megainfo, rogercoathup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-messages/bp-messages-template.php

    r6549 r6943  
    640640}
    641641    function bp_get_send_message_button() {
     642        // Note: 'bp_get_send_message_button' is a legacy filter. Use
     643        // 'bp_get_send_message_button_args' instead. See #4536
    642644        return apply_filters( 'bp_get_send_message_button',
    643             bp_get_button( array(
     645            bp_get_button( apply_filters( 'bp_get_send_message_button_args', array(
    644646                'id'                => 'private_message',
    645647                'component'         => 'messages',
     
    651653                'link_text'         => __( 'Private Message', 'buddypress' ),
    652654                'link_class'        => 'send-message',
    653             ) )
     655            ) ) )
    654656        );
    655657    }
Note: See TracChangeset for help on using the changeset viewer.