Skip to content

Commit

Permalink
Merge pull request #2470 from Parsely/prepare/3.14.5-release
Browse files Browse the repository at this point in the history
Release wp-parsely 3.14.5
  • Loading branch information
acicovic authored May 9, 2024
2 parents f70172e + 5d89edf commit 601fdcf
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.14.5](https://github.com/Parsely/wp-parsely/compare/3.14.4...3.14.5) - 2024-05-09

### Fixed

- Fix: Make PCH Related Posts filters work for non-admins ([#2467](https://github.com/Parsely/wp-parsely/pull/2467))

## [3.14.4](https://github.com/Parsely/wp-parsely/compare/3.14.3...3.14.4) - 2024-05-06

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Parse.ly

Stable tag: 3.14.4
Stable tag: 3.14.5
Requires at least: 5.2
Tested up to: 6.5
Requires PHP: 7.2
Expand Down
2 changes: 1 addition & 1 deletion build/content-helper/editor-sidebar.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => 'eb6c5ec223f3254dbe5a');
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-url'), 'version' => 'a16d4a6df7ef859f50df');
2 changes: 1 addition & 1 deletion build/content-helper/editor-sidebar.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wp-parsely",
"version": "3.14.4",
"version": "3.14.5",
"private": true,
"description": "The Parse.ly plugin facilitates real-time and historical analytics to your content through a platform designed and built for digital publishing.",
"author": "parsely, hbbtstar, jblz, mikeyarce, GaryJ, parsely_mike, acicovic, mehmoodak, vaurdan",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ export const RelatedPostsPanel = (): JSX.Element => {
const noAuthorsExist = 0 === postData.authors.length;
const noTagsExist = 0 === postData.tags.length;
const noCategoriesExist = 0 === postData.categories.length;
const authorIsUnavailable = filterTypeIsAuthor && ! postData.authors.includes( filter.value );
const tagIsUnavailable = filterTypeIsTag && ! postData.tags.includes( filter.value );
const sectionIsUnavailable = filterTypeIsSection && ! postData.categories.includes( filter.value );

Expand All @@ -308,6 +309,8 @@ export const RelatedPostsPanel = (): JSX.Element => {
setFilter( { type: PostFilterType.Tag, value: postData.tags[ 0 ] } );
} else if ( sectionIsUnavailable ) {
setFilter( { type: PostFilterType.Section, value: postData.categories[ 0 ] } );
} else if ( authorIsUnavailable ) {
setFilter( { type: PostFilterType.Author, value: postData.authors[ 0 ] } );
} else {
fetchPosts( FETCH_RETRIES );
}
Expand Down Expand Up @@ -376,7 +379,7 @@ export const RelatedPostsPanel = (): JSX.Element => {

// No filter data could be retrieved. Prevent the component from rendering.
if ( postData.authors.length === 0 && postData.categories.length === 0 &&
postData.tags.length === 0
postData.tags.length === 0 && isPostDataReady
) {
return (
<div className="wp-parsely-related-posts">
Expand Down
6 changes: 3 additions & 3 deletions src/content-helper/editor-sidebar/related-posts/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function usePostData(): PostData {

if ( Number.isInteger( authorId ) ) {
authorRecords = getEntityRecords(
'root', 'user', { include: [ authorId ] }
'root', 'user', { include: [ authorId ], context: 'view' }
) ?? undefined; // Coalescing null to undefined
} else {
authorRecords = null;
Expand All @@ -66,7 +66,7 @@ export function usePostData(): PostData {
categoryIds.every( Number.isInteger )
) {
categoryRecords = getEntityRecords(
'taxonomy', 'category', { include: categoryIds }
'taxonomy', 'category', { include: categoryIds, context: 'view' }
) ?? undefined; // Coalescing null to undefined
} else {
categoryRecords = null;
Expand All @@ -76,7 +76,7 @@ export function usePostData(): PostData {
tagIds.every( Number.isInteger )
) {
tagRecords = getEntityRecords(
'taxonomy', 'post_tag', { include: tagIds }
'taxonomy', 'post_tag', { include: tagIds, context: 'view' }
) ?? undefined; // Coalescing null to undefined
} else {
tagRecords = null;
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
visitAdminPage,
} from '@wordpress/e2e-test-utils';

export const PLUGIN_VERSION = '3.14.4';
export const PLUGIN_VERSION = '3.14.5';
export const VALID_SITE_ID = 'demoaccount.parsely.com';
export const INVALID_SITE_ID = 'invalid.parsely.com';
export const VALID_API_SECRET = 'valid_api_secret';
Expand Down
4 changes: 2 additions & 2 deletions wp-parsely.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Plugin Name: Parse.ly
* Plugin URI: https://docs.parse.ly/wordpress
* Description: This plugin makes it a snap to add Parse.ly tracking code and metadata to your WordPress blog.
* Version: 3.14.4
* Version: 3.14.5
* Author: Parse.ly
* Author URI: https://www.parse.ly
* Text Domain: wp-parsely
Expand Down Expand Up @@ -69,7 +69,7 @@
return;
}

const PARSELY_VERSION = '3.14.4';
const PARSELY_VERSION = '3.14.5';
const PARSELY_FILE = __FILE__;

require_once __DIR__ . '/src/class-parsely.php';
Expand Down

0 comments on commit 601fdcf

Please sign in to comment.