Plugin Directory

Changeset 2499275


Ignore:
Timestamp:
03/19/2021 08:51:25 AM (5 years ago)
Author:
ash_hitch
Message:

Update to version 4.12.0 from GitHub

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

Legend:

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

    r2452361 r2499275  
    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.12.0] - 2021-03-19
     9
     10### Added
     11
     12-   Archive settings for post types
     13-   Reading Time
    714
    815## [4.11.0] - 2021-01-08
  • add-wpgraphql-seo/tags/4.12.0/README.md

    r2452361 r2499275  
    5555
    5656## Usage with Gatsby
     57
    5758Checkout the companion [Gatsby plugin](https://github.com/ashhitch/gatsby-plugin-wpgraphql-seo) to add in Metadata and JSON LD schema with ease.
    58 
    5959
    6060## Usage
     
    108108                        raw
    109109                    }
     110                    readingTime
    110111                }
    111112                author {
     
    332333                    raw
    333334                }
     335                archive {
     336                    archiveLink
     337                    breadcrumbTitle
     338                    hasArchive
     339                    metaDesc
     340                    metaRobotsNoindex
     341                    title
     342                }
    334343            }
    335344            page {
     
    353362```
    354363
    355 
    356364## Support
    357365
     
    360368[Twitter: @ash_hitchcock](https://twitter.com/ash_hitchcock)
    361369
    362 
    363370> Please Note: Yoast and WPGraphQL and their logos are copyright to their respective owners.
  • add-wpgraphql-seo/tags/4.12.0/readme.txt

    r2452361 r2499275  
    33Tags: SEO, Yoast, WPGraphQL, GraphQL, Headless WordPress, Decoupled WordPress, JAMStack
    44Requires at least: 5.0
    5 Tested up to: 5.4
     5Tested up to: 5.7
    66Requires PHP: 7.1
    7 Stable tag: 4.11.0
     7Stable tag: 4.12.0
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
  • add-wpgraphql-seo/tags/4.12.0/wp-graphql-yoast-seo.php

    r2452361 r2499275  
    99 * Text Domain:     wp-graphql-yoast-seo
    1010 * Domain Path:     /languages
    11  * Version:         4.11.0
     11 * Version:         4.12.0
    1212 *
    1313 * @package         WP_Graphql_YOAST_SEO
     
    154154        foreach ($types as $type) {
    155155            $post_type_object = get_post_type_object($type);
     156
    156157            if ($post_type_object->graphql_single_name) {
    157158                $tag = wp_gql_seo_get_field_key(
     
    163164
    164165                $carry[$tag] = [
    165                     'title' => $all['title-' . $tag],
    166                     'metaDesc' => $all['metadesc-' . $tag],
    167                     'metaRobotsNoindex' => $all['noindex-' . $tag],
    168                     'schemaType' => $all['schema-page-type-' . $tag],
     166                    'title' => $all['title-' . $type],
     167                    'metaDesc' => $all['metadesc-' . $type],
     168                    'metaRobotsNoindex' => $all['noindex-' . $type],
     169                    'schemaType' => $all['schema-page-type-' . $type],
    169170                    'schema' => [
    170171                        'raw' => json_encode($schemaArray, JSON_UNESCAPED_SLASHES),
    171172                    ],
     173                    'archive' =>
     174                        $tag == 'post' //Posts are stored like this
     175                            ? [
     176                                'hasArchive' => true,
     177                                'archiveLink' => get_post_type_archive_link($type),
     178                                'title' => $all['title-archive-wpseo'],
     179                                '' => $all['metadesc-archive-wpseo'],
     180                                '' => $all['noindex-archive-wpseo'],
     181                                'breadcrumbTitle' => $all['bctitle-archive-wpseo'],
     182                                'metaRobotsNoindex' => boolval(
     183                                    $all['noindex-archive-wpseo']
     184                                ),
     185                            ]
     186                            : [
     187                                'hasArchive' => boolval(
     188                                    $post_type_object->has_archive
     189                                ),
     190                                'archiveLink' => get_post_type_archive_link($type),
     191                                'title' => $post_type_object->has_archive
     192                                    ? $all['title-ptarchive-' . $type]
     193                                    : null,
     194                                'metaDesc' => $post_type_object->has_archive
     195                                    ? $all['metadesc-ptarchive-' . $type]
     196                                    : null,
     197                                'metaRobotsNoindex' => $post_type_object->has_archive
     198                                    ? boolval($all['noindex-ptarchive-' . $type])
     199                                    : false,
     200                                'breadcrumbTitle' => $post_type_object->has_archive
     201                                    ? $all['bctitle-ptarchive-' . $type]
     202                                    : null,
     203                            ],
    172204                ];
    173205            }
     
    249281        register_graphql_object_type('PostTypeSEO', [
    250282            'fields' => array_merge($baseSEOFields, [
     283                'readingTime' => ['type' => 'Float'],
    251284                'schema' => ['type' => 'SEOPostTypeSchema'],
    252285            ]),
     
    405438        ]);
    406439
     440        register_graphql_object_type('SEOContentTypeArchive', [
     441            'description' => __(
     442                'he Yoast SEO search appearance content types fields',
     443                'wp-graphql-yoast-seo'
     444            ),
     445            'fields' => [
     446                'hasArchive' => ['type' => 'Boolean'],
     447                'title' => ['type' => 'String'],
     448                'archiveLink' => ['type' => 'String'],
     449                'metaDesc' => ['type' => 'String'],
     450                'metaRobotsNoindex' => ['type' => 'Boolean'],
     451                'breadcrumbTitle' => ['type' => 'String'],
     452            ],
     453        ]);
    407454        register_graphql_object_type('SEOContentType', [
    408455            'description' => __(
     
    416463                'schemaType' => ['type' => 'String'],
    417464                'schema' => ['type' => 'SEOPageInfoSchema'],
     465                'archive' => ['type' => 'SEOContentTypeArchive'],
    418466            ],
    419467        ]);
     
    801849                                        YoastSEO()->meta->for_post($post->ID)
    802850                                            ->canonical
     851                                    ),
     852                                    'readingTime' => floatval(
     853                                        YoastSEO()->meta->for_post($post->ID)
     854                                            ->estimated_reading_time_minutes
    803855                                    ),
    804856                                    'breadcrumbs' => YoastSEO()->meta->for_post(
  • add-wpgraphql-seo/trunk/CHANGELOG.md

    r2452361 r2499275  
    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.12.0] - 2021-03-19
     9
     10### Added
     11
     12-   Archive settings for post types
     13-   Reading Time
    714
    815## [4.11.0] - 2021-01-08
  • add-wpgraphql-seo/trunk/README.md

    r2452361 r2499275  
    5555
    5656## Usage with Gatsby
     57
    5758Checkout the companion [Gatsby plugin](https://github.com/ashhitch/gatsby-plugin-wpgraphql-seo) to add in Metadata and JSON LD schema with ease.
    58 
    5959
    6060## Usage
     
    108108                        raw
    109109                    }
     110                    readingTime
    110111                }
    111112                author {
     
    332333                    raw
    333334                }
     335                archive {
     336                    archiveLink
     337                    breadcrumbTitle
     338                    hasArchive
     339                    metaDesc
     340                    metaRobotsNoindex
     341                    title
     342                }
    334343            }
    335344            page {
     
    353362```
    354363
    355 
    356364## Support
    357365
     
    360368[Twitter: @ash_hitchcock](https://twitter.com/ash_hitchcock)
    361369
    362 
    363370> Please Note: Yoast and WPGraphQL and their logos are copyright to their respective owners.
  • add-wpgraphql-seo/trunk/readme.txt

    r2452361 r2499275  
    33Tags: SEO, Yoast, WPGraphQL, GraphQL, Headless WordPress, Decoupled WordPress, JAMStack
    44Requires at least: 5.0
    5 Tested up to: 5.4
     5Tested up to: 5.7
    66Requires PHP: 7.1
    7 Stable tag: 4.11.0
     7Stable tag: 4.12.0
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
  • add-wpgraphql-seo/trunk/wp-graphql-yoast-seo.php

    r2452361 r2499275  
    99 * Text Domain:     wp-graphql-yoast-seo
    1010 * Domain Path:     /languages
    11  * Version:         4.11.0
     11 * Version:         4.12.0
    1212 *
    1313 * @package         WP_Graphql_YOAST_SEO
     
    154154        foreach ($types as $type) {
    155155            $post_type_object = get_post_type_object($type);
     156
    156157            if ($post_type_object->graphql_single_name) {
    157158                $tag = wp_gql_seo_get_field_key(
     
    163164
    164165                $carry[$tag] = [
    165                     'title' => $all['title-' . $tag],
    166                     'metaDesc' => $all['metadesc-' . $tag],
    167                     'metaRobotsNoindex' => $all['noindex-' . $tag],
    168                     'schemaType' => $all['schema-page-type-' . $tag],
     166                    'title' => $all['title-' . $type],
     167                    'metaDesc' => $all['metadesc-' . $type],
     168                    'metaRobotsNoindex' => $all['noindex-' . $type],
     169                    'schemaType' => $all['schema-page-type-' . $type],
    169170                    'schema' => [
    170171                        'raw' => json_encode($schemaArray, JSON_UNESCAPED_SLASHES),
    171172                    ],
     173                    'archive' =>
     174                        $tag == 'post' //Posts are stored like this
     175                            ? [
     176                                'hasArchive' => true,
     177                                'archiveLink' => get_post_type_archive_link($type),
     178                                'title' => $all['title-archive-wpseo'],
     179                                '' => $all['metadesc-archive-wpseo'],
     180                                '' => $all['noindex-archive-wpseo'],
     181                                'breadcrumbTitle' => $all['bctitle-archive-wpseo'],
     182                                'metaRobotsNoindex' => boolval(
     183                                    $all['noindex-archive-wpseo']
     184                                ),
     185                            ]
     186                            : [
     187                                'hasArchive' => boolval(
     188                                    $post_type_object->has_archive
     189                                ),
     190                                'archiveLink' => get_post_type_archive_link($type),
     191                                'title' => $post_type_object->has_archive
     192                                    ? $all['title-ptarchive-' . $type]
     193                                    : null,
     194                                'metaDesc' => $post_type_object->has_archive
     195                                    ? $all['metadesc-ptarchive-' . $type]
     196                                    : null,
     197                                'metaRobotsNoindex' => $post_type_object->has_archive
     198                                    ? boolval($all['noindex-ptarchive-' . $type])
     199                                    : false,
     200                                'breadcrumbTitle' => $post_type_object->has_archive
     201                                    ? $all['bctitle-ptarchive-' . $type]
     202                                    : null,
     203                            ],
    172204                ];
    173205            }
     
    249281        register_graphql_object_type('PostTypeSEO', [
    250282            'fields' => array_merge($baseSEOFields, [
     283                'readingTime' => ['type' => 'Float'],
    251284                'schema' => ['type' => 'SEOPostTypeSchema'],
    252285            ]),
     
    405438        ]);
    406439
     440        register_graphql_object_type('SEOContentTypeArchive', [
     441            'description' => __(
     442                'he Yoast SEO search appearance content types fields',
     443                'wp-graphql-yoast-seo'
     444            ),
     445            'fields' => [
     446                'hasArchive' => ['type' => 'Boolean'],
     447                'title' => ['type' => 'String'],
     448                'archiveLink' => ['type' => 'String'],
     449                'metaDesc' => ['type' => 'String'],
     450                'metaRobotsNoindex' => ['type' => 'Boolean'],
     451                'breadcrumbTitle' => ['type' => 'String'],
     452            ],
     453        ]);
    407454        register_graphql_object_type('SEOContentType', [
    408455            'description' => __(
     
    416463                'schemaType' => ['type' => 'String'],
    417464                'schema' => ['type' => 'SEOPageInfoSchema'],
     465                'archive' => ['type' => 'SEOContentTypeArchive'],
    418466            ],
    419467        ]);
     
    801849                                        YoastSEO()->meta->for_post($post->ID)
    802850                                            ->canonical
     851                                    ),
     852                                    'readingTime' => floatval(
     853                                        YoastSEO()->meta->for_post($post->ID)
     854                                            ->estimated_reading_time_minutes
    803855                                    ),
    804856                                    'breadcrumbs' => YoastSEO()->meta->for_post(
Note: See TracChangeset for help on using the changeset viewer.