Skip to content

Commit

Permalink
Change tweet to post (#2296)
Browse files Browse the repository at this point in the history
X made this change since tweets are now called posts. This commit also changes twitter.com to x.com
  • Loading branch information
mleray committed Jun 5, 2024
1 parent b0713ab commit 5122e5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/src/blocks/ENForm/ShareButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)}` : '');
Expand Down
2 changes: 1 addition & 1 deletion templates/blocks/share_buttons.twig
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
{% endif %}
<!-- Twitter -->
{% if all_platforms or share_platforms.twitter %}
<a href="https://twitter.com/intent/tweet?related={{ social_accounts.twitter }}&text={{ social.title|url_encode }}{% if share_text or social.description %} - {{ (share_text ?? social.description)|striptags|url_encode }}{% endif %}, via @{{ social_accounts.twitter }}&url={{ (socialLink ~ '&utm_source=twitter')|url_encode }}"
<a href="https://x.com/intent/post?related={{ social_accounts.twitter }}&text={{ social.title|url_encode }}{% if share_text or social.description %} - {{ (share_text ?? social.description)|striptags|url_encode }}{% endif %}, via @{{ social_accounts.twitter }}&url={{ (socialLink ~ '&utm_source=twitter')|url_encode }}"
onclick="dataLayerPush('Twitter');"
target="_blank" class="share-btn twitter">
{{ 'twitter'|svgicon }}
Expand Down

0 comments on commit 5122e5c

Please sign in to comment.