Changeset 2701492
- Timestamp:
- 03/29/2022 07:51:17 PM (4 years ago)
- Location:
- add-wpgraphql-seo
- Files:
-
- 6 edited
- 1 copied
-
tags/4.17.0 (copied) (copied from add-wpgraphql-seo/trunk)
-
tags/4.17.0/CHANGELOG.md (modified) (1 diff)
-
tags/4.17.0/readme.txt (modified) (1 diff)
-
tags/4.17.0/wp-graphql-yoast-seo.php (modified) (5 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/wp-graphql-yoast-seo.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
add-wpgraphql-seo/tags/4.17.0/CHANGELOG.md
r2697321 r2701492 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 7 8 ## [4.16.2] - 2022-03-231 8 ## [4.17.0] - 2022-03-29 9 10 ### Changed 11 12 - Ensure placeholders are replaced (thanks @BronsonQuick) 13 - Update option names that are deprecated (thanks @BronsonQuick) 14 15 ## [4.16.2] - 2022-03-23 9 16 10 17 ### Changed -
add-wpgraphql-seo/tags/4.17.0/readme.txt
r2697321 r2701492 5 5 Tested up to: 5.7 6 6 Requires PHP: 7.1 7 Stable tag: 4.1 6.27 Stable tag: 4.17.0 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
add-wpgraphql-seo/tags/4.17.0/wp-graphql-yoast-seo.php
r2697321 r2701492 9 9 * Text Domain: wp-graphql-yoast-seo 10 10 * Domain Path: /languages 11 * Version: 4.1 6.211 * Version: 4.17.0 12 12 * 13 13 * @package WP_Graphql_YOAST_SEO … … 59 59 { 60 60 return isset($string) ? html_entity_decode(trim($string)) : null; 61 } 62 } 63 64 if (!function_exists('wp_gql_seo_replace_vars')) { 65 function wp_gql_seo_replace_vars($string) 66 { 67 // Get all the post types that have been registered. 68 $post_types = get_post_types(); 69 // Get all the taxonomies that have been registered. 70 $taxomonies = get_taxonomies(); 71 // Merge them together and pass them through. 72 $objects = array_merge($post_types, $taxomonies); 73 return isset($string) ? wpseo_replace_vars($string, $objects) : null; 61 74 } 62 75 } … … 184 197 $carry[$tag] = [ 185 198 'title' => !empty($all['title-' . $type]) 186 ? $all['title-' . $type] 199 ? wp_gql_seo_format_string( 200 wp_gql_seo_replace_vars($all['title-' . $type]) 201 ) 187 202 : null, 188 203 'metaDesc' => !empty($all['metadesc-' . $type]) 189 ? $all['metadesc-' . $type] 204 ? wp_gql_seo_format_string( 205 wp_gql_seo_replace_vars($all['metadesc-' . $type]) 206 ) 190 207 : null, 191 208 'metaRobotsNoindex' => !empty($all['noindex-' . $type]) … … 207 224 'archiveLink' => get_post_type_archive_link($type), 208 225 'title' => !empty($all['title-archive-wpseo']) 209 ? $all['title-archive-wpseo'] 226 ? wp_gql_seo_format_string( 227 wp_gql_seo_replace_vars( 228 $all['title-archive-wpseo'] 229 ) 230 ) 210 231 : null, 211 232 'metaDesc' => !empty($all['metadesc-archive-wpseo']) 212 ? $all['metadesc-archive-wpseo'] 233 ? wp_gql_seo_format_string( 234 wp_gql_seo_replace_vars( 235 $all['metadesc-archive-wpseo'] 236 ) 237 ) 213 238 : null, 214 239 'metaRobotsNoindex' => !empty( … … 787 812 'frontPage' => [ 788 813 'title' => wp_gql_seo_format_string( 789 $all['og_frontpage_title'] 814 wp_gql_seo_replace_vars( 815 $all['open_graph_frontpage_title'] 816 ) 790 817 ), 791 818 'description' => wp_gql_seo_format_string( 792 $all['og_frontpage_desc'] 819 wp_gql_seo_replace_vars( 820 $all['open_graph_frontpage_desc'] 821 ) 793 822 ), 794 823 'image' => $context 795 824 ->get_loader('post') 796 825 ->load_deferred( 797 absint($all['o g_frontpage_image_id'])826 absint($all['open_graph_frontpage_image_id']) 798 827 ), 799 828 ], -
add-wpgraphql-seo/trunk/CHANGELOG.md
r2697321 r2701492 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 7 8 ## [4.16.2] - 2022-03-231 8 ## [4.17.0] - 2022-03-29 9 10 ### Changed 11 12 - Ensure placeholders are replaced (thanks @BronsonQuick) 13 - Update option names that are deprecated (thanks @BronsonQuick) 14 15 ## [4.16.2] - 2022-03-23 9 16 10 17 ### Changed -
add-wpgraphql-seo/trunk/readme.txt
r2697321 r2701492 5 5 Tested up to: 5.7 6 6 Requires PHP: 7.1 7 Stable tag: 4.1 6.27 Stable tag: 4.17.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
r2697321 r2701492 9 9 * Text Domain: wp-graphql-yoast-seo 10 10 * Domain Path: /languages 11 * Version: 4.1 6.211 * Version: 4.17.0 12 12 * 13 13 * @package WP_Graphql_YOAST_SEO … … 59 59 { 60 60 return isset($string) ? html_entity_decode(trim($string)) : null; 61 } 62 } 63 64 if (!function_exists('wp_gql_seo_replace_vars')) { 65 function wp_gql_seo_replace_vars($string) 66 { 67 // Get all the post types that have been registered. 68 $post_types = get_post_types(); 69 // Get all the taxonomies that have been registered. 70 $taxomonies = get_taxonomies(); 71 // Merge them together and pass them through. 72 $objects = array_merge($post_types, $taxomonies); 73 return isset($string) ? wpseo_replace_vars($string, $objects) : null; 61 74 } 62 75 } … … 184 197 $carry[$tag] = [ 185 198 'title' => !empty($all['title-' . $type]) 186 ? $all['title-' . $type] 199 ? wp_gql_seo_format_string( 200 wp_gql_seo_replace_vars($all['title-' . $type]) 201 ) 187 202 : null, 188 203 'metaDesc' => !empty($all['metadesc-' . $type]) 189 ? $all['metadesc-' . $type] 204 ? wp_gql_seo_format_string( 205 wp_gql_seo_replace_vars($all['metadesc-' . $type]) 206 ) 190 207 : null, 191 208 'metaRobotsNoindex' => !empty($all['noindex-' . $type]) … … 207 224 'archiveLink' => get_post_type_archive_link($type), 208 225 'title' => !empty($all['title-archive-wpseo']) 209 ? $all['title-archive-wpseo'] 226 ? wp_gql_seo_format_string( 227 wp_gql_seo_replace_vars( 228 $all['title-archive-wpseo'] 229 ) 230 ) 210 231 : null, 211 232 'metaDesc' => !empty($all['metadesc-archive-wpseo']) 212 ? $all['metadesc-archive-wpseo'] 233 ? wp_gql_seo_format_string( 234 wp_gql_seo_replace_vars( 235 $all['metadesc-archive-wpseo'] 236 ) 237 ) 213 238 : null, 214 239 'metaRobotsNoindex' => !empty( … … 787 812 'frontPage' => [ 788 813 'title' => wp_gql_seo_format_string( 789 $all['og_frontpage_title'] 814 wp_gql_seo_replace_vars( 815 $all['open_graph_frontpage_title'] 816 ) 790 817 ), 791 818 'description' => wp_gql_seo_format_string( 792 $all['og_frontpage_desc'] 819 wp_gql_seo_replace_vars( 820 $all['open_graph_frontpage_desc'] 821 ) 793 822 ), 794 823 'image' => $context 795 824 ->get_loader('post') 796 825 ->load_deferred( 797 absint($all['o g_frontpage_image_id'])826 absint($all['open_graph_frontpage_image_id']) 798 827 ), 799 828 ],
Note: See TracChangeset
for help on using the changeset viewer.