Skip to content

Commit

Permalink
Coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
n7studios committed Nov 7, 2024
1 parent 93a759d commit b226c1f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion includes/class-convertkit-cache-plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function __construct() {

// WP Rocket: Exclude Forms from JS minification and combine.
add_filter( 'rocket_minify_excluded_external_js', array( $this, 'exclude_hosts_from_minification' ) );

// WP Rocket: Exclude Forms from Delay JavaScript execution.
add_filter( 'convertkit_output_script_footer', array( $this, 'wp_rocket_exclude_delay_js_execution' ) );
add_filter( 'convertkit_resource_forms_output_script', array( $this, 'wp_rocket_exclude_delay_js_execution' ) );
Expand Down
16 changes: 8 additions & 8 deletions tests/_support/Helper/Acceptance/WPCachePlugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ public function excludeCachingWPSuperCachePlugin($I, $cookieName = 'ck_subscribe
*
* @param AcceptanceTester $I Acceptance Tester.
*/
public function enableWPRocketMinifyConcatenateJSAndCSS($I, $delay = false)
public function enableWPRocketMinifyConcatenateJSAndCSS($I)
{
// Get WP Rocket settings.
$settings = $I->grabOptionFromDatabase('wp_rocket_settings');

$settings['minify_css'] = 1;
$settings['minify_js'] = 1;
$settings['minify_css'] = 1;
$settings['minify_js'] = 1;
$settings['minify_concatenate_js'] = 1;

// Save settings.
Expand All @@ -214,13 +214,13 @@ public function enableWPRocketMinifyConcatenateJSAndCSS($I, $delay = false)
*
* @param AcceptanceTester $I Acceptance Tester.
*/
public function enableWPRocketDelayJS($I, $delay = false)
public function enableWPRocketDelayJS($I)
{
// Get WP Rocket settings.
$settings = $I->grabOptionFromDatabase('wp_rocket_settings');

$settings['delay_js'] = 1;

// Save settings.
$I->haveOptionInDatabase('wp_rocket_settings', $settings);
}
Expand All @@ -233,14 +233,14 @@ public function enableWPRocketDelayJS($I, $delay = false)
*
* @param AcceptanceTester $I Acceptance Tester.
*/
public function enableWPRocketLazyLoad($I, $delay = false)
public function enableWPRocketLazyLoad($I)
{
// Get WP Rocket settings.
$settings = $I->grabOptionFromDatabase('wp_rocket_settings');

$settings['lazyload'] = 1;
$settings['lazyload'] = 1;
$settings['lazyload_css_bg_img'] = 1;

// Save settings.
$I->haveOptionInDatabase('wp_rocket_settings', $settings);
}
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance.suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ modules:
capabilities:
goog:chromeOptions:
args: [
"--headless=new",
"--disable-gpu",
"--user-agent=%TEST_SITE_HTTP_USER_AGENT%",
]
Expand Down

0 comments on commit b226c1f

Please sign in to comment.