Skip to content

Commit

Permalink
Merge pull request #296 from Yoast/207-update-twitter-references-to-x…
Browse files Browse the repository at this point in the history
…-in-developeryoastcom

Rename Twitter to X in documentation
  • Loading branch information
thijsoo committed Apr 16, 2024
2 parents e828116 + d729636 commit f27e4f0
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion docs/customization/apis/metadata-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ By default, Yoast SEO ships with the following presenters that output meta tags.
| `Pinterest_Presenter` | `<meta name="p:domain_verify" content="%s" />` | n/a |
| `Yandex_Presenter` | `<meta name="yandex-verification" content="%s" />` | n/a |

### Twitter presenters
### X presenters
| Presenter | Tag format | Filter |
|---|-----|----|
| `Creator_Presenter` | `<meta name="twitter:creator" content="%s" />` | n/a |
Expand Down
4 changes: 2 additions & 2 deletions docs/customization/apis/rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ The following code is the result of a query to https://yoast.com/wp-json/yoast/v
"https:\/\/www.youtube.com\/yoast",
"https:\/\/www.pinterest.com\/yoast\/",
"https:\/\/en.wikipedia.org\/wiki\/Yoast",
"https:\/\/twitter.com\/yoast"
"https:\/\/x.com\/yoast"
],
"logo":{
"@type":"ImageObject",
Expand Down Expand Up @@ -298,7 +298,7 @@ The following code is the result of a query to https://yoast.com/wp-json/yoast/v
"https:\/\/www.facebook.com\/mariekerakt",
"https:\/\/www.instagram.com\/mgarakt\/",
"https:\/\/www.linkedin.com\/in\/mariekerakt",
"https:\/\/twitter.com\/mariekerakt",
"https:\/\/x.com\/mariekerakt",
"https:\/\/marieke.blog\/",
"https:\/\/profiles.wordpress.org\/mariekerakt\/"
],
Expand Down
12 changes: 6 additions & 6 deletions docs/customization/apis/surfaces-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ The `current_page` surface exposes every bit of data we have on the current page
| open_graph_article_modified_time | string | The article:modified_time value. |
| open_graph_locale | string | The og:locale for the current page. |
| schema | array | The entire Schema array for the current page. |
| twitter_card | string | The Twitter card type for the current page. |
| twitter_title | string | The Twitter card title for the current page. |
| twitter_description | string | The Twitter card description for the current page. |
| twitter_image | string | The Twitter card image for the current page. |
| twitter_creator | string | The Twitter card author for the current page. |
| twitter_site | string | The Twitter card site reference for the current page. |
| twitter_card | string | The X card type for the current page. |
| twitter_title | string | The X card title for the current page. |
| twitter_description | string | The X card description for the current page. |
| twitter_image | string | The X card image for the current page. |
| twitter_creator | string | The X card author for the current page. |
| twitter_site | string | The X card site reference for the current page. |
| source | array | The source object for most of this page data. |
| breadcrumbs | array | The breadcrumbs array for the current page. |
| estimated_reading_time_minutes | int | The estimated reading time in minutes for the content. |
Expand Down
2 changes: 1 addition & 1 deletion docs/customization/yoast-seo/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ to point you to their replacements.
### Filters

#### `wpseo_twitter_taxonomy_image`
You can now always filter the Twitter image on any page, including a taxonomy page through the `wpseo_twitter_image` filter.
You can now always filter the X image on any page, including a taxonomy page through the `wpseo_twitter_image` filter.

#### `wpseo_twitter_metatag_key`
We removed this filter without a replacement. Please add a new meta data presenter per [this documentation](/customization/apis/metadata-api/) if you need to add more values.
Expand Down
2 changes: 1 addition & 1 deletion docs/development/integrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ All pages and content types should output metadata in line with the following st
* [Canonical URL tags](features/seo-tags/canonical-urls/functional-specification.md)
* [Meta robots tags](features/seo-tags/meta-robots/functional-specification.md)
* [Open Graph tags](features/opengraph/functional-specification.md)
* [Twitter tags](features/twitter/functional-specification.md)
* [X tags](features/twitter/functional-specification.md)
* [Alternate content formats](/features/alternate-formats/)

### Structured data
Expand Down
2 changes: 1 addition & 1 deletion docs/features/controls/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ As a site owner, I want to be able to set the following metadata globally.
| Option | Description | Values |
| --- | ----- | --- |
| `og:site_name` | The name of the site for when shared in social platforms | `string` |
| `twitter:site` | The Twitter handle of the Twitter profile associated with the site | `string` |
| `twitter:site` | The X handle of the X profile associated with the site | `string` |
| *Social profiles* | An array of the URLs of social media properties representing the publisher | `array` |
| *Title separator* | The character used to delimit a page's 'name' and brand components in the *title* tag | `char` |

