Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
ashhitch committed May 29, 2023
1 parent a98a045 commit 305df06
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@ 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).

## [4.22.3] - 2023-05-29

### Fixed

- Fixes an error if $meta is empty for post type archive (#132) (thanks @LiamMartens)

## [4.22.2] - 2023-04-17

### Fixed

- Cannot return null for non-nullable field "MediaItem.id" (#132) (thanks @izzygld)
- Cannot return null for non-nullable field "MediaItem.id" (#132) (thanks @izzygld)

## [4.22.1] - 2023-03-08

### Fixed

- Taxonomies metatag behaviour fixed (#152)
- Taxonomies metatag behaviour fixed (#152)

## [4.22.0] - 2023-02-06

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wp-graphql-yoast-seo",
"version": "4.22.0",
"version": "4.22.3",
"description": "A WPGraphQL Extension that adds support for Yoast SEO",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: SEO, Yoast, WPGraphQL, GraphQL, Headless WordPress, Decoupled WordPress, J
Requires at least: 5.0
Tested up to: 6.1.1
Requires PHP: 7.1
Stable tag: 4.22.2
Stable tag: 4.22.3
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down
12 changes: 7 additions & 5 deletions wp-graphql-yoast-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Author URI: https://www.ashleyhitchcock.com
* Text Domain: wp-graphql-yoast-seo
* Domain Path: /languages
* Version: 4.22.2
* Version: 4.22.3
*
* @package WP_Graphql_YOAST_SEO
*/
Expand Down Expand Up @@ -142,10 +142,10 @@ function wpcom_vip_attachment_url_to_postid($url)
} elseif ('not_found' === $id) {
return null; // Return null instead of false
}

return $id;
}
}
}

function wp_gql_seo_build_content_types($types)
{
Expand Down Expand Up @@ -185,7 +185,9 @@ function wp_gql_seo_build_content_type_data($types, $all)

$meta = YoastSEO()->meta->for_post_type_archive($type);

if (empty($meta)) continue;
if (empty($meta)) {
continue;
}

$carry[$tag] = [
'title' => !empty($all['title-' . $type])
Expand Down Expand Up @@ -754,7 +756,7 @@ function get_post_type_graphql_fields($post, array $args, AppContext $context)
'@graph' => 'graph',
'@context' => 'context',
];
if( $post instanceof Term ){
if ($post instanceof Term) {
$meta = YoastSEO()->meta->for_term($post->term_id);
} else {
$meta = YoastSEO()->meta->for_post($post->ID);
Expand Down

0 comments on commit 305df06

Please sign in to comment.