[buddypress-trac] [BuddyPress Trac] #6210: Create New Invitations API

buddypress-trac noreply at wordpress.org
Tue Jun 28 14:32:52 UTC 2016


#6210: Create New Invitations API
--------------------------+-----------------------------
 Reporter:  dcavins       |       Owner:  dcavins
     Type:  enhancement   |      Status:  accepted
 Priority:  low           |   Milestone:  Future Release
Component:  Core          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+-----------------------------

Comment (by dcavins):

 Now that I have an understanding of how the business parts of invitations
 could work, I was thinking about how to make it more like an API. The two
 approaches that came to mind were:
 * handling it like the `BP_Group_Extension` class or the `BP_Attachment`
 class with stub functions that new implementations should include to
 specify the behavior they need.

 {{{
 class BP_Invitations_API {
 public function send_invitation() {}
 public function verify_invitation() {}
 public function accept_invitation() {}
 ...
 }
 }}}

 * handling it more like the class `WP_Customize_Setting`, by declaring
 callbacks via some helper function, like

 {{{
 bp_register_invitation_set( array(
         'send_invitation'   => 'my_send_invitation_callback',
         'verify_invitation' => 'my_verify_invitation_callback',
         'accept_invitation' => 'my_accept_invitation_callback',
 ) );
 }}}


 Does BP have a preference for what style we'd like to use?

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6210#comment:20>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list