Expand Down
8 changes: 4 additions & 4 deletions docs/features/schema/functional-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The following examples demonstrate how our base script may be extended and alter
"https://www.youtube.com/example/",
"https://www.pinterest.com/example/",
"https://en.wikipedia.org/wikiexample/",
"https://twitter.com/example/"
"https://x.com/example/"
],
"logo": {
"@type": "ImageObject",
Expand Down Expand Up @@ -138,7 +138,7 @@ The following examples demonstrate how our base script may be extended and alter
"https://www.youtube.com/example/",
"https://www.pinterest.com/example/",
"https://en.wikipedia.org/wikiexample/",
"https://twitter.com/example/"
"https://x.com/example/"
],
"logo": {
"@type": "ImageObject",
Expand Down Expand Up @@ -279,7 +279,7 @@ Note that these are actually two separate graph blocks in reality, that are stit
"https://www.youtube.com/example/",
"https://www.pinterest.com/example/",
"https://en.wikipedia.org/wikiexample/",
"https://twitter.com/example/"
"https://x.com/example/"
],
"logo": {
"@type": "ImageObject",
Expand Down Expand Up @@ -507,6 +507,6 @@ To work around this, we merge the `Person` with an `Organization` to create a hy
### 7. Other consumers
At the time of publishing, it appears that Bing does not support this approach; their 'Markup Validator' tool (part of [Bing Webmaster Tools](https://www.bing.com/toolbox/webmaster)) does not detect (and/or parse) markup contained within a `@graph` structure (which forms the backbone of our approach). We're seeking to engage in dialogue with Bing to determine their stance on support.

Social platforms like Facebook, Twitter, Pinterest, etc, have varying levels of support for this markup. Most rely on *Open Graph* markup ('OG tags') and similar, but may use components of schema.org markup when OG tags are missing or invalid.
Social platforms like Facebook, X, Pinterest, etc, have varying levels of support for this markup. Most rely on *Open Graph* markup ('OG tags') and similar, but may use components of schema.org markup when OG tags are missing or invalid.

The support of other search engines (e.g., Baidu, Yandex, others) is unknown; it's our assumption that support will generated be limited, or not exist. We hope that the broad adoption of our approach will encourage these, and other consumers, to expand their support.
2 changes: 1 addition & 1 deletion docs/features/schema/plugins/yoast-seo-shopify.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ When these criteria are met, we produce our [base script](https://developer.yoas
"sameAs": [
"https://www.wikipedia.com/example-organization",
"https://facebook.com/example-organization",
"https://twitter.com/example-organization",
"https://x.com/example-organization",
"https://www.instagram.com/example-organization"
]
},
Expand Down
28 changes: 14 additions & 14 deletions docs/features/twitter/functional-specification.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
---
id: functional-specification
title: "Yoast SEO Twitter Tags: Functional specification"
sidebar_label: Twitter
description: This documentation provides technical information about which twitter tags Yoast SEO generates and outputs.
title: "Yoast SEO X Tags: Functional specification"
sidebar_label: X
description: This documentation provides technical information about which X tags Yoast SEO generates and outputs.

---
This documentation provides technical information about which twitter tags [Yoast SEO](https://yoast.com/wordpress/plugins/seo/) generates and outputs. These tags are only consumed by Twitter.
This documentation provides technical information about which X tags [Yoast SEO](https://yoast.com/wordpress/plugins/seo/) generates and outputs. These tags are only consumed by X.

We output a variety of `<meta>` tags for Twitter in the `<head>` of each page, in order to better inform Twitter about the content of the page in question.
We output a variety of `<meta>` tags for X in the `<head>` of each page, in order to better inform X about the content of the page in question.

Note that for a lot of tags, Twitter falls back on OpenGraph metadata. Where it falls back, we provide the OpenGraph metadata and don't provide the Twitter tag specifically unless it has been customized.
Note that for a lot of tags, X falls back on OpenGraph metadata. Where it falls back, we provide the OpenGraph metadata and don't provide the X tag specifically unless it has been customized.

## Twitter metadata
The following tags provide social networks and platforms (e.g., Facebook, Twitter, Pinterest) with additional information about the page and its content.
## X metadata
The following tags provide social networks and platforms (e.g., Facebook, X, Pinterest) with additional information about the page and its content.

Assuming that the respective admin settings are not disabled, these tags are output on all pages (except for _error_ templates, which are described separately).

| Tag | Description |
|---|----|
| twitter:card | The card type to use when previewing the page (defaulting to `summary_large_image`). |
| twitter:site | The twitter handle of the site owner/operator. |
| twitter:site | The X handle of the site owner/operator. |

## Conditional tags
The following tags are only output when their conditions are met:

| Tag | Description | Notes |
|---|----|---|
| twitter:creator | The twitter handle of the content author. | Only populated when the content author has a valid Twitter handle. <br /> Only populated on `post` types. |
| twitter:title | The title of the page, specifically for sharing on Twitter. | Only populated when a specific value (which is different from the `og:title` value) is defined for Twitter. |
| twitter:description | The description of the page, specifically for sharing on Twitter. | Only populated when a specific value (different from the `og:description` value) is defined for Twitter. <br /> <br /> The hierarchy for this is as follows: <ul><li>A user-defined "Twitter description" value for the page.</li><li>An auto-generated "Social description" from the template in Search Appearance.</li><li>No output, i.e. falls back on `og:description`.</li></ul> |
| twitter:image | The URL of the primary image of the page, specifically for sharing on Twitter. | Only populated when a specific image (different from the `og:image`) is defined for Twitter, or, when Facebook / `og:image` tags are disabled. <br /> <br /> <ul><li>A user-defined “Twitter image” in the Social tab of the Yoast metabox in a `twitter:image` tag</li><li>A user-defined “Facebook image” in the Social tab of the Yoast metabox in an `og:image` tag</li><li>A user-defined “Featured image” for the page (in an `og:image` tag, or in a `twitter:image` tag if Open Graph is disabled)</li><li>A prominent image from the page’s content. (in an `og:image` tag, or in a `twitter:image` tag if Open Graph is disabled)</li><li>Yoast SEO WooCommerce only: Woo SEO adds one more image fallback: the first image in the Woo Product gallery. (in an `og:image` tag, or in a `twitter:image` tag if Open Graph is disabled)</li><li>The “Social default image” from the template in Search Appearance in an `og:image` tag</li><li>The site-wide Social default image from SEO > Social in an `og:image` tag</li><li>No output.</li></ul> In case of an author archive, the image is based on the following hierarchy: <ul><li>The “Social default image” from the template in Search Appearance in an `og:image` tag</li><li>The user’s Gravatar image (in an `og:image` tag, or in a `twitter:image` tag if Open Graph is disabled)</li><li>No output, i.e. falls back to `og:image`.</li></ul> |
| twitter:creator | The X handle of the content author. | Only populated when the content author has a valid X handle. <br /> Only populated on `post` types. |
| twitter:title | The title of the page, specifically for sharing on X. | Only populated when a specific value (which is different from the `og:title` value) is defined for X. |
| twitter:description | The description of the page, specifically for sharing on X. | Only populated when a specific value (different from the `og:description` value) is defined for X. <br /> <br /> The hierarchy for this is as follows: <ul><li>A user-defined "X description" value for the page.</li><li>An auto-generated "Social description" from the template in Search Appearance.</li><li>No output, i.e. falls back on `og:description`.</li></ul> |
| twitter:image | The URL of the primary image of the page, specifically for sharing on X. | Only populated when a specific image (different from the `og:image`) is defined for X, or, when Facebook / `og:image` tags are disabled. <br /> <br /> <ul><li>A user-defined “X image” in the Social tab of the Yoast metabox in a `twitter:image` tag</li><li>A user-defined “Facebook image” in the Social tab of the Yoast metabox in an `og:image` tag</li><li>A user-defined “Featured image” for the page (in an `og:image` tag, or in a `twitter:image` tag if Open Graph is disabled)</li><li>A prominent image from the page’s content. (in an `og:image` tag, or in a `twitter:image` tag if Open Graph is disabled)</li><li>Yoast SEO WooCommerce only: Woo SEO adds one more image fallback: the first image in the Woo Product gallery. (in an `og:image` tag, or in a `twitter:image` tag if Open Graph is disabled)</li><li>The “Social default image” from the template in Search Appearance in an `og:image` tag</li><li>The site-wide Social default image from SEO > Social in an `og:image` tag</li><li>No output.</li></ul> In case of an author archive, the image is based on the following hierarchy: <ul><li>The “Social default image” from the template in Search Appearance in an `og:image` tag</li><li>The user’s Gravatar image (in an `og:image` tag, or in a `twitter:image` tag if Open Graph is disabled)</li><li>No output, i.e. falls back to `og:image`.</li></ul> |

## "Enhanced Slack sharing" tags
We utilize Twitter's "label/data" meta tag format to add additional data, which is shown when sharing URLs on Slack.
We utilize X's "label/data" meta tag format to add additional data, which is shown when sharing URLs on Slack.
Note that this should only be output if the "Enhanced Slack sharing" setting is enabled for the site.

| Tag | Description | Notes |
Expand Down
2 changes: 1 addition & 1 deletion docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Learn how our features work, how to customize the outputs, and how best to integ
- [Canonical URLs](features/seo-tags/canonical-urls/)
- [Meta robots tags](features/seo-tags/meta-robots/overview.md)
- [OpenGraph tags](features/opengraph/)
- [Twitter tags](features/twitter/functional-specification.md)
- [X tags](features/twitter/functional-specification.md)
- [Schema.org markup](features/schema/)
- [Schema pieces](/features/schema/pieces/)
- [Output per plugin](/features/schema/plugins/)
Expand Down

0 comments on commit f27e4f0

Please sign in to comment.