From 3316d8fa323911aee394f3f1b8639b4c50c9dc03 Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Wed, 27 Mar 2024 10:26:09 -0500 Subject: [PATCH 1/4] WIP: issue-159 From fc66764e799d7af87e76fbc73dda2fdd5553a9d1 Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Wed, 27 Mar 2024 10:27:24 -0500 Subject: [PATCH 2/4] check if configured --- src/features/class-parsely-support.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/features/class-parsely-support.php b/src/features/class-parsely-support.php index adb9b84f..afaa1b1d 100644 --- a/src/features/class-parsely-support.php +++ b/src/features/class-parsely-support.php @@ -60,6 +60,10 @@ public function add_parsely_trending_posts_query( array $posts, array $args ): a * @return array An array of post IDs. */ public function get_trending_posts( array $args ): array { + $parsely = $GLOBALS['parsely']; + if ( ! $parsely->api_secret_is_set() ) { + return []; + } if ( ! class_exists( '\Parsely\Parsely' ) || ! isset( $GLOBALS['parsely'] ) || ! $GLOBALS['parsely'] instanceof Parsely ) { return []; } From c601750a1e3309806c87159f2b58201becda8b4e Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Wed, 27 Mar 2024 10:27:39 -0500 Subject: [PATCH 3/4] Ready for review From c39b00c5140c3956c0070822146d613dc4bac275 Mon Sep 17 00:00:00 2001 From: Greg Marshall Date: Wed, 27 Mar 2024 11:27:31 -0500 Subject: [PATCH 4/4] version bump --- CHANGELOG.md | 4 ++++ wp-curate.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72bd56d0..9fe02ee2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `WP Curate` will be documented in this file. +## 1.8.1 - 2024-03-27 + +- Bug Fix: Query blocks set to ordery trending fatal when Parse.ly is not set up. + ## 1.8.0 - 2024-03-19 - Enhancement: Integration with [WPGraphQL plugin](https://wordpress.org/plugins/wp-graphql/) to support custom GraphQL interface type and connection. diff --git a/wp-curate.php b/wp-curate.php index 475f112c..85dc51a0 100644 --- a/wp-curate.php +++ b/wp-curate.php @@ -3,7 +3,7 @@ * Plugin Name: WP Curate * Plugin URI: https://github.com/alleyinteractive/wp-curate * Description: Plugin to curate homepages and other landing pages - * Version: 1.8.0 + * Version: 1.8.1 * Author: Alley Interactive * Author URI: https://github.com/alleyinteractive/wp-curate * Requires at least: 6.4