Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 11 years ago

#4860 closed enhancement (fixed)

Allow Notification callbacks to be methods and not functions only

Reported by: sbrajesh's profile sbrajesh Owned by: boonebgorges's profile boonebgorges
Milestone: 1.8 Priority: normal
Severity: normal Version: 1.7
Component: Toolbar & Notifications Keywords: has-patch commit
Cc:

Description

Hi,
currently, the notification rendering mechanism in BuddyPress needs the notification_callback to be a function and does not render it if we register a method on some object.

We need to change function_exists to is_callable.

here is a patch attached against r6829

Attachments (1)

notification-object.patch (648 bytes) - added by sbrajesh 12 years ago.

Download all attachments as: .zip

Change History (4)

#1 @DJPaul
12 years ago

  • Milestone changed from Awaiting Review to 1.8

#2 @boonebgorges
11 years ago

  • Keywords commit added

#3 @boonebgorges
11 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 7173:

Use is_callable() to validate notification_callback

This allows the full gamut of callable formats to be used as notification
callbacks - eg, array( $my_object, 'my_callback' )

Fixes #4860

Props sbrajesh

Note: See TracTickets for help on using tickets.