Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 13 years ago

#4860 closed enhancement (fixed)

Allow Notification callbacks to be methods and not functions only

Reported by: sbrajesh Owned by: boonebgorges
Priority: normal Milestone: 1.8
Component: Toolbar & Notifications Version: 1.7
Severity: normal 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 14 years ago.

Download all attachments as: .zip

Change History (4)

#1 @DJPaul
14 years ago

  • Milestone Awaiting Review → 1.8

#2 @boonebgorges
13 years ago

  • Keywords commit added

#3 @boonebgorges
13 years ago

  • Owner set to boonebgorges
  • Resolution → fixed
  • Status new → 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.