Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/02/2024 01:16:13 AM (14 months ago)
Author:
espellcaste
Message:

WPCS: Part VI: miscellaneous fixes for some of the files of the core component.

Follow-up to [13883], [13886], [13887], [13888], and [13891]

See #9164 and #7228

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-email-recipient.php

    r13372 r13892  
    11<?php
    22/**
    3  * Core component classes.
     3 * BuddyPress Email Recipient class.
     4 *
     5 * Represents a recipient that an email will be sent to.
    46 *
    57 * @package BuddyPress
     
    79 */
    810
    9 // Exit if accessed directly
     11// Exit if accessed directly.
    1012defined( 'ABSPATH' ) || exit;
    1113
    1214/**
    13  * Represents a recipient that an email will be sent to.
     15 * BP_Email_Recipient class.
    1416 *
    1517 * @since 2.5.0
     
    2224     * @since 2.5.0
    2325     *
    24      * @var WP_User
     26     * @var WP_User|null
    2527     */
    2628    protected $user_object = null;
     
    4547                $this->user_object = $email_or_user;
    4648
    47             // Query for WP user by user ID.
     49                // Query for WP user by user ID.
    4850            } elseif ( is_int( $email_or_user ) ) {
    4951                $this->user_object = get_user_by( 'id', $email_or_user );
     
    5557            }
    5658
    57         // Array or miscellaneous string.
     59            // Array or miscellaneous string.
    5860        } else {
    5961            if ( ! is_array( $email_or_user ) ) {
     
    8284        // We have a user object; so set address and name from DB.
    8385        if ( $this->user_object ) {
    84             // This is escaped with esc_html in bp_core_get_user_displayname()
     86            // This is escaped with esc_html in bp_core_get_user_displayname().
    8587            $wp_name = wp_specialchars_decode( bp_core_get_user_displayname( $this->user_object->ID ), ENT_QUOTES );
    8688
Note: See TracChangeset for help on using the changeset viewer.