Skip to content

Commit

Permalink
Add new sharing networks to match post-published sharing modal
Browse files Browse the repository at this point in the history
  • Loading branch information
lsl authored and taipeicoder committed Sep 24, 2024
1 parent 664ace7 commit 02c485b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed


Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { __ } from '@wordpress/i18n';

type Network = {
label: string;
networkName: 'x' | 'whatsapp' | 'facebook';
networkName: 'x' | 'whatsapp' | 'facebook' | 'linkedin' | 'tumblr' | 'pinterest' | 'mail';
url: string;
};

Expand All @@ -22,4 +22,24 @@ export const availableNetworks: Array< Network > = [
networkName: 'facebook',
url: 'https://www.facebook.com/sharer/sharer.php?u={{url}}',
},
{
label: __( 'Tumblr', 'jetpack' ),
networkName: 'tumblr',
url: 'https://www.tumblr.com/widgets/share/tool?canonicalUrl={{url}}&title={{text}}',
},
{
label: __( 'LinkedIn', 'jetpack' ),
networkName: 'linkedin',
url: 'https://www.linkedin.com/shareArticle?mini=true&url={{url}}&title={{text}}',
},
{
label: __( 'Pinterest', 'jetpack' ),
networkName: 'pinterest',
url: 'https://pinterest.com/pin/create/button/?url={{url}}&description={{text}}',
},
{
label: __( 'Email', 'jetpack' ),
networkName: 'mail',
url: 'mailto:?subject={{text}}&body={{url}}',
},
];

0 comments on commit 02c485b

Please sign in to comment.