Skip to content

Commit

Permalink
fix: suppress WordPress.WP.CapitalPDangit.MisspelledInText for CI to …
Browse files Browse the repository at this point in the history
…pass
  • Loading branch information
sjinks committed Sep 27, 2023
1 parent 787f98c commit 8761eba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vip-helpers/vip-media.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ function wpcom_vip_set_image_quality( $quality, $strip = false ) {

add_filter( 'the_content', function ( $content ) use ( $quality, $strip ) {
if ( false !== strpos( $content, 'files.wordpress.com' ) ) {
$content = preg_replace_callback( '#https?://\w+\.files\.WordPress\.com[^\s"\'>]+#', function ( $matches ) use ( $quality, $strip ) {
// phpcs:ignore WordPress.WP.CapitalPDangit.MisspelledInText
$content = preg_replace_callback( '#https?://\w+\.files\.wordpress\.com[^\s"\'>]+#', function ( $matches ) use ( $quality, $strip ) {
return wpcom_vip_set_image_quality_for_url( $matches[0], $quality, $strip );
}, $content );
}
Expand Down

0 comments on commit 8761eba

Please sign in to comment.