Plugin Directory

Changeset 2918717


Ignore:
Timestamp:
05/29/2023 08:05:25 PM (3 years ago)
Author:
ash_hitch
Message:

Update to version 4.22.4 from GitHub

Location:
add-wpgraphql-seo
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • add-wpgraphql-seo/tags/4.22.4/CHANGELOG.md

    r2918714 r2918717  
    55The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
    66and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
     7
     8## [4.22.4] - 2023-05-29
     9
     10### Fixed
     11
     12-   Internal server error when querying SEO fields for a user that has no posts (#157) (thanks @pascalroget)
     13-   woocommerce product support (#158) (thanks @berryhijwegen)
    714
    815## [4.22.3] - 2023-05-29
  • add-wpgraphql-seo/tags/4.22.4/package.json

    r2918714 r2918717  
    11{
    22    "name": "wp-graphql-yoast-seo",
    3     "version": "4.22.3",
     3    "version": "4.22.4",
    44    "description": "A WPGraphQL Extension that adds support for Yoast SEO",
    55    "scripts": {
  • add-wpgraphql-seo/tags/4.22.4/readme.txt

    r2918714 r2918717  
    55Tested up to: 6.1.1
    66Requires PHP: 7.1
    7 Stable tag: 4.22.3
     7Stable tag: 4.22.4
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
  • add-wpgraphql-seo/tags/4.22.4/wp-graphql-yoast-seo.php

    r2918714 r2918717  
    99 * Text Domain:     wp-graphql-yoast-seo
    1010 * Domain Path:     /languages
    11  * Version:         4.22.3
     11 * Version:         4.22.4
    1212 *
    1313 * @package         WP_Graphql_YOAST_SEO
     
    843843            },
    844844        ]);
     845
     846        // if woocommerce is active, add seo to product
     847        if (class_exists('WooCommerce')) {
     848            register_graphql_field('Product', 'seo', [
     849                'type' => 'PostTypeSEO',
     850                'description' => __('The Yoast SEO data of the ContentNode', 'wp-graphql-yoast-seo'),
     851                'resolve' => function ($post, array $args, AppContext $context) {
     852                    return get_post_type_graphql_fields($post, $args, $context);
     853                },
     854            ]);
     855        }
     856
    845857        // TODO connect to content node
    846858        // Post Type SEO Data
     
    905917            'description' => __('The Yoast SEO data of a user', 'wp-graphql-yoast-seo'),
    906918            'resolve' => function ($user, array $args, AppContext $context) {
     919                // Author has no posts
     920                if (!YoastSEO()->meta->for_author($user->userId)) {
     921                    return [];
     922                }
     923
    907924                $robots = YoastSEO()->meta->for_author($user->userId)->robots;
    908925
  • add-wpgraphql-seo/trunk/CHANGELOG.md

    r2918714 r2918717  
    55The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
    66and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
     7
     8## [4.22.4] - 2023-05-29
     9
     10### Fixed
     11
     12-   Internal server error when querying SEO fields for a user that has no posts (#157) (thanks @pascalroget)
     13-   woocommerce product support (#158) (thanks @berryhijwegen)
    714
    815## [4.22.3] - 2023-05-29
  • add-wpgraphql-seo/trunk/package.json

    r2918714 r2918717  
    11{
    22    "name": "wp-graphql-yoast-seo",
    3     "version": "4.22.3",
     3    "version": "4.22.4",
    44    "description": "A WPGraphQL Extension that adds support for Yoast SEO",
    55    "scripts": {
  • add-wpgraphql-seo/trunk/readme.txt

    r2918714 r2918717  
    55Tested up to: 6.1.1
    66Requires PHP: 7.1
    7 Stable tag: 4.22.3
     7Stable tag: 4.22.4
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
  • add-wpgraphql-seo/trunk/wp-graphql-yoast-seo.php

    r2918714 r2918717  
    99 * Text Domain:     wp-graphql-yoast-seo
    1010 * Domain Path:     /languages
    11  * Version:         4.22.3
     11 * Version:         4.22.4
    1212 *
    1313 * @package         WP_Graphql_YOAST_SEO
     
    843843            },
    844844        ]);
     845
     846        // if woocommerce is active, add seo to product
     847        if (class_exists('WooCommerce')) {
     848            register_graphql_field('Product', 'seo', [
     849                'type' => 'PostTypeSEO',
     850                'description' => __('The Yoast SEO data of the ContentNode', 'wp-graphql-yoast-seo'),
     851                'resolve' => function ($post, array $args, AppContext $context) {
     852                    return get_post_type_graphql_fields($post, $args, $context);
     853                },
     854            ]);
     855        }
     856
    845857        // TODO connect to content node
    846858        // Post Type SEO Data
     
    905917            'description' => __('The Yoast SEO data of a user', 'wp-graphql-yoast-seo'),
    906918            'resolve' => function ($user, array $args, AppContext $context) {
     919                // Author has no posts
     920                if (!YoastSEO()->meta->for_author($user->userId)) {
     921                    return [];
     922                }
     923
    907924                $robots = YoastSEO()->meta->for_author($user->userId)->robots;
    908925
Note: See TracChangeset for help on using the changeset viewer.