Skip to content

Commit

Permalink
Merge branch 'develop' into feature/3.18
Browse files Browse the repository at this point in the history
# Conflicts:
#	wp-rocket.php
  • Loading branch information
wordpressfan committed Dec 3, 2024
2 parents 16aca62 + dd33f7b commit 82a2c24
Show file tree
Hide file tree
Showing 24 changed files with 2,581 additions and 6 deletions.
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@
"@test-integration-pressidium"
],
"run-stan": "vendor/bin/phpstan analyze --memory-limit=2G --no-progress",
"run-stan-reset-baseline": "vendor/bin/phpstan analyze --memory-limit=2G --no-progress --generate-baseline",
"run-stan-test": "vendor/bin/phpstan analyze inc/Engine/Common/ExtractCSS/Subscriber.php --memory-limit=2G --no-progress --debug",
"install-codestandards": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run",
"phpcs": "phpcs --basepath=.",
"phpcs-changed": "./bin/phpcs-changed.sh",
Expand Down
2 changes: 1 addition & 1 deletion dynamic-lists-delayjs.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dynamic-lists.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private function send_request( $method, $params = [], $safe = false ) {

$transient_key = $this->get_transient_key();
if ( get_transient( $transient_key . '_timeout_active' ) ) {
return new WP_Error( 429, __( 'Too many requests.', 'rocket' ) );
return new WP_Error( 429, 'Too many requests.' );
}
// Get previous_expiration early to avoid multiple parallel requests increasing the expiration multiple times.
$previous_expiration = (int) get_transient( $transient_key . '_timeout' );
Expand All @@ -82,7 +82,7 @@ private function send_request( $method, $params = [], $safe = false ) {
$body = wp_remote_retrieve_body( $response );
if ( empty( $body ) || ( ! empty( $response['response']['code'] ) && 200 !== $response['response']['code'] ) ) {
$this->set_timeout_transients( $previous_expiration );
return new WP_Error( 500, __( 'Not valid response.', 'rocket' ) );
return new WP_Error( 500, 'Not valid response.' );
}

$this->delete_timeout_transients();
Expand Down Expand Up @@ -148,6 +148,6 @@ private function send_remote_request( $api_url, $method, $params, $safe ) {
return wp_safe_remote_post( $api_url, $params );
}

return new WP_Error( 400, __( 'Not valid request type.', 'rocket' ) );
return new WP_Error( 400, 'Not valid request type.' );
}
}
18 changes: 18 additions & 0 deletions licence-data.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php
defined( 'ABSPATH' ) || exit;

/**
* You can edit this file, but it will be overwritten in the next update,
* it's an autogenerated file, depending on your account
* or you can define these values directly in your wp-config.php file
*/

// Your license KEY.
if ( ! defined( 'WP_ROCKET_KEY' ) ) {
define( 'WP_ROCKET_KEY', '' );
}

// Your email, the one you used for the purchase.
if ( ! defined( 'WP_ROCKET_EMAIL' ) ) {
define( 'WP_ROCKET_EMAIL', '' );
}
Loading

0 comments on commit 82a2c24

Please sign in to comment.