Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#7052 closed defect (bug) (no action required)

Member visibility in BP_Email and hooked functions

Reported by: henry.wright Owned by:
Priority: normal Milestone:
Component: Core Version: 2.5.0
Severity: normal Keywords:
Cc:

Description

The bp_email action gives us the BP_Email object to use in our hooked functions:

do_action( 'bp_email', $email_type, $this );

The problem is, most of the BP_Email class properties are protected, so we can't actually use them outside the class:

// Doesn't work because BP_Email::$from is protected.
add_action( 'bp_email', function( $type, $obj ) {
    $obj->set_from( 'user@example.com', $obj->from->name );
} );

Perhaps we can relax the visibility of class members?

Change History (2)

#1 @henry.wright
10 years ago

  • Milestone Awaiting Review
  • Resolutioninvalid
  • Status newclosed

I completely overlooked BP_Email::get().

I'll close this.

#2 @DJPaul
10 years ago

  • Component APICore
Note: See TracTickets for help on using tickets.