From 5122e5cd013b9195c3f21da49edafb8d1cd60124 Mon Sep 17 00:00:00 2001 From: Maud Leray Date: Wed, 5 Jun 2024 12:32:28 +0200 Subject: [PATCH] Change tweet to post (#2296) X made this change since tweets are now called posts. This commit also changes twitter.com to x.com --- assets/src/blocks/ENForm/ShareButtons.js | 2 +- templates/blocks/share_buttons.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/src/blocks/ENForm/ShareButtons.js b/assets/src/blocks/ENForm/ShareButtons.js index 3b6a670ab7..cdc7175667 100644 --- a/assets/src/blocks/ENForm/ShareButtons.js +++ b/assets/src/blocks/ENForm/ShareButtons.js @@ -89,7 +89,7 @@ export const ShareButtons = ({social_params, social_accounts}) => { }; const twitterUrl = (link, title, description, account) => { - return `https://twitter.com/share?url=${encodeURIComponent(link)}` + + return `https://x.com/share?url=${encodeURIComponent(link)}` + `&text=${encodeURIComponent(title)}` + (description ? ` - ${encodeURIComponent(description)}` : '') + (account ? ` via @${encodeURIComponent(account)}&related=${encodeURIComponent(account)}` : ''); diff --git a/templates/blocks/share_buttons.twig b/templates/blocks/share_buttons.twig index 9235733cbe..d35882274c 100644 --- a/templates/blocks/share_buttons.twig +++ b/templates/blocks/share_buttons.twig @@ -55,7 +55,7 @@ {% endif %} {% if all_platforms or share_platforms.twitter %} - {{ 'twitter'|svgicon }}