Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/29/2021 08:31:02 AM (4 years ago)
Author:
imath
Message:

Member Invites: add missing /* translators: */ inline comments

This commit also:

  • adds some tiny improvements to get along with WP Coding Standards,
  • removes a forgotten PHP notice using the right $args variable instead of the undefined $all_args one in bp_members_invitations_get_registration_welcome_message()
  • removes an extra <hr class="wp-header-end"> into the Manage Invitations Admin screen that was causing admin notices to appear twice.
  • Uses the wpautop() function instead of an inexisting wpautop filter into bp_members_invitations_add_legacy_welcome_message() and bp_members_invitations_add_legacy_registration_disabled_message().

Huge Props dcavins for this awesome new feature!

See #8139

File:
1 edited

Legend:

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

    r12918 r12930  
    34023402 * @return bool True on success, false on failure.
    34033403 */
    3404 function bp_members_invitations_invite_user( $args ) {
    3405     $r = bp_parse_args( $args, array(
    3406         'invitee_email' => '',
    3407         'network_id'    => get_current_network_id(),
    3408         'inviter_id'    => bp_loggedin_user_id(),
    3409         'date_modified' => bp_core_current_time(),
    3410         'content'       => '',
    3411         'send_invite'   => 0
    3412     ), 'community_invite_user' );
     3404function bp_members_invitations_invite_user( $args = array() ) {
     3405    $r = bp_parse_args(
     3406        $args,
     3407        array(
     3408            'invitee_email' => '',
     3409            'network_id'    => get_current_network_id(),
     3410            'inviter_id'    => bp_loggedin_user_id(),
     3411            'date_modified' => bp_core_current_time(),
     3412            'content'       => '',
     3413            'send_invite'   => 0
     3414        ),
     3415        'community_invite_user'
     3416    );
    34133417
    34143418    $inv_args = array(
     
    35373541 * @return bool True if all were deleted.
    35383542 */
    3539 function bp_members_invitations_delete_invites( $args ) {
    3540     $r = bp_parse_args( $args, array(
    3541         'id'            => false,
    3542         'invitee_email' => '',
    3543         'network_id'    => get_current_network_id(),
    3544         'inviter_id'    => null,
    3545         'accepted'      => null,
    3546         'invite_sent'   => null
    3547     ), 'members_invitations_delete_invites' );
     3543function bp_members_invitations_delete_invites( $args = array() ) {
     3544    $r = bp_parse_args(
     3545        $args,
     3546        array(
     3547            'id'            => false,
     3548            'invitee_email' => '',
     3549            'network_id'    => get_current_network_id(),
     3550            'inviter_id'    => null,
     3551            'accepted'      => null,
     3552            'invite_sent'   => null
     3553        ),
     3554        'members_invitations_delete_invites'
     3555    );
    35483556
    35493557    $inv_args = array(
     
    35573565
    35583566    // Find the invitation(s).
    3559     $invites       = bp_members_invitations_get_invites( $inv_args );
    3560     $total_count   = count( $invites );
     3567    $invites     = bp_members_invitations_get_invites( $inv_args );
     3568    $total_count = count( $invites );
    35613569
    35623570    // Loop through, deleting each invitation.
     
    36253633        // Check to make sure the passed hash matches a calculated hash.
    36263634        $maybe_invite = $invites_class->get_by_id( absint( $_GET['inv'] ) );
    3627         $hash = bp_members_invitations_get_hash( $maybe_invite );
     3635        $hash         = bp_members_invitations_get_hash( $maybe_invite );
     3636
    36283637        if ( $_GET['ih'] === $hash ) {
    36293638            $invite = $maybe_invite;
Note: See TracChangeset for help on using the changeset viewer.