Changeset 2452361
- Timestamp:
- 01/08/2021 08:27:14 AM (5 years ago)
- Location:
- add-wpgraphql-seo
- Files:
-
- 8 edited
- 1 copied
-
tags/4.11.0 (copied) (copied from add-wpgraphql-seo/trunk)
-
tags/4.11.0/CHANGELOG.md (modified) (1 diff)
-
tags/4.11.0/README.md (modified) (3 diffs)
-
tags/4.11.0/readme.txt (modified) (1 diff)
-
tags/4.11.0/wp-graphql-yoast-seo.php (modified) (8 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/README.md (modified) (3 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/wp-graphql-yoast-seo.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
add-wpgraphql-seo/tags/4.11.0/CHANGELOG.md
r2444102 r2452361 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## [4.11.0] - 2021-01-08 9 10 ### Changed 11 12 - Updated deprecated deprecated function changed in WPGraphQL v1.1.0 (thanks @jasonbahl) 7 13 8 14 ## [4.10.2] - 2020-12-22 -
add-wpgraphql-seo/tags/4.11.0/README.md
r2444102 r2452361 53 53 54 54 This applies to `twitterImage` and `opengraphImage` 55 56 ## Usage with Gatsby 57 Checkout the companion [Gatsby plugin](https://github.com/ashhitch/gatsby-plugin-wpgraphql-seo) to add in Metadata and JSON LD schema with ease. 58 55 59 56 60 ## Usage … … 349 353 ``` 350 354 351 ## Notes352 353 This can be used in production, however it is still under active development, breaking changes will only be introduced with major version releases.354 355 355 356 ## Support … … 359 360 [Twitter: @ash_hitchcock](https://twitter.com/ash_hitchcock) 360 361 361 ## Contributors (PRs and Issues)362 363 364 362 365 363 > Please Note: Yoast and WPGraphQL and their logos are copyright to their respective owners. -
add-wpgraphql-seo/tags/4.11.0/readme.txt
r2444102 r2452361 5 5 Tested up to: 5.4 6 6 Requires PHP: 7.1 7 Stable tag: 4.1 0.27 Stable tag: 4.11.0 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
add-wpgraphql-seo/tags/4.11.0/wp-graphql-yoast-seo.php
r2444102 r2452361 9 9 * Text Domain: wp-graphql-yoast-seo 10 10 * Domain Path: /languages 11 * Version: 4.1 0.211 * Version: 4.11.0 12 12 * 13 13 * @package WP_Graphql_YOAST_SEO … … 19 19 20 20 use WPGraphQL\AppContext; 21 use WPGraphQL\Data\DataSource;22 21 23 22 add_action('admin_init', function () { … … 613 612 $user->user_nicename 614 613 ), 615 'companyLogo' => DataSource::resolve_post_object( 616 $all['company_logo_id'], 617 $context 618 ), 619 'personLogo' => DataSource::resolve_post_object( 620 $all['person_logo_id'], 621 $context 622 ), 623 'logo' => DataSource::resolve_post_object( 624 $all['company_or_person'] === 'company' 625 ? $all['company_logo_id'] 626 : $all['person_logo_id'], 627 $context 628 ), 614 'companyLogo' => $context 615 ->get_loader('post') 616 ->load_deferred(absint($all['company_logo_id'])), 617 'personLogo' => $context 618 ->get_loader('post') 619 ->load_deferred(absint($all['person_logo_id'])), 620 'logo' => $context 621 ->get_loader('post') 622 ->load_deferred( 623 $all['company_or_person'] === 'company' 624 ? absint($all['company_logo_id']) 625 : absint($all['person_logo_id']) 626 ), 629 627 'companyOrPerson' => wp_gql_seo_format_string( 630 628 $all['company_or_person'] … … 643 641 'redirects' => array_map($mappedRedirects, $redirects), 644 642 'openGraph' => [ 645 'defaultImage' => DataSource::resolve_post_object( 646 $all['og_default_image_id'], 647 $context 648 ), 643 'defaultImage' => $context 644 ->get_loader('post') 645 ->load_deferred(absint($all['og_default_image_id'])), 649 646 'frontPage' => [ 650 647 'title' => wp_gql_seo_format_string( … … 654 651 $all['og_frontpage_desc'] 655 652 ), 656 'image' => DataSource::resolve_post_object( 657 $all['og_frontpage_image_id'], 658 $context 659 ), 653 'image' => $context 654 ->get_loader('post') 655 ->load_deferred( 656 absint($all['og_frontpage_image_id']) 657 ), 660 658 ], 661 659 ], … … 762 760 ->open_graph_description 763 761 ), 764 'opengraphImage' => DataSource::resolve_post_object( 765 wp_gql_seo_get_og_image( 762 'opengraphImage' => function () use ( 763 $post, 764 $context 765 ) { 766 $id = wp_gql_seo_get_og_image( 766 767 YoastSEO()->meta->for_post($post->ID) 767 768 ->open_graph_images 768 ), 769 ); 770 771 return $context 772 ->get_loader('post') 773 ->load_deferred(absint($id)); 774 }, 775 'twitterCardType' => wp_gql_seo_format_string( 776 YoastSEO()->meta->for_post($post->ID) 777 ->twitter_card 778 ), 779 'twitterTitle' => wp_gql_seo_format_string( 780 YoastSEO()->meta->for_post($post->ID) 781 ->twitter_title 782 ), 783 'twitterDescription' => wp_gql_seo_format_string( 784 YoastSEO()->meta->for_post($post->ID) 785 ->twitter_description 786 ), 787 'twitterImage' => function () use ( 788 $post, 769 789 $context 770 ), 771 'twitterCardType' => wp_gql_seo_format_string( 772 YoastSEO()->meta->for_post($post->ID) 773 ->twitter_card 774 ), 775 'twitterTitle' => wp_gql_seo_format_string( 776 YoastSEO()->meta->for_post($post->ID) 777 ->twitter_title 778 ), 779 'twitterDescription' => wp_gql_seo_format_string( 780 YoastSEO()->meta->for_post($post->ID) 781 ->twitter_description 782 ), 783 'twitterImage' => DataSource::resolve_post_object( 784 wpcom_vip_attachment_url_to_postid( 790 ) { 791 $id = wpcom_vip_attachment_url_to_postid( 785 792 YoastSEO()->meta->for_post($post->ID) 786 793 ->twitter_image 787 ), 788 $context 789 ), 794 ); 795 796 return $context 797 ->get_loader('post') 798 ->load_deferred(absint($id)); 799 }, 790 800 'canonical' => wp_gql_seo_format_string( 791 801 YoastSEO()->meta->for_post($post->ID) … … 1052 1062 ->open_graph_description 1053 1063 ), 1054 'opengraphImage' => DataSource::resolve_post_object( 1055 $meta['wpseo_opengraph-image-id'], 1056 $context 1057 ), 1064 'opengraphImage' => $context 1065 ->get_loader('post') 1066 ->load_deferred( 1067 absint($meta['wpseo_opengraph-image-id']) 1068 ), 1058 1069 'twitterCardType' => wp_gql_seo_format_string( 1059 1070 YoastSEO()->meta->for_term($term->term_id) … … 1068 1079 ->twitter_description 1069 1080 ), 1070 'twitterImage' => DataSource::resolve_post_object( 1071 $meta['wpseo_twitter-image-id'], 1072 $context 1073 ), 1081 'twitterImage' => $context 1082 ->get_loader('post') 1083 ->load_deferred( 1084 absint($meta['wpseo_twitter-image-id']) 1085 ), 1074 1086 'canonical' => wp_gql_seo_format_string( 1075 1087 $meta['canonical'] -
add-wpgraphql-seo/trunk/CHANGELOG.md
r2444102 r2452361 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## [4.11.0] - 2021-01-08 9 10 ### Changed 11 12 - Updated deprecated deprecated function changed in WPGraphQL v1.1.0 (thanks @jasonbahl) 7 13 8 14 ## [4.10.2] - 2020-12-22 -
add-wpgraphql-seo/trunk/README.md
r2444102 r2452361 53 53 54 54 This applies to `twitterImage` and `opengraphImage` 55 56 ## Usage with Gatsby 57 Checkout the companion [Gatsby plugin](https://github.com/ashhitch/gatsby-plugin-wpgraphql-seo) to add in Metadata and JSON LD schema with ease. 58 55 59 56 60 ## Usage … … 349 353 ``` 350 354 351 ## Notes352 353 This can be used in production, however it is still under active development, breaking changes will only be introduced with major version releases.354 355 355 356 ## Support … … 359 360 [Twitter: @ash_hitchcock](https://twitter.com/ash_hitchcock) 360 361 361 ## Contributors (PRs and Issues)362 363 364 362 365 363 > Please Note: Yoast and WPGraphQL and their logos are copyright to their respective owners. -
add-wpgraphql-seo/trunk/readme.txt
r2444102 r2452361 5 5 Tested up to: 5.4 6 6 Requires PHP: 7.1 7 Stable tag: 4.1 0.27 Stable tag: 4.11.0 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
add-wpgraphql-seo/trunk/wp-graphql-yoast-seo.php
r2444102 r2452361 9 9 * Text Domain: wp-graphql-yoast-seo 10 10 * Domain Path: /languages 11 * Version: 4.1 0.211 * Version: 4.11.0 12 12 * 13 13 * @package WP_Graphql_YOAST_SEO … … 19 19 20 20 use WPGraphQL\AppContext; 21 use WPGraphQL\Data\DataSource;22 21 23 22 add_action('admin_init', function () { … … 613 612 $user->user_nicename 614 613 ), 615 'companyLogo' => DataSource::resolve_post_object( 616 $all['company_logo_id'], 617 $context 618 ), 619 'personLogo' => DataSource::resolve_post_object( 620 $all['person_logo_id'], 621 $context 622 ), 623 'logo' => DataSource::resolve_post_object( 624 $all['company_or_person'] === 'company' 625 ? $all['company_logo_id'] 626 : $all['person_logo_id'], 627 $context 628 ), 614 'companyLogo' => $context 615 ->get_loader('post') 616 ->load_deferred(absint($all['company_logo_id'])), 617 'personLogo' => $context 618 ->get_loader('post') 619 ->load_deferred(absint($all['person_logo_id'])), 620 'logo' => $context 621 ->get_loader('post') 622 ->load_deferred( 623 $all['company_or_person'] === 'company' 624 ? absint($all['company_logo_id']) 625 : absint($all['person_logo_id']) 626 ), 629 627 'companyOrPerson' => wp_gql_seo_format_string( 630 628 $all['company_or_person'] … … 643 641 'redirects' => array_map($mappedRedirects, $redirects), 644 642 'openGraph' => [ 645 'defaultImage' => DataSource::resolve_post_object( 646 $all['og_default_image_id'], 647 $context 648 ), 643 'defaultImage' => $context 644 ->get_loader('post') 645 ->load_deferred(absint($all['og_default_image_id'])), 649 646 'frontPage' => [ 650 647 'title' => wp_gql_seo_format_string( … … 654 651 $all['og_frontpage_desc'] 655 652 ), 656 'image' => DataSource::resolve_post_object( 657 $all['og_frontpage_image_id'], 658 $context 659 ), 653 'image' => $context 654 ->get_loader('post') 655 ->load_deferred( 656 absint($all['og_frontpage_image_id']) 657 ), 660 658 ], 661 659 ], … … 762 760 ->open_graph_description 763 761 ), 764 'opengraphImage' => DataSource::resolve_post_object( 765 wp_gql_seo_get_og_image( 762 'opengraphImage' => function () use ( 763 $post, 764 $context 765 ) { 766 $id = wp_gql_seo_get_og_image( 766 767 YoastSEO()->meta->for_post($post->ID) 767 768 ->open_graph_images 768 ), 769 ); 770 771 return $context 772 ->get_loader('post') 773 ->load_deferred(absint($id)); 774 }, 775 'twitterCardType' => wp_gql_seo_format_string( 776 YoastSEO()->meta->for_post($post->ID) 777 ->twitter_card 778 ), 779 'twitterTitle' => wp_gql_seo_format_string( 780 YoastSEO()->meta->for_post($post->ID) 781 ->twitter_title 782 ), 783 'twitterDescription' => wp_gql_seo_format_string( 784 YoastSEO()->meta->for_post($post->ID) 785 ->twitter_description 786 ), 787 'twitterImage' => function () use ( 788 $post, 769 789 $context 770 ), 771 'twitterCardType' => wp_gql_seo_format_string( 772 YoastSEO()->meta->for_post($post->ID) 773 ->twitter_card 774 ), 775 'twitterTitle' => wp_gql_seo_format_string( 776 YoastSEO()->meta->for_post($post->ID) 777 ->twitter_title 778 ), 779 'twitterDescription' => wp_gql_seo_format_string( 780 YoastSEO()->meta->for_post($post->ID) 781 ->twitter_description 782 ), 783 'twitterImage' => DataSource::resolve_post_object( 784 wpcom_vip_attachment_url_to_postid( 790 ) { 791 $id = wpcom_vip_attachment_url_to_postid( 785 792 YoastSEO()->meta->for_post($post->ID) 786 793 ->twitter_image 787 ), 788 $context 789 ), 794 ); 795 796 return $context 797 ->get_loader('post') 798 ->load_deferred(absint($id)); 799 }, 790 800 'canonical' => wp_gql_seo_format_string( 791 801 YoastSEO()->meta->for_post($post->ID) … … 1052 1062 ->open_graph_description 1053 1063 ), 1054 'opengraphImage' => DataSource::resolve_post_object( 1055 $meta['wpseo_opengraph-image-id'], 1056 $context 1057 ), 1064 'opengraphImage' => $context 1065 ->get_loader('post') 1066 ->load_deferred( 1067 absint($meta['wpseo_opengraph-image-id']) 1068 ), 1058 1069 'twitterCardType' => wp_gql_seo_format_string( 1059 1070 YoastSEO()->meta->for_term($term->term_id) … … 1068 1079 ->twitter_description 1069 1080 ), 1070 'twitterImage' => DataSource::resolve_post_object( 1071 $meta['wpseo_twitter-image-id'], 1072 $context 1073 ), 1081 'twitterImage' => $context 1082 ->get_loader('post') 1083 ->load_deferred( 1084 absint($meta['wpseo_twitter-image-id']) 1085 ), 1074 1086 'canonical' => wp_gql_seo_format_string( 1075 1087 $meta['canonical']
Note: See TracChangeset
for help on using the changeset viewer.