Skip to:
Content

BuddyPress.org

Changeset 13824


Ignore:
Timestamp:
04/29/2024 08:15:44 PM (2 years ago)
Author:
imath
Message:

Deprecated functions: improve PHP code standards using WPCS

See #7228 (trunk)

Location:
trunk/src/bp-core
Files:
8 edited

Legend:

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

    r13818 r13824  
    462462
    463463        // Eventually this won't be needed and a page will be built to integrate all search results.
    464         $selection_box  = '<label for="search-which" class="accessibly-hidden">' . _x( 'Search these:', 'search form', 'buddypress' ) . '</label>';
     464        $selection_box  = '<label for="search-which" class="accessibly-hidden">' . esc_html_x( 'Search these:', 'search form', 'buddypress' ) . '</label>';
    465465        $selection_box .= '<select name="search-which" id="search-which" style="width: auto">';
    466466
     
    474474        $options = apply_filters( 'bp_search_form_type_select_options', $options );
    475475        foreach( (array) $options as $option_value => $option_title ) {
    476                 $selection_box .= sprintf( '<option value="%s">%s</option>', $option_value, $option_title );
     476                $selection_box .= sprintf( '<option value="%s">%s</option>', esc_attr( $option_value ), esc_html( $option_title ) );
    477477        }
    478478
  • trunk/src/bp-core/deprecated/1.5.php

    r13490 r13824  
    148148
    149149<div class="bp-widget wp-profile">
    150         <h4><?php _e( 'My Profile', 'buddypress' ) ?></h4>
     150        <h4><?php esc_html_e( 'My Profile', 'buddypress' ) ?></h4>
    151151
    152152        <table class="wp-profile-fields">
     
    155155
    156156                        <tr id="wp_displayname">
    157                                 <td class="label"><?php _e( 'Name', 'buddypress' ); ?></td>
    158                                 <td class="data"><?php echo $ud->display_name; ?></td>
     157                                <td class="label"><?php esc_html_e( 'Name', 'buddypress' ); ?></td>
     158                                <td class="data"><?php echo esc_html( $ud->display_name ); ?></td>
    159159                        </tr>
    160160
     
    164164
    165165                        <tr id="wp_desc">
    166                                 <td class="label"><?php _e( 'About Me', 'buddypress' ); ?></td>
    167                                 <td class="data"><?php echo $ud->user_description; ?></td>
     166                                <td class="label"><?php esc_html_e( 'About Me', 'buddypress' ); ?></td>
     167                                <td class="data"><?php echo esc_html( $ud->user_description ); ?></td>
    168168                        </tr>
    169169
     
    173173
    174174                        <tr id="wp_website">
    175                                 <td class="label"><?php _e( 'Website', 'buddypress' ); ?></td>
    176                                 <td class="data"><?php echo make_clickable( $ud->user_url ); ?></td>
     175                                <td class="label"><?php esc_html_e( 'Website', 'buddypress' ); ?></td>
     176                                <td class="data">
     177                                        <?php
     178                                        // phpcs:ignore WordPress.Security.EscapeOutput
     179                                        echo make_clickable( esc_url( $ud->user_url ) );
     180                                        ?>
     181                                </td>
    177182                        </tr>
    178183
     
    182187
    183188                        <tr id="wp_jabber">
    184                                 <td class="label"><?php _e( 'Jabber', 'buddypress' ); ?></td>
    185                                 <td class="data"><?php echo $ud->jabber; ?></td>
     189                                <td class="label"><?php esc_html_e( 'Jabber', 'buddypress' ); ?></td>
     190                                <td class="data"><?php echo esc_html( $ud->jabber ); ?></td>
    186191                        </tr>
    187192
     
    191196
    192197                        <tr id="wp_aim">
    193                                 <td class="label"><?php _e( 'AOL Messenger', 'buddypress' ); ?></td>
    194                                 <td class="data"><?php echo $ud->aim; ?></td>
     198                                <td class="label"><?php esc_html_e( 'AOL Messenger', 'buddypress' ); ?></td>
     199                                <td class="data"><?php echo esc_html( $ud->aim ); ?></td>
    195200                        </tr>
    196201
     
    200205
    201206                        <tr id="wp_yim">
    202                                 <td class="label"><?php _e( 'Yahoo Messenger', 'buddypress' ); ?></td>
    203                                 <td class="data"><?php echo $ud->yim; ?></td>
     207                                <td class="label"><?php esc_html_e( 'Yahoo Messenger', 'buddypress' ); ?></td>
     208                                <td class="data"><?php echo esc_html( $ud->yim ); ?></td>
    204209                        </tr>
    205210
     
    283288 */
    284289function bp_page_title() {
     290        // phpcs:ignore WordPress.Security.EscapeOutput
    285291        echo bp_get_page_title();
    286292}
     
    315321        _deprecated_function( __FUNCTION__, '1.5', 'wp_logout_url()' );
    316322
    317         $logout_link = '<a href="' . wp_logout_url( bp_get_root_domain() ) . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
     323        $logout_link = '<a href="' . esc_url( wp_logout_url( bp_get_root_domain() ) ) . '">' . esc_html__( 'Log Out', 'buddypress' ) . '</a>';
     324
     325        // phpcs:ignore WordPress.Security.EscapeOutput
    318326        echo apply_filters( 'bp_logout_link', $logout_link );
    319327}
     
    421429
    422430        $form = '
    423                 <form action="' . bp_search_form_action() . '" method="post" id="search-form">
     431                <form action="' . esc_url( bp_search_form_action() ) . '" method="post" id="search-form">
    424432                        <input type="text" id="search-terms" name="search-terms" value="" />
    425433                        ' . bp_search_form_type_select() . '
    426434
    427                         <input type="submit" name="search-submit" id="search-submit" value="' . __( 'Search', 'buddypress' ) . '" />
     435                        <input type="submit" name="search-submit" id="search-submit" value="' . esc_attr__( 'Search', 'buddypress' ) . '" />
    428436                        ' . wp_nonce_field( 'bp_search_form' ) . '
    429437                </form>
    430438        ';
    431439
     440        // phpcs:ignore WordPress.Security.EscapeOutput
    432441        echo apply_filters( 'bp_search_form', $form );
    433442}
     
    750759
    751760                                <?php
     761                                // phpcs:ignore WordPress.Security.EscapeOutput
    752762                                echo bp_core_fetch_avatar(
    753763                                        array(
     
    767777                                <h5>
    768778
    769                                         <?php echo bp_core_get_userlink( $admin->user_id ); ?>
     779                                        <?php
     780                                        // phpcs:ignore WordPress.Security.EscapeOutput
     781                                        echo bp_core_get_userlink( $admin->user_id );
     782                                        ?>
    770783
    771784                                        <span class="small">
    772                                                 <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link($admin->user_id) ?>"><?php _e( 'Demote to Member', 'buddypress' ) ?></a>
     785                                                <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link($admin->user_id) ?>"><?php esc_html_e( 'Demote to Member', 'buddypress' ) ?></a>
    773786                                        </span>
    774787                                </h5>
     
    780793
    781794                                <?php
     795                                // phpcs:ignore WordPress.Security.EscapeOutput
    782796                                echo bp_core_fetch_avatar(
    783797                                        array(
     
    793807                                ?>
    794808
    795                                 <h5><?php echo bp_core_get_userlink( $admin->user_id ) ?></h5>
     809                                <h5>
     810                                        <?php
     811                                        // phpcs:ignore WordPress.Security.EscapeOutput
     812                                        echo bp_core_get_userlink( $admin->user_id );
     813                                        ?>
     814                                </h5>
    796815                                <span class="activity">
    797816                                        <?php
    798817                                        /* translators: %s: human time diff */
    799                                         echo bp_core_get_last_activity( strtotime( $admin->date_modified ), __( 'joined %s', 'buddypress') );
     818                                        echo esc_html( bp_core_get_last_activity( strtotime( $admin->date_modified ), esc_html__( 'joined %s', 'buddypress' ) ) );
    800819                                        ?>
    801820                                </span>
     
    821840
    822841                <div id="message" class="info">
    823                         <p><?php _e( 'This group has no administrators', 'buddypress' ); ?></p>
     842                        <p><?php esc_html_e( 'This group has no administrators', 'buddypress' ); ?></p>
    824843                </div>
    825844
  • trunk/src/bp-core/deprecated/1.6.php

    r12547 r13824  
    125125?>
    126126
    127         <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/recently-active' ) ?>"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
    128         <li<?php if ( bp_is_action_variable( 'newest', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/newest' ) ?>"><?php _e( 'Newest', 'buddypress' ) ?></a></li>
    129         <li<?php if ( bp_is_action_variable( 'alphabetically', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/alphabetically' ) ?>"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
     127        <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/recently-active' ) ); ?>"><?php esc_html_e( 'Recently Active', 'buddypress' ) ?></a></li>
     128        <li<?php if ( bp_is_action_variable( 'newest', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/newest' ) ); ?>"><?php esc_html_e( 'Newest', 'buddypress' ) ?></a></li>
     129        <li<?php if ( bp_is_action_variable( 'alphabetically', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() . '/my-friends/alphabetically' ) ); ?>"><?php esc_html_e( 'Alphabetically', 'buddypress' ) ?></a></li>
    130130
    131131<?php
     
    146146        switch ( $current_filter ) {
    147147                case 'recently-active': default:
    148                         _e( 'Recently Active', 'buddypress' );
     148                        esc_html_e( 'Recently Active', 'buddypress' );
    149149                        break;
    150150                case 'newest':
    151                         _e( 'Newest', 'buddypress' );
     151                        esc_html_e( 'Newest', 'buddypress' );
    152152                        break;
    153153                case 'alphabetically':
    154                         _e( 'Alphabetically', 'buddypress' );
     154                        esc_html_e( 'Alphabetically', 'buddypress' );
    155155                        break;
    156156        }
  • trunk/src/bp-core/deprecated/1.7.php

    r13395 r13824  
    1818 */
    1919function bp_maintenance_mode() {
    20         echo bp_get_maintenance_mode();
     20        echo esc_html( bp_get_maintenance_mode() );
    2121}
    2222        /**
  • trunk/src/bp-core/deprecated/12.0.php

    r13775 r13824  
    626626        $user_groups = bp_displayed_user_url() . bp_get_groups_slug(); ?>
    627627
    628         <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $user_groups . '/my-groups/recently-active' ); ?>"><?php _e( 'Recently Active', 'buddypress' ); ?></a></li>
    629         <li<?php if ( bp_is_action_variable( 'recently-joined', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $user_groups . '/my-groups/recently-joined' ); ?>"><?php _e( 'Recently Joined',  'buddypress' ); ?></a></li>
    630         <li<?php if ( bp_is_action_variable( 'most-popular',    0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $user_groups . '/my-groups/most-popular'    ); ?>"><?php _e( 'Most Popular',     'buddypress' ); ?></a></li>
    631         <li<?php if ( bp_is_action_variable( 'admin-of',        0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $user_groups . '/my-groups/admin-of'        ); ?>"><?php _e( 'Administrator Of', 'buddypress' ); ?></a></li>
    632         <li<?php if ( bp_is_action_variable( 'mod-of',          0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $user_groups . '/my-groups/mod-of'          ); ?>"><?php _e( 'Moderator Of',     'buddypress' ); ?></a></li>
    633         <li<?php if ( bp_is_action_variable( 'alphabetically'     ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $user_groups . '/my-groups/alphabetically'  ); ?>"><?php _e( 'Alphabetically',   'buddypress' ); ?></a></li>
     628        <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( $user_groups . '/my-groups/recently-active' ) ); ?>"><?php esc_html_e( 'Recently Active', 'buddypress' ); ?></a></li>
     629        <li<?php if ( bp_is_action_variable( 'recently-joined', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( $user_groups . '/my-groups/recently-joined' ) ); ?>"><?php esc_html_e( 'Recently Joined',  'buddypress' ); ?></a></li>
     630        <li<?php if ( bp_is_action_variable( 'most-popular',    0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( $user_groups . '/my-groups/most-popular'    ) ); ?>"><?php esc_html_e( 'Most Popular',     'buddypress' ); ?></a></li>
     631        <li<?php if ( bp_is_action_variable( 'admin-of',        0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( $user_groups . '/my-groups/admin-of'        ) ); ?>"><?php esc_html_e( 'Administrator Of', 'buddypress' ); ?></a></li>
     632        <li<?php if ( bp_is_action_variable( 'mod-of',          0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( $user_groups . '/my-groups/mod-of'          ) ); ?>"><?php esc_html_e( 'Moderator Of',     'buddypress' ); ?></a></li>
     633        <li<?php if ( bp_is_action_variable( 'alphabetically'     ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo esc_url( trailingslashit( $user_groups . '/my-groups/alphabetically'  ) ); ?>"><?php esc_html_e( 'Alphabetically',   'buddypress' ); ?></a></li>
    634634
    635635<?php
     
    664664                                <?php
    665665                                /* translators: %s: the User Display Name */
    666                                 printf( esc_html__( "%s's Sites", 'buddypress' ), bp_get_displayed_user_fullname() );
     666                                printf( esc_html__( "%s's Sites", 'buddypress' ), esc_html( bp_get_displayed_user_fullname() ) );
    667667                                ?>
    668668                        </a>
     
    672672                                <?php
    673673                                /* translators: %s: the User Display Name */
    674                                 printf( esc_html__( "%s's Recent Posts", 'buddypress' ), bp_get_displayed_user_fullname() );
     674                                printf( esc_html__( "%s's Recent Posts", 'buddypress' ), esc_html( bp_get_displayed_user_fullname() ) );
    675675                                ?>
    676676                        </a>
     
    680680                                <?php
    681681                                /* translators: %s: the User Display Name */
    682                                 printf( esc_html__( "%s's Recent Comments", 'buddypress' ), bp_get_displayed_user_fullname() );
     682                                printf( esc_html__( "%s's Recent Comments", 'buddypress' ), esc_html( bp_get_displayed_user_fullname() ) );
    683683                                ?>
    684684                        </a>
     
    977977
    978978                                <?php
    979                                 /* translators: %s: member name */
     979                                // phpcs:ignore WordPress.Security.EscapeOutput
    980980                                echo bp_core_fetch_avatar(
    981981                                        array(
     
    994994
    995995                                <h5>
    996                                         <?php echo bp_core_get_userlink( $mod->user_id ); ?>
     996                                        <?php
     997                                        // phpcs:ignore WordPress.Security.EscapeOutput
     998                                        echo bp_core_get_userlink( $mod->user_id );
     999                                        ?>
    9971000
    9981001                                        <span class="small">
    999                                                 <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => $mod->user_id ) ) ?>" class="button confirm mod-promote-to-admin"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
    1000                                                 <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link($mod->user_id) ?>"><?php _e( 'Demote to Member', 'buddypress' ) ?></a>
     1002                                                <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => $mod->user_id ) ) ?>" class="button confirm mod-promote-to-admin"><?php esc_html_e( 'Promote to Admin', 'buddypress' ); ?></a>
     1003                                                <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link($mod->user_id) ?>"><?php esc_html_e( 'Demote to Member', 'buddypress' ) ?></a>
    10011004                                        </span>
    10021005                                </h5>
     
    10081011
    10091012                                <?php
     1013                                // phpcs:ignore WordPress.Security.EscapeOutput
    10101014                                echo bp_core_fetch_avatar(
    10111015                                        array(
     
    10211025                                ?>
    10221026
    1023                                 <h5><?php echo bp_core_get_userlink( $mod->user_id ) ?></h5>
     1027                                <h5>
     1028                                        <?php
     1029                                        // phpcs:ignore WordPress.Security.EscapeOutput
     1030                                        echo bp_core_get_userlink( $mod->user_id );
     1031                                        ?>
     1032                                </h5>
    10241033
    10251034                                <span class="activity">
    10261035                                        <?php
    10271036                                        /* translators: %s: human time diff */
    1028                                         echo bp_core_get_last_activity( strtotime( $mod->date_modified ), __( 'joined %s', 'buddypress') );
     1037                                        echo esc_html( bp_core_get_last_activity( strtotime( $mod->date_modified ), esc_html__( 'joined %s', 'buddypress' ) ) );
    10291038                                        ?>
    10301039                                </span>
     
    10481057
    10491058                <div id="message" class="info">
    1050                         <p><?php _e( 'This group has no moderators', 'buddypress' ); ?></p>
     1059                        <p><?php esc_html_e( 'This group has no moderators', 'buddypress' ); ?></p>
    10511060                </div>
    10521061
     
    10621071function bp_activities_title() {
    10631072        _deprecated_function( __FUNCTION__, '12.0.0' );
    1064         echo bp_get_activities_title();
     1073        echo esc_html( bp_get_activities_title() );
    10651074}
    10661075
     
    10981107function bp_activities_no_activity() {
    10991108        _deprecated_function( __FUNCTION__, '12.0.0' );
    1100         echo bp_get_activities_no_activity();
     1109        echo esc_html( bp_get_activities_no_activity() );
    11011110}
    11021111
     
    11411150        }
    11421151
    1143         echo apply_filters_deprecated( 'bp_get_options_title', array( esc_attr( $bp->bp_options_title ) ), '12.0.0' );
     1152        echo esc_html( apply_filters_deprecated( 'bp_get_options_title', array( esc_attr( $bp->bp_options_title ) ), '12.0.0' ) );
    11441153}
    11451154
     
    11661175function bp_get_options_avatar() {
    11671176        _deprecated_function( __FUNCTION__, '12.0.0' );
     1177        // phpcs:ignore WordPress.Security.EscapeOutput
    11681178        echo apply_filters_deprecated( 'bp_get_options_avatar', array( buddypress()->bp_options_avatar ), '12.0.0' );
    11691179}
     
    11781188        global $comment;
    11791189
     1190        // phpcs:ignore WordPress.Security.EscapeOutput
    11801191        echo apply_filters_deprecated(
    11811192                'bp_comment_author_avatar',
     
    12061217        global $post;
    12071218
     1219        // phpcs:ignore WordPress.Security.EscapeOutput
    12081220        echo apply_filters_deprecated(
    12091221                'bp_post_author_avatar',
     
    12801292function bp_blog_signup_allowed() {
    12811293        _deprecated_function( __FUNCTION__, '12.0.0' );
     1294        // phpcs:ignore WordPress.Security.EscapeOutput
    12821295        echo bp_get_blog_signup_allowed();
    12831296}
     
    13051318                        ?>
    13061319                        &nbsp;
    1307                         (<?php echo BP_Friends_Friendship::total_friend_count( bp_displayed_user_id() ); ?>)
     1320                        (<?php echo esc_html( BP_Friends_Friendship::total_friend_count( bp_displayed_user_id() ) ); ?>)
    13081321                        &nbsp;
    13091322                        <span>
     
    13211334
    13221335                                <li>
    1323                                         <a href="<?php echo bp_members_get_user_url( $friend_ids[$i] ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $friend_ids[$i], 'type' => 'thumb' ) ) ?></a>
    1324                                         <h5><?php echo bp_core_get_userlink($friend_ids[$i]) ?></h5>
     1336                                        <a href="<?php echo esc_url( bp_members_get_user_url( $friend_ids[$i] ) ); ?>">
     1337                                                <?php
     1338                                                // phpcs:ignore WordPress.Security.EscapeOutput
     1339                                                echo bp_core_fetch_avatar( array( 'item_id' => $friend_ids[$i], 'type' => 'thumb' ) );
     1340                                                ?>
     1341                                        </a>
     1342                                        <h5>
     1343                                                <?php
     1344                                                // phpcs:ignore WordPress.Security.EscapeOutput
     1345                                                echo bp_core_get_userlink($friend_ids[$i]);
     1346                                                ?>
     1347                                        </h5>
    13251348                                </li>
    13261349
     
    13741397
    13751398                        <li>
    1376                                 <a href="<?php echo bp_members_get_user_url( $user_ids['users'][$i]->id ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $user_ids['users'][$i]->id, 'type' => 'thumb' ) ) ?></a>
    1377                                 <h5><?php echo bp_core_get_userlink( $user_ids['users'][$i]->id ) ?></h5>
     1399                                <a href="<?php echo esc_url( bp_members_get_user_url( $user_ids['users'][$i]->id ) ); ?>">
     1400                                        <?php
     1401                                        // phpcs:ignore WordPress.Security.EscapeOutput
     1402                                        echo bp_core_fetch_avatar( array( 'item_id' => $user_ids['users'][$i]->id, 'type' => 'thumb' ) );
     1403                                        ?>
     1404                                </a>
     1405                                <h5>
     1406                                        <?php
     1407                                        // phpcs:ignore WordPress.Security.EscapeOutput
     1408                                        echo bp_core_get_userlink( $user_ids['users'][$i]->id );
     1409                                        ?>
     1410                                </h5>
    13781411
    13791412                                <?php if ( bp_is_active( 'xprofile' ) ) { ?>
     
    13821415
    13831416                                        <div class="profile-data">
    1384                                                 <p class="field-name"><?php echo $random_data[0]->name ?></p>
    1385 
    1386                                                 <?php echo $random_data[0]->value ?>
     1417                                                <p class="field-name"><?php echo esc_html( $random_data[0]->name ); ?></p>
     1418
     1419                                                <?php echo esc_html( $random_data[0]->value ); ?>
    13871420
    13881421                                        </div>
     
    14081441
    14091442                <div id="message" class="info">
    1410                         <p><?php _e( "There aren't enough site members to show a random sample just yet.", 'buddypress' ) ?></p>
     1443                        <p><?php esc_html_e( "There aren't enough site members to show a random sample just yet.", 'buddypress' ) ?></p>
    14111444                </div>
    14121445
     
    15061539                </form>';
    15071540
     1541        // phpcs:ignore WordPress.Security.EscapeOutput
    15081542        echo apply_filters( 'bp_group_search_form', $search_form_html );
    15091543}
     
    15591593        switch ( $current_filter ) {
    15601594                case 'recently-active': default:
    1561                         _e( 'Recently Active', 'buddypress' );
     1595                        esc_html_e( 'Recently Active', 'buddypress' );
    15621596                        break;
    15631597                case 'recently-joined':
    1564                         _e( 'Recently Joined', 'buddypress' );
     1598                        esc_html_e( 'Recently Joined', 'buddypress' );
    15651599                        break;
    15661600                case 'most-popular':
    1567                         _e( 'Most Popular', 'buddypress' );
     1601                        esc_html_e( 'Most Popular', 'buddypress' );
    15681602                        break;
    15691603                case 'admin-of':
    1570                         _e( 'Administrator Of', 'buddypress' );
     1604                        esc_html_e( 'Administrator Of', 'buddypress' );
    15711605                        break;
    15721606                case 'mod-of':
    1573                         _e( 'Moderator Of', 'buddypress' );
     1607                        esc_html_e( 'Moderator Of', 'buddypress' );
    15741608                        break;
    15751609                case 'alphabetically':
    1576                         _e( 'Alphabetically', 'buddypress' );
     1610                        esc_html_e( 'Alphabetically', 'buddypress' );
    15771611                break;
    15781612        }
  • trunk/src/bp-core/deprecated/2.1.php

    r12893 r13824  
    183183function bp_blogs_subdomain_base() {
    184184        _deprecated_function( __FUNCTION__, '2.1', 'bp_signup_subdomain_base()' );
    185         echo bp_signup_get_subdomain_base();
     185        echo esc_url( bp_signup_get_subdomain_base() );
    186186}
    187187
  • trunk/src/bp-core/deprecated/2.6.php

    r10745 r13824  
    1818?>
    1919
    20 <!-- Generated in <?php timer_stop(1); ?> seconds. (<?php echo get_num_queries(); ?> q) -->
     20<!-- Generated in <?php timer_stop(1); ?> seconds. (<?php echo intval( get_num_queries() ); ?> q) -->
    2121
    2222        <?php
  • trunk/src/bp-core/deprecated/2.8.php

    r12588 r13824  
    138138        }
    139139
    140         echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $response->slug . '-update' ) . '" data-slug="' . esc_attr( $response->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message inline notice notice-error notice-alt">';
    141 
    142         printf( $p,
     140        echo '<tr class="plugin-update-tr' . esc_attr( $active_class ) . '" id="' . esc_attr( $response->slug . '-update' ) . '" data-slug="' . esc_attr( $response->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message inline notice notice-error notice-alt">';
     141
     142        printf(
     143                // phpcs:ignore WordPress.Security.EscapeOutput
     144                $p,
    143145                esc_html__( 'A BuddyPress update is available, but your system is not compatible.', 'buddypress' ) . ' ' .
    144                 sprintf( __( '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/' )
     146                sprintf( esc_html__( 'See %s for more information.', 'buddypress' ), '<a href="https://codex.buddypress.org/getting-started/buddypress-2-8-will-require-php-5-3/">' . esc_html( 'the Codex guide', 'buddypress' ) . '</a>' )
    145147        );
    146148
     
    152154         */
    153155        $checkbox_id = 'checkbox_' . md5( $plugin_data['Name'] );
     156
     157        // phpcs:ignore WordPress.Security.EscapeOutput
    154158        echo "<script type='text/javascript'>document.getElementById('$checkbox_id').disabled = true;</script>";
    155159}
     
    204208                        <?php
    205209                        /* translators: %s: the url to a codex page */
    206                         printf( _x( 'See <a href="%s">the Codex guide</a> for more information.', 'deprecated string', 'buddypress' ), 'https://codex.buddypress.org/getting-started/buddypress-2-8-will-require-php-5-3/' );
     210                        printf( esc_html_x( 'See %s for more information.', 'deprecated string', 'buddypress' ), '<a href="https://codex.buddypress.org/getting-started/buddypress-2-8-will-require-php-5-3/">' . esc_html( 'the Codex guide', 'buddypress' ) . '</a>' );
    207211                        ?>
    208212                </p>
Note: See TracChangeset for help on using the changeset viewer.