Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
richardkorthuis committed Mar 6, 2024
2 parents 7dc0ad9 + 5152ca3 commit 1788498
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion admin/partials/sub-clear-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class="button button-<?php echo $wp_rest_cache_clear_cache ? 'disabled' : 'prima
progressLabel = jQuery(".progress-label");
var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php' ) ); ?>';
var ajaxnonce = '<?php echo esc_js( wp_create_nonce( 'wp_rest_cache_clear_cache_ajax' ) ); ?>';
var deletecaches = '<?php echo esc_js( filter_input( INPUT_GET, 'delete_caches', FILTER_VALIDATE_BOOLEAN ) ); ?>';
var deletecaches = '<?php echo esc_js( (string) filter_input( INPUT_GET, 'delete_caches', FILTER_VALIDATE_BOOLEAN ) ); ?>';

progressbar.progressbar({
value: false,
Expand Down
3 changes: 2 additions & 1 deletion includes/api/class-endpoint-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private function build_cache_key() {
* @param bool $served Whether the request has already been served. Default false.
* @param \WP_HTTP_Response $result Result to send to the client.
*
* @return void
* @return bool
*/
public function save_cache_headers( $served, \WP_HTTP_Response $result ) {
$headers = $result->get_headers();
Expand Down Expand Up @@ -220,6 +220,7 @@ public function save_cache_headers( $served, \WP_HTTP_Response $result ) {
$this->response_headers[ $key ] = $value;
}
}
return $served;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion includes/caching/class-caching.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public static function get_instance() {
* @return mixed The cache item.
*/
public function get_cache( $cache_key ) {
$expiration = $this->get_cache_expiration( $cache_key );
$expiration = $this->get_cache_expiration( $cache_key ) ?? '';
if ( 1 === strtotime( $expiration ) ) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion includes/class-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Plugin {
*/
public function __construct() {
$this->plugin_name = 'wp-rest-cache';
$this->version = '2024.1.0';
$this->version = '2024.1.1';

$this->set_locale();
$this->define_admin_hooks();
Expand Down
5 changes: 1 addition & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ parameters:
ignoreErrors:
-
message: '#Function WP_CLI\\Utils\\get_flag_value not found.#'
path: includes/cli/class-flush-command.php
-
message: '#Constant WP_PLUGIN_DIR not found.#'
path: sources/wp-rest-cache.php
path: includes/cli/class-flush-command.php
9 changes: 7 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
=== WP REST Cache ===
Contributors: acato, rockfire, yoeridekker
Tags: cache, wp-rest-api, api, rest, rest cache, rest api cache
Tags: cache, wp-rest-api, api, rest, rest cache
Requires at least: 4.7
Tested up to: 6.5
Requires PHP: 7.0
Stable tag: 2024.1.0
Stable tag: 2024.1.1
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl.html

Expand Down Expand Up @@ -171,6 +171,11 @@ Yes you can! Use the `wp wp-rest-cache flush` command to flush caches. Type `wp

== Changelog ==

= 2024.1.1 =
Release Date: March 6th, 2024

Bugfix: Several small fixes.

= 2024.1.0 =
Release Date: March 2nd, 2024

Expand Down
2 changes: 1 addition & 1 deletion wp-rest-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: WP REST Cache
* Plugin URI: https://www.acato.nl
* Description: Adds caching to the WP REST API
* Version: 2024.1.0
* Version: 2024.1.1
* Author: Acato
* Author URI: https://www.acato.nl
* Text Domain: wp-rest-cache
Expand Down

0 comments on commit 1788498

Please sign in to comment.