Skip to content

Commit df8238b

Browse files
Add support for Bluesky in the social media options (#922)
Co-authored-by: Evan Herman <[email protected]>
1 parent 84d4bd8 commit df8238b

File tree

8 files changed

+89
-55
lines changed

8 files changed

+89
-55
lines changed
Lines changed: 3 additions & 0 deletions
Loading

.dev/tests/cypress/integration/customizer/customizer.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ describe( 'Test the customizer works as intended.', () => {
3131
github: 'https://www.github.com',
3232
tiktok: 'https://www.tiktok.com',
3333
mastodon: 'https://mastodon.social',
34+
bluesky: 'https://bsky.app/',
3435
};
3536

3637
before( () => {

.dev/tests/php/test-core.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,8 @@ function testGetAvailableSocialIcons() {
10171017
'spotify',
10181018
'github',
10191019
'tiktok',
1020-
'mastodon'
1020+
'mastodon',
1021+
'bluesky',
10211022
];
10221023

10231024
$this->assertEquals( $social_icons, array_keys( Go\Core\get_available_social_icons() ) );

.dev/tests/php/test-customizer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,8 @@ function test_register_social_controls_social_icon_x_setting_and_controls() {
10711071
'youtube',
10721072
'github',
10731073
'tiktok',
1074-
'mastodon'
1074+
'mastodon',
1075+
'bluesky',
10751076
];
10761077

10771078
foreach ( $networks as $social_network ) {

.dev/tests/php/test-template-tags.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,19 @@ public function test_social_icons_mastodon() {
13411341

13421342
}
13431343

1344+
/**
1345+
* Test the post_meta() returns proper data bluesky icon data
1346+
*/
1347+
public function test_social_icons_bluesky() {
1348+
1349+
set_theme_mod( 'social_icon_bluesky', 'https://bsky.app/profile/custom' );
1350+
1351+
$this->expectOutputRegex( '/<a class="social-icons__icon" href="https:\/\/bsky.app\/profile\/custom" aria-label="Open Bluesky in a new tab" rel="noopener noreferrer" target="_blank">/' );
1352+
1353+
Go\social_icons( [] );
1354+
1355+
}
1356+
13441357
/**
13451358
* Test the social icons do not render on header-1
13461359
*/

includes/core.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,11 @@ function get_available_social_icons() {
12621262
'icon' => get_theme_file_path( 'dist/images/social/mastodon.svg' ),
12631263
'placeholder' => 'https://mastodon.social/@user',
12641264
),
1265+
'bluesky' => array(
1266+
'label' => esc_html__( 'Bluesky', 'go' ),
1267+
'icon' => get_theme_file_path( 'dist/images/social/bluesky.svg' ),
1268+
'placeholder' => 'https://bsky.app/profile/user',
1269+
),
12651270
);
12661271

12671272
/**

languages/go.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@
166166
"d3b7c913cd04ebfec0e9ec32cb6fd58c": "GitHub",
167167
"d7a9a3e2a98999afaa77e64983165058": "TikTok",
168168
"675cd6f3e569b77f0bae964e0a8942f2": "Mastodon",
169+
"b86a320e28500179ca4f051bc574520c": "Bluesky",
169170
"e27721c74d54c8f57cc581c680a0143b": "That page can't be found",
170171
"04cc2ca3a963a638a60162312fa1bb72": "Search for: %s",
171172
"795d59a96adcde416d31c5b1b6fae364": "Nothing Found",

0 commit comments

Comments
 (0)