From 3e9a06daae7300f435594e6c0d57b868231a58d9 Mon Sep 17 00:00:00 2001 From: David Shanske Date: Sun, 4 Jun 2023 00:49:59 +0000 Subject: [PATCH 1/2] Always use the query --- feed-json-functions.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/feed-json-functions.php b/feed-json-functions.php index 4c78a16..1073ac1 100644 --- a/feed-json-functions.php +++ b/feed-json-functions.php @@ -51,9 +51,7 @@ function get_link_from_json_feed( $link ) { function get_json_feed_next_url() { global $paged, $wp_query; - if ( ! isset($max_page) || ! $max_page ) { - $max_page = $wp_query->max_num_pages; - } + $max_page = $wp_query->max_num_pages; $nextpage = ( ! $paged ) ? 2 : (int) $paged + 1; From 24359919d314aa63bfb94752a2b6a8f9b0b537ac Mon Sep 17 00:00:00 2001 From: David Shanske Date: Sun, 4 Jun 2023 00:51:41 +0000 Subject: [PATCH 2/2] Bump version --- README.md | 4 ++++ jsonfeed-wp.php | 2 +- readme.txt | 7 +++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 36a2d8e..78abf6d 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,10 @@ This is a syndication format, which means it only represents your posts and comm ## Changelog +### 1.4.4 + +* Fix declaration error + ### 1.4.3 * Add next_url diff --git a/jsonfeed-wp.php b/jsonfeed-wp.php index 87b3c3d..b1c2004 100644 --- a/jsonfeed-wp.php +++ b/jsonfeed-wp.php @@ -3,7 +3,7 @@ Plugin Name: JSON Feed Plugin URI: https://github.com/manton/jsonfeed-wp/ Description: Adds a feed of recent posts in JSON Feed format. -Version: 1.4.3 +Version: 1.4.4 Author: Manton Reece and Daniel Jalkut Text Domain: jsonfeed License: GPL2.0+ diff --git a/readme.txt b/readme.txt index 2c909eb..d12f447 100644 --- a/readme.txt +++ b/readme.txt @@ -2,9 +2,9 @@ Contributors: mantonr, redsweater, dshanske Tags: jsonfeed, json, feed, feeds Requires at least: 4.9 -Tested up to: 6.0 +Tested up to: 6.2 Requires PHP: 5.4 -Stable tag: 1.4.3 +Stable tag: 1.4.4 License: GPL-2.0+ License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -47,6 +47,9 @@ This is a syndication format, which means it only represents your posts and comm == Changelog == += 1.4.4 = +* Fix declaration error + = 1.4.3 = * Add next_url * Add CORS header