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/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 []; } 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