Skip to content

Commit

Permalink
add language (#56)
Browse files Browse the repository at this point in the history
* add language

* update trim to function and example in readme
  • Loading branch information
ashhitch authored Jul 28, 2020
1 parent 63c631a commit ea74f6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ To query for the site configuration data you can query from the root.
siteName
wordpressSiteName
siteUrl
inLanguage
companyName
companyOrPerson
companyLogo {
Expand Down
2 changes: 2 additions & 0 deletions wp-graphql-yoast-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ function wp_gql_seo_get_og_image($images)
'siteName' => ['type' => 'String'],
'wordpressSiteName' => ['type' => 'String'],
'siteUrl' => ['type' => 'String'],
'inLanguage' => ['type' => 'String'],
]
]);

Expand Down Expand Up @@ -370,6 +371,7 @@ function wp_gql_seo_get_og_image($images)
'siteName' => wp_gql_seo_format_string(YoastSEO()->helpers->site->get_site_name()),
'wordpressSiteName' => wp_gql_seo_format_string(get_bloginfo('name')),
'siteUrl' => wp_gql_seo_format_string(get_site_url()),
'inLanguage' => wp_gql_seo_format_string(get_bloginfo('language')),
),
'redirects' => array_map($mappedRedirects, $redirects),
'openGraph' => array(
Expand Down

0 comments on commit ea74f6a

Please sign in to comment.