Skip to content

Commit

Permalink
Add phpcs ignores and comment out the previous false declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj committed Sep 23, 2024
1 parent e489b3e commit 0d6f7f9
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions projects/plugins/jetpack/class.jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -5692,13 +5692,15 @@ public static function absolutize_css_urls( $css, $css_file_url ) {
*/
public function implode_frontend_css( $travis_test = false ) {
$do_implode = false;
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
$do_implode = false;
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedIf
// phpcs:ignore Squiz.PHP.CommentedOutCode.Found
// $do_implode = false;
}

// Do not implode CSS when the page loads via the AMP plugin.
if ( class_exists( Jetpack_AMP_Support::class ) && Jetpack_AMP_Support::is_amp_request() ) {
$do_implode = false;
if ( class_exists( Jetpack_AMP_Support::class ) && Jetpack_AMP_Support::is_amp_request() ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedIf
// phpcs:ignore Squiz.PHP.CommentedOutCode.Found
// $do_implode = false;
}

/*
Expand All @@ -5709,8 +5711,9 @@ public function implode_frontend_css( $travis_test = false ) {
$active_modules = self::get_active_modules();
$modules_with_concatenated_css = $this->modules_with_concatenated_css;
$active_module_with_css_count = count( array_intersect( $active_modules, $modules_with_concatenated_css ) );
if ( $active_module_with_css_count < 2 ) {
$do_implode = false;
if ( $active_module_with_css_count < 2 ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedIf
// phpcs:ignore Squiz.PHP.CommentedOutCode.Found
// $do_implode = false;
}

/**
Expand Down

0 comments on commit 0d6f7f9

Please sign in to comment.