Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/27/2024 05:51:41 PM (20 months ago)
Author:
imath
Message:

Activity component: improve PHP code standards using WPCS

See #7228 (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-embeds.php

    r13743 r13816  
    7373    // Grab contents of CSS file and do some rudimentary CSS protection.
    7474    $css = file_get_contents( $css['file'] );
    75     $css = wp_kses( $css, array( "\'", '\"' ) );
    76 
    77     printf( '<style type="text/css">%s</style>', $css );
     75
     76    printf( '<style type="text/css">%s</style>', wp_kses( $css, array( "\'", '\"' ) ) );
    7877}
    7978add_action( 'embed_head', 'bp_activity_embed_add_inline_styles', 20 );
     
    122121 */
    123122function bp_activity_embed_excerpt( $content = '' ) {
     123    // Escaping is made in `bp-activity/bp-activity-filters.php`.
     124    // phpcs:ignore WordPress.Security.EscapeOutput
    124125    echo bp_activity_get_embed_excerpt( $content );
    125126}
     
    318319            printf( '<div class="bp-activity-embed-display-media %s" style="max-width:%spx">%s</div>',
    319320                $thumb_width < $float_width ? 'two-col' : 'one-col',
    320                 $thumb_width < $float_width ? $width : $thumb_width,
     321                $thumb_width < $float_width ? intval( $width ) : intval( $thumb_width ),
     322                // phpcs:ignore WordPress.Security.EscapeOutput
    321323                $content
    322324            );
Note: See TracChangeset for help on using the changeset viewer.