Skip to:
Content

BuddyPress.org


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

Core: improve PHP code standards using WPCS

See #7228 (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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                );
Note: See TracChangeset for help on using the changeset viewer.