Skip to content

Commit c500070

Browse files
committed
refactor (Share): replace twitter with x
1 parent 6056d67 commit c500070

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

inc/Helpers/Formatting/Share.php

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ function get_share_link( string $name, string $link_to_share, array $share_attri
5959
'u' => $link_to_share,
6060
],
6161
],
62-
'twitter' => [
62+
'x' => [
6363
'attributes' => [
64-
'title' => __( 'Share on Twitter', 'beapi-frontend-framework' ),
64+
'title' => __( 'Share on X', 'beapi-frontend-framework' ),
6565
'href' => 'https://twitter.com/intent/tweet',
6666
'class' => 'share__link',
6767
],
68-
'icon' => 'social/twitter',
68+
'icon' => 'social/x',
6969
'params' => [
7070
'url' => $link_to_share,
7171
],
@@ -92,17 +92,6 @@ function get_share_link( string $name, string $link_to_share, array $share_attri
9292
'url' => $link_to_share,
9393
],
9494
],
95-
'xing' => [
96-
'attributes' => [
97-
'title' => __( 'Share on Xing', 'beapi-frontend-framework' ),
98-
'href' => 'https://www.xing.com/spi/shares/new',
99-
'class' => 'share__link',
100-
],
101-
'icon' => 'social/xing',
102-
'params' => [
103-
'url' => $link_to_share,
104-
],
105-
],
10695
'email' => [
10796
'attributes' => [
10897
'title' => __( 'Share on Email', 'beapi-frontend-framework' ),
@@ -128,8 +117,8 @@ function get_share_link( string $name, string $link_to_share, array $share_attri
128117
$network['params'] ?? []
129118
);
130119

131-
$network['attributes']['href'] = add_query_arg( $network['params'], $network['attributes']['href'] ?? '' );
132-
$network['attributes']['target'] = '_blank';
120+
$network['attributes']['href'] = add_query_arg( $network['params'], $network['attributes']['href'] ?? '' );
121+
$network['attributes']['target'] = '_blank';
133122

134123
$attributes = wp_parse_args( $attributes, $network['attributes'] );
135124

0 commit comments

Comments
 (0)