Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/11/2021 05:26:17 PM (2 years ago)
Author:
espellcaste
Message:

Making PHPDoc Improvements to the BP Members (component) files.

Also, adding several minor PHP changes.

See #8553

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-invitations.php

    r12961 r13105  
    7070 * @since 8.0.0
    7171 *
    72  * @param bool   $send           Whether or not to send the activation key.
    73  * @param int    $user_id        User ID to send activation key to.
    74  * @param string $user_email     User email to send activation key to.
    75  * @param string $activation_key Activation key to be sent.
    76  * @param array  $usermeta       Miscellaneous metadata about the user (blog-specific
    77  *                               signup data, xprofile data, etc).
     72 * @param bool   $send       Whether or not to send the activation key.
     73 * @param int    $user_id    User ID to send activation key to.
     74 * @param string $user_email User email to send activation key to.
     75 *
    7876 * @return bool Whether or not to send the activation key.
    7977 */
    80 function bp_members_invitations_cancel_activation_email( $send, $user_id = 0, $user_email = '', $activation_key = '', $usermeta = array() ) {
     78function bp_members_invitations_cancel_activation_email( $send, $user_id = 0, $user_email = '' ) {
    8179    $invite = bp_members_invitations_get_invites(
    8280        array(
    8381            'invitee_email' => $user_email,
    84             'invite_sent'   => 'sent'
     82            'invite_sent'   => 'sent',
    8583        )
    8684    );
     
    9290    return $send;
    9391}
    94 add_filter( 'bp_core_signup_send_activation_key', 'bp_members_invitations_cancel_activation_email', 10, 5 );
     92add_filter( 'bp_core_signup_send_activation_key', 'bp_members_invitations_cancel_activation_email', 10, 3 );
    9593
    9694/**
     
    10199 * @since 8.0.0
    102100 *
    103  * @param bool|WP_Error   $user_id       True on success, WP_Error on failure.
    104  * @param string          $user_login    Login name requested by the user.
    105  * @param string          $user_password Password requested by the user.
    106  * @param string          $user_email    Email address requested by the user.
     101 * @global BuddyPress $bp The one true BuddyPress instance.
     102 *
     103 * @param bool|WP_Error $user_id True on success, WP_Error on failure.
    107104 */
    108 function bp_members_invitations_complete_signup( $user_id, $user_login = '', $user_password = '', $user_email = '' ) {
     105function bp_members_invitations_complete_signup( $user_id ) {
     106    $bp = buddypress();
     107
    109108    if ( ! $user_id ) {
    110109        return;
     
    147146    }
    148147}
    149 add_action( 'bp_core_signup_user', 'bp_members_invitations_complete_signup', 10, 4 );
     148add_action( 'bp_core_signup_user', 'bp_members_invitations_complete_signup' );
    150149
    151150/**
     
    157156 */
    158157function bp_members_invitations_delete_optedout_invites( $optout ) {
    159 
    160     $args = array(
    161         'invitee_email' => $optout->email_address,
     158    bp_members_invitations_delete_invites(
     159        array(
     160            'invitee_email' => $optout->email_address,
     161        )
    162162    );
    163     bp_members_invitations_delete_invites( $args );
    164163}
    165164add_action( 'bp_optout_after_save', 'bp_members_invitations_delete_optedout_invites' );
Note: See TracChangeset for help on using the changeset viewer.