Skip to:
Content

BuddyPress.org

Changeset 13818


Ignore:
Timestamp:
04/28/2024 12:23:47 PM (8 months ago)
Author:
imath
Message:

Core: improve PHP code standards using WPCS

See #7228 (trunk)

Location:
trunk/src
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-components.php

    r13637 r13818  
    187187    ?>
    188188
    189     <h3 class="screen-reader-text"><?php
    190         /* translators: accessibility text */
    191         esc_html_e( 'Filter components list', 'buddypress' );
    192     ?></h3>
     189    <h3 class="screen-reader-text">
     190        <?php
     191            /* translators: accessibility text */
     192            esc_html_e( 'Filter components list', 'buddypress' );
     193        ?>
     194    </h3>
    193195
    194196    <ul class="subsubsub">
     
    202204    </ul>
    203205
    204     <h3 class="screen-reader-text"><?php
    205         /* translators: accessibility text */
    206         esc_html_e( 'Components list', 'buddypress' );
    207     ?></h3>
     206    <h3 class="screen-reader-text">
     207        <?php
     208            /* translators: accessibility text */
     209            esc_html_e( 'Components list', 'buddypress' );
     210        ?>
     211    </h3>
    208212
    209213    <table class="wp-list-table widefat plugins">
     
    211215            <tr>
    212216                <td id="cb" class="manage-column column-cb check-column"><input id="cb-select-all-1" type="checkbox" <?php checked( empty( $inactive_components ) ); ?>>
    213                     <label class="screen-reader-text" for="cb-select-all-1"><?php
    214                     /* translators: accessibility text */
    215                     _e( 'Enable or disable all optional components in bulk', 'buddypress' );
    216                 ?></label></td>
    217                 <th scope="col" id="name" class="manage-column column-title column-primary"><?php _e( 'Component', 'buddypress' ); ?></th>
    218                 <th scope="col" id="description" class="manage-column column-description"><?php _e( 'Description', 'buddypress' ); ?></th>
     217                    <label class="screen-reader-text" for="cb-select-all-1">
     218                        <?php
     219                            /* translators: accessibility text */
     220                            esc_html_e( 'Enable or disable all optional components in bulk', 'buddypress' );
     221                        ?>
     222                    </label>
     223                </td>
     224                <th scope="col" id="name" class="manage-column column-title column-primary"><?php esc_html_e( 'Component', 'buddypress' ); ?></th>
     225                <th scope="col" id="description" class="manage-column column-description"><?php esc_html_e( 'Description', 'buddypress' ); ?></th>
    219226            </tr>
    220227        </thead>
     
    222229        <tbody id="the-list">
    223230
    224             <?php if ( !empty( $current_components ) ) : ?>
     231            <?php if ( ! empty( $current_components ) ) : ?>
    225232
    226233                <?php foreach ( $current_components as $name => $labels ) : ?>
    227234
    228                     <?php if ( !in_array( $name, array( 'core', 'members' ) ) ) :
     235                    <?php
     236                    if ( ! in_array( $name, array( 'core', 'members' ) ) ) {
    229237                        $class = isset( $active_components[esc_attr( $name )] ) ? 'active' : 'inactive';
    230                     else :
     238                    } else {
    231239                        $class = 'active';
    232                     endif; ?>
     240                    }
     241                    ?>
    233242
    234243                    <tr id="<?php echo esc_attr( $name ); ?>" class="<?php echo esc_attr( $name ) . ' ' . esc_attr( $class ); ?>">
    235244                        <th scope="row" class="check-column">
    236245
    237                             <?php if ( !in_array( $name, array( 'core', 'members' ) ) ) : ?>
    238 
    239                                 <input type="checkbox" id="<?php echo esc_attr( "bp_components[$name]" ); ?>" name="<?php echo esc_attr( "bp_components[$name]" ); ?>" value="1"<?php checked( isset( $active_components[esc_attr( $name )] ) ); ?> /><label for="<?php echo esc_attr( "bp_components[$name]" ); ?>" class="screen-reader-text"><?php
    240                                     /* translators: accessibility text */
    241                                     printf( __( 'Select %s', 'buddypress' ), esc_html( $labels['title'] ) ); ?></label>
     246                            <?php if ( ! in_array( $name, array( 'core', 'members' ) ) ) : ?>
     247
     248                                <input type="checkbox" id="<?php echo esc_attr( "bp_components[$name]" ); ?>" name="<?php echo esc_attr( "bp_components[$name]" ); ?>" value="1"<?php checked( isset( $active_components[esc_attr( $name )] ) ); ?> />
     249                                <label for="<?php echo esc_attr( "bp_components[$name]" ); ?>" class="screen-reader-text">
     250                                    <?php
     251                                        /* translators: accessibility text */
     252                                        printf( esc_html__( 'Select %s', 'buddypress' ), esc_html( $labels['title'] ) );
     253                                    ?>
     254                                </label>
    242255
    243256                            <?php endif; ?>
     
    253266                        <td class="column-description desc">
    254267                            <div class="plugin-description">
    255                                 <p><?php echo $labels['description']; ?></p>
     268                                <p>
     269                                    <?php
     270                                        echo wp_kses(
     271                                            $labels['description'],
     272                                            array(
     273                                                'a'    => array(
     274                                                    'href' => true,
     275                                                ),
     276                                                'del'  => true,
     277                                                'span' => array(
     278                                                    'class' => true,
     279                                                ),
     280                                            )
     281                                        );
     282                                    ?>
     283                                </p>
    256284                            </div>
    257285
     
    264292
    265293                <tr class="no-items">
    266                     <td class="colspanchange" colspan="3"><?php _e( 'No components found.', 'buddypress' ); ?></td>
     294                    <td class="colspanchange" colspan="3"><?php esc_html_e( 'No components found.', 'buddypress' ); ?></td>
    267295                </tr>
    268296
     
    274302            <tr>
    275303                <td class="manage-column column-cb check-column"><input id="cb-select-all-2" type="checkbox" <?php checked( empty( $inactive_components ) ); ?>>
    276                     <label class="screen-reader-text" for="cb-select-all-2"><?php
    277                     /* translators: accessibility text */
    278                     _e( 'Enable or disable all optional components in bulk', 'buddypress' );
    279                 ?></label></td>
    280                 <th class="manage-column column-title column-primary"><?php _e( 'Component', 'buddypress' ); ?></th>
    281                 <th class="manage-column column-description"><?php _e( 'Description', 'buddypress' ); ?></th>
     304                    <label class="screen-reader-text" for="cb-select-all-2">
     305                        <?php
     306                            /* translators: accessibility text */
     307                            esc_html_e( 'Enable or disable all optional components in bulk', 'buddypress' );
     308                        ?>
     309                    </label>
     310                </td>
     311                <th class="manage-column column-title column-primary"><?php esc_html_e( 'Component', 'buddypress' ); ?></th>
     312                <th class="manage-column column-description"><?php esc_html_e( 'Description', 'buddypress' ); ?></th>
    282313            </tr>
    283314        </tfoot>
  • trunk/src/bp-core/admin/bp-core-admin-functions.php

    r13772 r13818  
    116116            printf(
    117117                // Translators: 1: is the url to the BP Components settings screen. 2: is the url to the xProfile administration screen.
    118                 __( 'Components, Pages, Settings, and Forums, have been moved to <a href="%1$s">Settings &gt; BuddyPress</a>. Profile Fields has been moved into the <a href="%2$s">Users</a> menu.', 'buddypress' ),
     118                esc_html__( 'Components, Pages, Settings, and Forums, have been moved to <a href="%1$s">Settings &gt; BuddyPress</a>. Profile Fields has been moved into the <a href="%2$s">Users</a> menu.', 'buddypress' ),
    119119                esc_url( $settings_url ),
    120                 bp_get_admin_url( 'users.php?page=bp-profile-setup' )
     120                esc_url( bp_get_admin_url( 'users.php?page=bp-profile-setup' ) )
    121121            );
    122122            ?>
     
    161161
    162162        foreach ( $notices as $notice ) {
    163             printf( '<p>%s</p>', $notice['message'] );
     163            printf(
     164                '<p>%s</p>',
     165                wp_kses(
     166                    $notice['message'],
     167                    array(
     168                        'strong' => true,
     169                        'code'   => true,
     170                        'a'      => array(
     171                            'href' => true,
     172                        ),
     173                    )
     174                )
     175            );
    164176        }
    165177
     
    423435                <?php foreach ( $bp->admin->nav_tabs as $nav_tab ) : ?>
    424436
    425                     <?php echo $nav_tab; ?>
     437                    <?php
     438                        echo wp_kses(
     439                            $nav_tab,
     440                            array(
     441                                'a' => array(
     442                                    'href'  => true,
     443                                    'class' => true
     444                                ),
     445                            )
     446                        );
     447                    ?>
    426448
    427449                <?php endforeach; ?>
     
    472494    }
    473495
     496    // phpcs:ignore WordPress.Security.EscapeOutput
    474497    echo implode( "\n", $tabs_html );
     498
    475499    /**
    476500     * Fires after the output of tabs for the admin area.
     
    651675        _doing_it_wrong(
    652676            'bp_core_admin_tabs()',
    653             __( 'BuddyPress Settings and Tools Screens are now using a new tabbed header. Please use `bp_core_admin_tabbed_screen_header()` instead of bp_core_admin_tabs() to output tabs.', 'buddypress' ),
     677            esc_html__( 'BuddyPress Settings and Tools Screens are now using a new tabbed header. Please use `bp_core_admin_tabbed_screen_header()` instead of bp_core_admin_tabs() to output tabs.', 'buddypress' ),
    654678            '10.0.0'
    655679        );
     
    11941218    }
    11951219
     1220    // phpcs:ignore WordPress.Security.EscapeOutput
    11961221    echo preg_replace( '/\<div(\sclass=\".*\"\s|\s)id=\"tabs-panel-posttype-bp_nav_menu_item-search\"[^>]*>(.*?)\<\/div\>/s', $all_bp_tabs, $output );
    11971222}
     
    12751300
    12761301    $tax_name = esc_attr( $r['taxonomy'] );
     1302
     1303    // phpcs:disable WordPress.Security.EscapeOutput
    12771304    ?>
    12781305    <div id="taxonomy-<?php echo $tax_name; ?>" class="categorydiv">
     
    12981325    </div>
    12991326    <?php
     1327    // phpcs:enable
    13001328}
    13011329
     
    13271355    <?php
    13281356        /* translators: accessibility text */
    1329         _e( 'Plain text email content', 'buddypress' );
     1357        esc_html_e( 'Plain text email content', 'buddypress' );
    13301358    ?>
    1331     </label><textarea rows="5" cols="40" name="excerpt" id="excerpt"><?php echo $post->post_excerpt; // textarea_escaped ?></textarea>
    1332 
    1333     <p><?php _e( 'Most email clients support HTML email. However, some people prefer to receive plain text email. Enter a plain text alternative version of your email here.', 'buddypress' ); ?></p>
     1359    </label>
     1360        <textarea rows="5" cols="40" name="excerpt" id="excerpt"><?php
     1361            // phpcs:ignore WordPress.Security.EscapeOutput
     1362            echo $post->post_excerpt; ?>
     1363        </textarea>
     1364
     1365    <p><?php esc_html_e( 'Most email clients support HTML email. However, some people prefer to receive plain text email. Enter a plain text alternative version of your email here.', 'buddypress' ); ?></p>
    13341366
    13351367    <?php
     
    16081640        <a class="bp-welcome-panel-close bp-is-dismissible" href="#" data-notice_id="<?php echo esc_attr( $notification->id ); ?>" aria-label="<?php esc_attr_e( 'Dismiss the notification', 'buddypress' ); ?>"><?php esc_html_e( 'Dismiss', 'buddypress' ); ?></a>
    16091641        <div class="bp-welcome-panel-content">
    1610             <h2><span class="bp-version"><?php echo number_format_i18n( $notification->version, 1 ); ?></span> <?php echo esc_html( $notification->title ); ?></h2>
     1642            <h2><span class="bp-version"><?php echo esc_html( number_format_i18n( $notification->version, 1 ) ); ?></span> <?php echo esc_html( $notification->title ); ?></h2>
    16111643            <p class="about-description">
    16121644                <?php echo wp_kses( $notification->content, array( 'a' => array( 'href' => true ), 'br' => array(), 'strong' => array() ) ); ?>
  • trunk/src/bp-core/admin/bp-core-admin-optouts.php

    r13137 r13818  
    438438                    $last_modified = mysql2date( 'Y/m/d g:i:s a', $optout->date_modified );
    439439                    /* translators: %s: modification date */
    440                     printf( esc_html__( 'Date modified: %s', 'buddypress'), $last_modified );
     440                    printf( esc_html__( 'Date modified: %s', 'buddypress'), esc_html( $last_modified ) );
    441441                    ?>
    442442                </p>
  • trunk/src/bp-core/admin/bp-core-admin-settings.php

    r13633 r13818  
    2828
    2929    <input id="hide-loggedout-adminbar" name="hide-loggedout-adminbar" type="checkbox" value="1" <?php checked( !bp_hide_loggedout_adminbar( false ) ); ?> />
    30     <label for="hide-loggedout-adminbar"><?php _e( 'Show the Toolbar for logged out users', 'buddypress' ); ?></label>
     30    <label for="hide-loggedout-adminbar"><?php esc_html_e( 'Show the Toolbar for logged out users', 'buddypress' ); ?></label>
    3131
    3232<?php
     
    109109    }
    110110
     111    // phpcs:disable WordPress.Security.EscapeOutput
    111112    if ( $options ) : ?>
    112113        <select name="_bp_theme_package_id" id="_bp_theme_package_id" aria-describedby="_bp_theme_package_description"><?php echo $options; ?></select>
     
    117118
    118119    <?php endif;
     120    // phpcs:enable
    119121}
    120122
     
    138140
    139141    <input id="_bp_enable_akismet" name="_bp_enable_akismet" type="checkbox" value="1" <?php checked( bp_is_akismet_active( true ) ); ?> />
    140     <label for="_bp_enable_akismet"><?php _e( 'Allow Akismet to scan for activity stream spam', 'buddypress' ); ?></label>
     142    <label for="_bp_enable_akismet"><?php esc_html_e( 'Allow Akismet to scan for activity stream spam', 'buddypress' ); ?></label>
    141143
    142144<?php
     
    170172
    171173    <input id="_bp_enable_heartbeat_refresh" name="_bp_enable_heartbeat_refresh" type="checkbox" value="1" <?php checked( bp_is_activity_heartbeat_active( true ) ); ?> />
    172     <label for="_bp_enable_heartbeat_refresh"><?php _e( 'Automatically check for new items while viewing the activity stream', 'buddypress' ); ?></label>
     174    <label for="_bp_enable_heartbeat_refresh"><?php esc_html_e( 'Automatically check for new items while viewing the activity stream', 'buddypress' ); ?></label>
    173175
    174176<?php
     
    208210function bp_admin_setting_callback_avatar_uploads() {
    209211?>
    210     <input id="bp-disable-avatar-uploads" name="bp-disable-avatar-uploads" type="checkbox" value="1" <?php checked( !bp_disable_avatar_uploads( false ) ); ?> />
    211     <label for="bp-disable-avatar-uploads"><?php _e( 'Allow registered members to upload avatars', 'buddypress' ); ?></label>
     212    <input id="bp-disable-avatar-uploads" name="bp-disable-avatar-uploads" type="checkbox" value="1" <?php checked( ! bp_disable_avatar_uploads( false ) ); ?> />
     213    <label for="bp-disable-avatar-uploads"><?php esc_html_e( 'Allow registered members to upload avatars', 'buddypress' ); ?></label>
    212214<?php
    213215}
     
    222224?>
    223225    <input id="bp-disable-cover-image-uploads" name="bp-disable-cover-image-uploads" type="checkbox" value="1" <?php checked( ! bp_disable_cover_image_uploads() ); ?> />
    224     <label for="bp-disable-cover-image-uploads"><?php _e( 'Allow registered members to upload cover images', 'buddypress' ); ?></label>
     226    <label for="bp-disable-cover-image-uploads"><?php esc_html_e( 'Allow registered members to upload cover images', 'buddypress' ); ?></label>
    225227<?php
    226228}
     
    234236?>
    235237    <input id="bp-enable-members-invitations" name="bp-enable-members-invitations" type="checkbox" value="1" <?php checked( bp_get_members_invitations_allowed() ); ?> />
    236     <label for="bp-enable-members-invitations"><?php _e( 'Allow registered members to invite people to join this network', 'buddypress' ); ?></label>
     238    <label for="bp-enable-members-invitations"><?php esc_html_e( 'Allow registered members to invite people to join this network', 'buddypress' ); ?></label>
    237239    <?php if ( ! bp_get_signup_allowed() ) : ?>
    238240        <p class="description"><?php esc_html_e( 'Public registration is currently disabled. However, invitees will still be able to register if network invitations are enabled.', 'buddypress' ); ?></p>
     
    296298
    297299    <input id="bp-disable-profile-sync" name="bp-disable-profile-sync" type="checkbox" value="1" <?php checked( !bp_disable_profile_sync( false ) ); ?> />
    298     <label for="bp-disable-profile-sync"><?php _e( 'Enable BuddyPress to WordPress profile syncing', 'buddypress' ); ?></label>
     300    <label for="bp-disable-profile-sync"><?php esc_html_e( 'Enable BuddyPress to WordPress profile syncing', 'buddypress' ); ?></label>
    299301
    300302<?php
     
    320322
    321323    <input id="bp_restrict_group_creation" name="bp_restrict_group_creation" type="checkbox" aria-describedby="bp_group_creation_description" value="1" <?php checked( !bp_restrict_group_creation( false ) ); ?> />
    322     <label for="bp_restrict_group_creation"><?php _e( 'Enable group creation for all users', 'buddypress' ); ?></label>
    323     <p class="description" id="bp_group_creation_description"><?php _e( 'Administrators can always create groups, regardless of this setting.', 'buddypress' ); ?></p>
     324    <label for="bp_restrict_group_creation"><?php esc_html_e( 'Enable group creation for all users', 'buddypress' ); ?></label>
     325    <p class="description" id="bp_group_creation_description"><?php esc_html_e( 'Administrators can always create groups, regardless of this setting.', 'buddypress' ); ?></p>
    324326
    325327<?php
     
    334336?>
    335337    <input id="bp-disable-group-avatar-uploads" name="bp-disable-group-avatar-uploads" type="checkbox" value="1" <?php checked( ! bp_disable_group_avatar_uploads() ); ?> />
    336     <label for="bp-disable-group-avatar-uploads"><?php _e( 'Allow customizable avatars for groups', 'buddypress' ); ?></label>
     338    <label for="bp-disable-group-avatar-uploads"><?php esc_html_e( 'Allow customizable avatars for groups', 'buddypress' ); ?></label>
    337339<?php
    338340}
     
    346348?>
    347349    <input id="bp-disable-group-cover-image-uploads" name="bp-disable-group-cover-image-uploads" type="checkbox" value="1" <?php checked( ! bp_disable_group_cover_image_uploads() ); ?> />
    348     <label for="bp-disable-group-cover-image-uploads"><?php _e( 'Allow customizable cover images for groups', 'buddypress' ); ?></label>
     350    <label for="bp-disable-group-cover-image-uploads"><?php esc_html_e( 'Allow customizable cover images for groups', 'buddypress' ); ?></label>
    349351<?php
    350352}
     
    463465 */
    464466function bp_form_option( $option, $default = '' , $slug = false ) {
     467    // phpcs:ignore WordPress.Security.EscapeOutput
    465468    echo bp_get_form_option( $option, $default, $slug );
    466469}
  • trunk/src/bp-core/admin/bp-core-admin-slugs.php

    r13477 r13818  
    1212defined( 'ABSPATH' ) || exit;
    1313
    14 _deprecated_file( basename( __FILE__ ), '12.0.0', '', __( 'BuddyPress does not use page association anymore, you can restore it using the BP Classic plugin', 'buddypress' ) );
     14_deprecated_file( basename( __FILE__ ), '12.0.0', '', esc_html__( 'BuddyPress does not use page association anymore, you can restore it using the BP Classic plugin', 'buddypress' ) );
  • trunk/src/bp-core/admin/bp-core-admin-tools.php

    r13798 r13818  
    558558    $message = '<div id="message" class="' . esc_attr( $class ) . ' notice is-dismissible">' . $message . '</div>';
    559559    $message = str_replace( "'", "\'", $message );
    560     $lambda  = function() use ( $message ) { echo $message; };
     560    $lambda  = function() use ( $message ) {
     561        echo wp_kses(
     562            $message,
     563            array(
     564                'p'   => true,
     565                'ul'  => true,
     566                'li'  => true,
     567                'div' => array(
     568                    'id' => true,
     569                    'class' => true,
     570                ),
     571                'a'   => array(
     572                    'href' => true,
     573                ),
     574            )
     575        );
     576    };
    561577
    562578    add_action( bp_core_do_network_admin() ? 'network_admin_notices' : 'admin_notices', $lambda );
     
    723739    }
    724740
    725     echo '<div class="error"><p>' . __( 'It looks like you have more sites to record. Resume recording by checking the "Repopulate site tracking records" option.', 'buddypress' ) . '</p></div>';
     741    echo '<div class="error"><p>' . esc_html__( 'It looks like you have more sites to record. Resume recording by checking the "Repopulate site tracking records" option.', 'buddypress' ) . '</p></div>';
    726742}
    727743add_action( 'network_admin_notices', 'bp_core_admin_notice_repopulate_blogs_resume' );
  • trunk/src/bp-core/bp-core-caps.php

    r13540 r13818  
    483483 */
    484484function bp_add_roles() {
    485     _doing_it_wrong( 'bp_add_roles', __( 'Special community roles no longer exist. Use mapped capabilities instead', 'buddypress' ), '1.7' );
     485    _doing_it_wrong( 'bp_add_roles', esc_html__( 'Special community roles no longer exist. Use mapped capabilities instead', 'buddypress' ), '1.7' );
    486486}
    487487
     
    495495 */
    496496function bp_remove_roles() {
    497     _doing_it_wrong( 'bp_remove_roles', __( 'Special community roles no longer exist. Use mapped capabilities instead', 'buddypress' ), '1.7' );
     497    _doing_it_wrong( 'bp_remove_roles', esc_html__( 'Special community roles no longer exist. Use mapped capabilities instead', 'buddypress' ), '1.7' );
    498498}
    499499
     
    509509 */
    510510function bp_get_participant_role() {
    511     _doing_it_wrong( 'bp_get_participant_role', __( 'Special community roles no longer exist. Use mapped capabilities instead', 'buddypress' ), '1.7' );
     511    _doing_it_wrong( 'bp_get_participant_role', esc_html__( 'Special community roles no longer exist. Use mapped capabilities instead', 'buddypress' ), '1.7' );
    512512}
    513513
     
    519519 */
    520520function bp_get_moderator_role() {
    521     _doing_it_wrong( 'bp_get_moderator_role', __( 'Special community roles no longer exist. Use mapped capabilities instead', 'buddypress' ), '1.7' );
    522 }
     521    _doing_it_wrong( 'bp_get_moderator_role', esc_html__( 'Special community roles no longer exist. Use mapped capabilities instead', 'buddypress' ), '1.7' );
     522}
  • trunk/src/bp-core/bp-core-cssjs.php

    r13709 r13818  
    328328    <style type="text/css">
    329329        .jcrop-holder { float: left; margin: 0 20px 20px 0; text-align: left; }
    330         #avatar-crop-pane { width: <?php echo bp_core_avatar_full_width() ?>px; height: <?php echo bp_core_avatar_full_height() ?>px; overflow: hidden; }
     330        #avatar-crop-pane { width: <?php echo intval( bp_core_avatar_full_width() ); ?>px; height: <?php echo intval( bp_core_avatar_full_height() ); ?>px; overflow: hidden; }
    331331        #avatar-crop-submit { margin: 20px 0; }
    332332        .jcrop-holder img,
     
    348348?>
    349349
    350     <script type="text/javascript">var ajaxurl = '<?php echo bp_core_ajax_url(); ?>';</script>
     350    <script type="text/javascript">var ajaxurl = '<?php echo esc_url( bp_core_ajax_url() ); ?>';</script>
    351351
    352352<?php
  • trunk/src/bp-core/bp-core-filters.php

    r13687 r13818  
    13211321    // Make sure we add a <title> tag so WP Customizer picks it up.
    13221322    $template = str_replace( '<head>', '<head><title>' . esc_html_x( 'BuddyPress Emails', 'screen heading', 'buddypress' ) . '</title>', $template );
     1323
     1324    // phpcs:ignore WordPress.Security.EscapeOutput
    13231325    echo str_replace( '{{{content}}}', wpautop( get_post()->post_content ), $template );
    13241326
  • trunk/src/bp-core/bp-core-functions.php

    r13777 r13818  
    1919 */
    2020function bp_version() {
    21     echo bp_get_version();
     21    echo esc_html( bp_get_version() );
    2222}
    2323    /**
     
    3838 */
    3939function bp_db_version() {
    40     echo bp_get_db_version();
     40    echo esc_html( bp_get_db_version() );
    4141}
    4242    /**
     
    5757 */
    5858function bp_db_version_raw() {
    59     echo bp_get_db_version_raw();
     59    echo esc_html( bp_get_db_version_raw() );
    6060}
    6161    /**
     
    7979 */
    8080function bp_major_version( $version = '' ) {
    81     echo bp_get_major_version( $version );
     81    echo esc_html( bp_get_major_version( $version ) );
    8282}
    8383
     
    113113 */
    114114function bp_initial_version() {
    115     echo bp_get_initial_version();
     115    echo esc_html( bp_get_initial_version() );
    116116}
    117117
     
    15711571 */
    15721572 function bp_core_iso8601_date( $timestamp = '' ) {
    1573     echo bp_core_get_iso8601_date( $timestamp );
     1573    echo esc_attr( bp_core_get_iso8601_date( $timestamp ) );
    15741574}
    15751575    /**
     
    16961696        <div id="message" class="bp-template-notice <?php echo esc_attr( $type ); ?>">
    16971697
    1698             <?php echo $content; ?>
     1698            <?php
     1699                // Escaping is done in `bp-core/bp-core-filters.php`.
     1700                // phpcs:ignore WordPress.Security.EscapeOutput
     1701                echo $content;
     1702            ?>
    16991703
    17001704        </div>
     
    31653169 */
    31663170function bp_email_post_type() {
    3167     echo bp_get_email_post_type();
     3171    echo esc_html( bp_get_email_post_type() );
    31683172}
    31693173    /**
     
    32913295 */
    32923296function bp_email_tax_type() {
    3293     echo bp_get_email_tax_type();
     3297    echo esc_html( bp_get_email_tax_type() );
    32943298}
    32953299    /**
     
    44964500            esc_html( $unsub_msg ),
    44974501            array(
    4498                 'link_url'  => home_url(),
    4499                 'link_text' => __( 'Go to website\'s home page.', 'buddypress' ),
     4502                'link_url'  => esc_url( home_url() ),
     4503                'link_text' => esc_html__( 'Go to website\'s home page.', 'buddypress' ),
    45004504            )
    45014505        );
  • trunk/src/bp-core/bp-core-template-loader.php

    r13752 r13818  
    415415    // Echo or return the output buffer contents.
    416416    if ( true === $echo ) {
     417        // phpcs:ignore WordPress.Security.EscapeOutput
    417418        echo $output;
    418419    } else {
  • trunk/src/bp-core/bp-core-template.php

    r13692 r13818  
    9292        $list_type = bp_is_group() ? 'groups' : 'personal';
    9393
    94         /**
    95          * Filters the "options nav", the secondary-level single item navigation menu.
    96          *
    97          * This is a dynamic filter that is dependent on the provided css_id value.
    98          *
    99          * @since 1.1.0
    100          *
    101          * @param string $value         HTML list item for the submenu item.
    102          * @param array  $subnav_item   Submenu array item being displayed.
    103          * @param string $selected_item Current action.
    104          */
    105         echo apply_filters( 'bp_get_options_nav_' . $subnav_item->css_id, '<li id="' . esc_attr( $subnav_item->css_id . '-' . $list_type . '-li' ) . '" ' . $selected . '><a id="' . esc_attr( $subnav_item->css_id ) . '" href="' . esc_url( $subnav_item->link ) . '">' . $subnav_item->name . '</a></li>', $subnav_item, $selected_item );
     94        // phpcs:ignore WordPress.Security.EscapeOutput
     95        echo apply_filters(
     96            /**
     97             * Filters the "options nav", the secondary-level single item navigation menu.
     98             *
     99             * This is a dynamic filter that is dependent on the provided css_id value.
     100             *
     101             * @since 1.1.0
     102             *
     103             * @param string $value         HTML list item for the submenu item.
     104             * @param array  $subnav_item   Submenu array item being displayed.
     105             * @param string $selected_item Current action.
     106             */
     107            'bp_get_options_nav_' . $subnav_item->css_id,
     108            '<li id="' . esc_attr( $subnav_item->css_id . '-' . $list_type . '-li' ) . '" ' . $selected . '><a id="' . esc_attr( $subnav_item->css_id ) . '" href="' . esc_url( $subnav_item->link ) . '">' . wp_kses( $subnav_item->name, array( 'span' => array( 'class' => true ) ) ) . '</a></li>',
     109            $subnav_item,
     110            $selected_item
     111        );
    106112    }
    107113}
     
    150156 */
    151157function bp_avatar_admin_step() {
    152     echo bp_get_avatar_admin_step();
     158    echo esc_html( bp_get_avatar_admin_step() );
    153159}
    154160    /**
     
    182188 */
    183189function bp_avatar_to_crop() {
    184     echo bp_get_avatar_to_crop();
     190    echo esc_url( bp_get_avatar_to_crop() );
    185191}
    186192    /**
     
    213219 */
    214220function bp_avatar_to_crop_src() {
    215     echo bp_get_avatar_to_crop_src();
     221    echo esc_attr( bp_get_avatar_to_crop_src() );
    216222}
    217223    /**
     
    244250 */
    245251function bp_site_name() {
    246     echo bp_get_site_name();
     252    echo esc_html( bp_get_site_name() );
    247253}
    248254    /**
     
    381387             * @param string $youtext Context-determined string to display.
    382388             */
    383             echo apply_filters( 'bp_word_or_name', $youtext );
     389            echo esc_html( apply_filters( 'bp_word_or_name', $youtext ) );
    384390        } else {
    385391
     
    394400
    395401            /** This filter is documented in bp-core/bp-core-template.php */
    396             echo apply_filters( 'bp_word_or_name', $nametext );
     402            echo esc_html( apply_filters( 'bp_word_or_name', $nametext ) );
    397403        } else {
    398404
     
    558564 */
    559565function bp_search_default_text( $component = '' ) {
    560     echo bp_get_search_default_text( $component );
     566    echo esc_attr( bp_get_search_default_text( $component ) );
    561567}
    562568    /**
     
    614620 */
    615621function bp_form_field_attributes( $name = '', $attributes = array() ) {
     622    // phpcs:ignore WordPress.Security.EscapeOutput
    616623    echo bp_get_form_field_attributes( $name, $attributes );
    617624}
     
    696703 */
    697704function bp_button( $args = '' ) {
     705    // Escaping is done in `BP_Core_HTML_Element()`.
     706    // phpcs:ignore WordPress.Security.EscapeOutput
    698707    echo bp_get_button( $args );
    699708}
     
    970979 */
    971980function bp_total_member_count() {
    972     echo bp_get_total_member_count();
     981    echo esc_html( bp_get_total_member_count() );
    973982}
    974983    /**
     
    13251334 */
    13261335function bp_root_slug( $component = '' ) {
    1327     echo bp_get_root_slug( $component );
     1336    echo esc_url( bp_get_root_slug( $component ) );
    13281337}
    13291338    /**
     
    14551464 */
    14561465function bp_search_slug() {
    1457     echo bp_get_search_slug();
     1466    echo esc_url( bp_get_search_slug() );
    14581467}
    14591468    /**
     
    31413150 */
    31423151function bp_the_body_class() {
    3143     echo bp_get_the_body_class();
     3152    echo implode( ' ', array_map( 'sanitize_html_class', bp_get_the_body_class() ) );
    31443153}
    31453154    /**
     
    37033712
    37043713    if ( ! empty( $args->echo ) ) {
     3714        // phpcs:ignore WordPress.Security.EscapeOutput
    37053715        echo $nav_menu;
    37063716    } else {
     
    37173727 */
    37183728function bp_email_the_salutation( $settings = array() ) {
    3719     echo bp_email_get_salutation( $settings );
     3729    echo esc_html( bp_email_get_salutation( $settings ) );
    37203730}
    37213731
  • trunk/src/bp-core/bp-core-widgets.php

    r13481 r13818  
    1212defined( 'ABSPATH' ) || exit;
    1313
    14 _deprecated_file( basename( __FILE__ ), '12.0.0', '', __( 'BuddyPress does not include Legacy Widgets anymore, you can restore it using the BP Classic plugin', 'buddypress' ) );
     14_deprecated_file( basename( __FILE__ ), '12.0.0', '', esc_html__( 'BuddyPress does not include Legacy Widgets anymore, you can restore it using the BP Classic plugin', 'buddypress' ) );
  • trunk/src/bp-core/classes/class-bp-admin-types.php

    r13771 r13818  
    372372                _doing_it_wrong(
    373373                    __METHOD__,
    374                     __( 'Type metadata labels need to be set into the labels argument when registering your taxonomy using the meta key as the label’s key.', 'buddypress' )
     374                    esc_html__( 'Type metadata labels need to be set into the labels argument when registering your taxonomy using the meta key as the label’s key.', 'buddypress' )
    375375                    . ' ' .
    376376                    sprintf(
    377377                        /* translators: %s is the name of the Type meta key */
    378                         __( 'As a result, the form elements for the "%s" meta key cannot be displayed', 'buddypress' ), $meta_key ),
     378                        esc_html__( 'As a result, the form elements for the "%s" meta key cannot be displayed', 'buddypress' ), esc_html( $meta_key ) ),
    379379                    '7.0.0'
    380380                );
     
    439439                        esc_attr( $meta_key ),
    440440                        esc_html( $labels->{ $meta_key } ),
     441                        // phpcs:ignore WordPress.Security.EscapeOutput
    441442                        $checked,
    442443                        esc_html__( 'Yes', 'buddypress' ),
  • trunk/src/bp-core/classes/class-bp-admin.php

    r13789 r13818  
    803803                            /* translators: %s is the placeholder for the BuddyPress version number. */
    804804                            esc_html__( 'BuddyPress %s', 'buddypress' ),
    805                             $version
     805                            esc_html( $version )
    806806                        ); ?>
    807807                    </h1>
     
    821821                                    /* Translators: %s is a raising hands emoji. */
    822822                                    esc_html__( 'You now have complete control over all BuddyPress-generated URLs %s', 'buddypress' ),
     823                                    // phpcs:ignore WordPress.Security.EscapeOutput
    823824                                    wp_staticize_emoji( '🙌' )
    824825                                );
     
    891892                                    /* Translators: %s is a woman supervillain emoji. */
    892893                                    esc_html__( 'Here\'s another benefit of the BP Rewrites API: the new "members only" community visibility level %s', 'buddypress' ),
     894                                    // phpcs:ignore WordPress.Security.EscapeOutput
    893895                                    wp_staticize_emoji( '🦹🏻' )
    894896                                );
     
    930932                                    /* Translators: %s is a smiling face with heart-eyes emoji. */
    931933                                    esc_html__( 'Many thanks to you for trusting BuddyPress to power your community site %s', 'buddypress' ),
     934                                    // phpcs:ignore WordPress.Security.EscapeOutput
    932935                                    wp_staticize_emoji( '😍' )
    933936                                );
     
    943946                    <p>
    944947                        <?php
    945                         printf(
    946                             /* translators: 1: heart dashicons. 2: BP Credits screen url. 3: number of BuddyPress contributors to this version. */
    947                             _n( 'Built with %1$s by <a href="%2$s">%3$d volunteer</a>.', 'Built with %1$s by <a href="%2$s">%3$d volunteers</a>.', 49, 'buddypress' ),
    948                             '<span class="dashicons dashicons-heart"></span>',
    949                             esc_url( bp_get_admin_url( 'admin.php?page=bp-credits' ) ),
    950                             number_format_i18n( 49 )
     948                        echo wp_kses(
     949                            sprintf(
     950                                /* translators: 1: heart dashicons. 2: BP Credits screen url. 3: number of BuddyPress contributors to this version. */
     951                                _n( 'Built with %1$s by <a href="%2$s">%3$d volunteer</a>.', 'Built with %1$s by <a href="%2$s">%3$d volunteers</a>.', 49, 'buddypress' ),
     952                                '<span class="dashicons dashicons-heart"></span>',
     953                                esc_url( bp_get_admin_url( 'admin.php?page=bp-credits' ) ),
     954                                esc_html( number_format_i18n( 49 ) )
     955                            ),
     956                            array(
     957                                'a'    => array(
     958                                    'href' => true,
     959                                ),
     960                                'span' => array(
     961                                    'class' => true,
     962                                )
     963                            )
    951964                        );
    952965                        ?>
     
    10991112                    /* translators: %s: BuddyPress version number */
    11001113                    esc_html__( 'Noteworthy Contributors to %s', 'buddypress' ),
    1101                     self::display_version()
     1114                    esc_html( self::display_version() )
    11021115                );
    11031116                ?>
     
    11231136                    /* translators: %s: BuddyPress version number */
    11241137                    esc_html__( 'All Contributors to BuddyPress %s', 'buddypress' ),
    1125                     self::display_version()
     1138                    esc_html( self::display_version() )
    11261139                );
    11271140                ?>
     
    12661279
    12671280        if ( is_wp_error( $terms ) || ! $terms  ) {
    1268             printf( '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">%s</span>', $taxonomy_object->labels->no_terms );
     1281            printf( '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">%s</span>', esc_html( $taxonomy_object->labels->no_terms ) );
    12691282        } else {
    12701283            $situations = wp_list_pluck( $terms, 'description' );
     
    12721285            // Output each situation as a list item.
    12731286            echo '<ul><li>';
    1274             echo implode( '</li><li>', $situations );
     1287            echo implode( '</li><li>', array_map( 'esc_html', $situations ) );
    12751288            echo '</li></ul>';
    12761289        }
  • trunk/src/bp-core/classes/class-bp-button.php

    r13372 r13818  
    332332                _doing_it_wrong(
    333333                    __CLASS__,
    334                     __( 'The `href` attribute is not available inside the `&lt;button&gt;` tag. Please use a `data-*` attribute to transport a link into this tag.', 'buddypress' ),
     334                    esc_html__( 'The `href` attribute is not available inside the `&lt;button&gt;` tag. Please use a `data-*` attribute to transport a link into this tag.', 'buddypress' ),
    335335                    '9.0.0'
    336336                );
     
    444444     */
    445445    public function display() {
    446         if ( !empty( $this->contents ) )
     446        if ( ! empty( $this->contents ) ) {
     447            // phpcs:ignore WordPress.Security.EscapeOutput
    447448            echo $this->contents;
     449        }
    448450    }
    449451}
  • trunk/src/bp-core/classes/class-bp-core-bp-nav-backcompat.php

    r13507 r13818  
    6868        _doing_it_wrong(
    6969            'bp_nav',
    70             __( 'The bp_nav and bp_options_nav globals should not be used directly and are deprecated. Please use the BuddyPress nav functions instead.', 'buddypress' ),
     70            esc_html__( 'The bp_nav and bp_options_nav globals should not be used directly and are deprecated. Please use the BuddyPress nav functions instead.', 'buddypress' ),
    7171            '2.6.0'
    7272        );
     
    8787        _doing_it_wrong(
    8888            'bp_nav',
    89             __( 'The bp_nav and bp_options_nav globals should not be used directly and are deprecated. Please use the BuddyPress nav functions instead.', 'buddypress' ),
     89            esc_html__( 'The bp_nav and bp_options_nav globals should not be used directly and are deprecated. Please use the BuddyPress nav functions instead.', 'buddypress' ),
    9090            '2.6.0'
    9191        );
     
    106106        _doing_it_wrong(
    107107            'bp_nav',
    108             __( 'The bp_nav and bp_options_nav globals should not be used directly and are deprecated. Please use the BuddyPress nav functions instead.', 'buddypress' ),
     108            esc_html__( 'The bp_nav and bp_options_nav globals should not be used directly and are deprecated. Please use the BuddyPress nav functions instead.', 'buddypress' ),
    109109            '2.6.0'
    110110        );
     
    124124        _doing_it_wrong(
    125125            'bp_nav',
    126             __( 'The bp_nav and bp_options_nav globals should not be used directly and are deprecated. Please use the BuddyPress nav functions instead.', 'buddypress' ),
     126            esc_html__( 'The bp_nav and bp_options_nav globals should not be used directly and are deprecated. Please use the BuddyPress nav functions instead.', 'buddypress' ),
    127127            '2.6.0'
    128128        );
  • trunk/src/bp-core/classes/class-bp-core-bp-options-nav-backcompat.php

    r13507 r13818  
    4141        _doing_it_wrong(
    4242            'bp_nav',
    43             __( 'These globals should not be used directly and are deprecated. Please use the BuddyPress nav functions instead.', 'buddypress' ),
     43            esc_html__( 'These globals should not be used directly and are deprecated. Please use the BuddyPress nav functions instead.', 'buddypress' ),
    4444            '2.6.0'
    4545        );
     
    5858        _doing_it_wrong(
    5959            'bp_nav',
    60             __( 'These globals should not be used directly and are deprecated. Please use the BuddyPress nav functions instead.', 'buddypress' ),
     60            esc_html__( 'These globals should not be used directly and are deprecated. Please use the BuddyPress nav functions instead.', 'buddypress' ),
    6161            '2.6.0'
    6262        );
  • trunk/src/bp-core/classes/class-bp-core-login-widget.php

    r13481 r13818  
    1212defined( 'ABSPATH' ) || exit;
    1313
    14 _deprecated_file( basename( __FILE__ ), '12.0.0', '', __( 'BuddyPress does not include Legacy Widgets anymore, you can restore it using the BP Classic plugin', 'buddypress' ) );
     14_deprecated_file( basename( __FILE__ ), '12.0.0', '', esc_html__( 'BuddyPress does not include Legacy Widgets anymore, you can restore it using the BP Classic plugin', 'buddypress' ) );
    1515
    1616/**
  • trunk/src/bp-core/classes/class-bp-core-oembed-extension.php

    r13157 r13818  
    494494        if ( ! class_exists( 'SimpleXMLElement' ) ) {
    495495            status_header( 501 );
    496             die( get_status_header_desc( 501 ) );
     496            die( esc_html( get_status_header_desc( 501 ) ) );
    497497        }
    498498
     
    509509        }
    510510
     511        // phpcs:ignore WordPress.Security.EscapeOutput
    511512        echo $result;
    512513
  • trunk/src/bp-core/classes/class-bp-optouts-list-table.php

    r13469 r13818  
    129129             * @since 8.0.0
    130130             *
    131              * @param string $url_base       Current URL base for view.
    132              * @param array  $active_filters Current filters being requested.
     131             * @param string $url_base Current URL base for view.
    133132             */
    134             do_action( 'bp_optouts_list_table_get_views', $url_base, $this->active_filters ); ?>
     133            do_action( 'bp_optouts_list_table_get_views', $url_base ); ?>
    135134        </ul>
    136135    <?php
     
    225224        $style = '';
    226225        foreach ( $this->items as $optout ) {
    227             $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
     226            $style = 'alt' == $style ? '' : 'alt';
     227
     228            // Escapes are made into `self::single_row()`.
     229            // phpcs:ignore WordPress.Security.EscapeOutput
    228230            echo "\n\t" . $this->single_row( $optout, $style );
    229231        }
     
    244246     */
    245247    public function single_row( $optout = null, $style = '', $role = '', $numposts = 0 ) {
    246         echo '<tr' . $style . ' id="optout-' . intval( $optout->id ) . '">';
     248        if ( '' === $style ) {
     249            echo '<tr id="optout-' . intval( $optout->id ) . '">';
     250        } else {
     251            echo '<tr class="alternate" id="optout-' . intval( $optout->id ) . '">';
     252        }
     253
     254        // BuddyPress relies on WordPress's `WP_Users_List_Table::single_row_columns()`.
     255        // phpcs:ignore WordPress.Security.EscapeOutput
    247256        echo $this->single_row_columns( $optout );
    248257        echo '</tr>';
     
    307316        $actions = apply_filters( 'bp_optouts_management_row_actions', $actions, $optout );
    308317
     318        // BuddyPress relies on WordPress's `WP_Users_List_Table::row_actions()`.
     319        // phpcs:ignore WordPress.Security.EscapeOutput
    309320        echo $this->row_actions( $actions );
    310321    }
     
    318329     */
    319330    public function column_username( $optout = null ) {
    320         $avatar = get_avatar( $optout->user_id, 32 );
     331        $avatar  = get_avatar( $optout->user_id, 32 );
    321332        $inviter = get_user_by( 'id', $optout->user_id );
     333
    322334        if ( ! $inviter ) {
    323335            return;
    324336        }
     337
    325338        $user_link = bp_members_get_user_url( $optout->user_id );
    326         echo $avatar . sprintf( '<strong><a href="%1$s" class="edit">%2$s</a></strong><br/>', esc_url( $user_link ), esc_html( $inviter->user_login ) );
     339
     340        echo wp_kses(
     341            $avatar,
     342            array(
     343                'img' => array(
     344                    'alt'    => true,
     345                    'src'    => true,
     346                    'srcset' => true,
     347                    'class'  => true,
     348                    'height' => true,
     349                    'width'  => true,
     350                )
     351            )
     352        );
     353        printf( '<strong><a href="%1$s" class="edit">%2$s</a></strong><br/>', esc_url( $user_link ), esc_html( $inviter->user_login ) );
    327354    }
    328355
     
    336363    public function column_user_registered( $optout = null ) {
    337364        $inviter = get_user_by( 'id', $optout->user_id );
     365
    338366        if ( ! $inviter ) {
    339367            return;
    340368        }
     369
    341370        echo esc_html( mysql2date( 'Y/m/d g:i:s a', $inviter->user_registered  ) );
    342371    }
     
    362391    public function column_email_type_description( $optout = null ) {
    363392        $type_term = get_term_by( 'slug', $optout->email_type, 'bp-email-type' );
     393
    364394        if ( $type_term ) {
    365395            echo esc_html( $type_term->description );
  • trunk/src/bp-loader.php

    r13718 r13818  
    6565        <p><strong><?php esc_html_e( 'Your site does not support BuddyPress.', 'buddypress' ); ?></strong></p>
    6666        <?php /* translators: 1: current PHP version, 2: required PHP version */ ?>
    67         <p><?php printf( esc_html__( 'Your site is currently running PHP version %1$s, while BuddyPress requires version %2$s or greater.', 'buddypress' ), esc_html( phpversion() ), esc_html( BP_REQUIRED_PHP_VERSION ) ); ?> <?php printf( __( 'See <a href="%s">the Codex guide</a> for more information.', 'buddypress' ), 'https://codex.buddypress.org/getting-started/buddypress-2-8-will-require-php-5-3/' ); ?></p>
     67        <p><?php printf( esc_html__( 'Your site is currently running PHP version %1$s, while BuddyPress requires version %2$s or greater.', 'buddypress' ), esc_html( phpversion() ), esc_html( BP_REQUIRED_PHP_VERSION ) ); ?> <?php printf( esc_html__( 'See <a href="%s">the Codex guide</a> for more information.', 'buddypress' ), 'https://codex.buddypress.org/getting-started/buddypress-2-8-will-require-php-5-3/' ); ?></p>
    6868        <p><?php esc_html_e( 'Please update your server or deactivate BuddyPress.', 'buddypress' ); ?></p>
    6969    </div>
  • trunk/src/class-buddypress.php

    r13705 r13818  
    280280     */
    281281    public function __clone() {
    282         _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'buddypress' ), '1.7' );
     282        _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'buddypress' ), '1.7' );
    283283    }
    284284
     
    289289     */
    290290    public function __wakeup() {
    291         _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'buddypress' ), '1.7' );
     291        _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'buddypress' ), '1.7' );
    292292    }
    293293
     
    317317        $valid_key = $key;
    318318        if ( 'root_domain' === $key ) {
    319             _doing_it_wrong( 'root_domain', __( 'The root_domain BuddyPress main class property is deprecated since 12.0.0, please use the root_url property instead.', 'buddypress' ), 'BuddyPress 12.0.0' );
     319            _doing_it_wrong( 'root_domain', esc_html__( 'The root_domain BuddyPress main class property is deprecated since 12.0.0, please use the root_url property instead.', 'buddypress' ), 'BuddyPress 12.0.0' );
    320320            $valid_key = 'root_url';
    321321        }
     
    335335        $valid_key = $key;
    336336        if ( 'root_domain' === $key ) {
    337             _doing_it_wrong( 'root_domain', __( 'The root_domain BuddyPress main class property is deprecated since 12.0.0, please use the root_url property instead.', 'buddypress' ), 'BuddyPress 12.0.0' );
     337            _doing_it_wrong( 'root_domain', esc_html__( 'The root_domain BuddyPress main class property is deprecated since 12.0.0, please use the root_url property instead.', 'buddypress' ), 'BuddyPress 12.0.0' );
    338338            $valid_key = 'root_url';
    339339        }
Note: See TracChangeset for help on using the changeset viewer.