Skip to content

Commit

Permalink
Social Icons: update Patreon icon (#56951)
Browse files Browse the repository at this point in the history
* Social Icons: update Patreon icon

Fixes #56925

Patreon's logo is changing: https://news.patreon.com/articles/patreon-reimagined
Our Social Icons logo should change too.

* Add test fixtures for Patreon

* Adjust alignment of the SVG
  • Loading branch information
jeherve committed Jan 30, 2024
1 parent 6a84d8f commit 2b608f9
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 7 deletions.
7 changes: 3 additions & 4 deletions packages/block-library/src/social-link/icons/patreon.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/**
* WordPress dependencies
*/
import { Circle, Rect, SVG } from '@wordpress/primitives';
import { Path, SVG } from '@wordpress/primitives';

export const PatreonIcon = () => (
<SVG width="24" height="24" viewBox="0 0 569 546" version="1.1">
<Circle cx="363" cy="205" r="205" />
<Rect width="100" height="546" x="0" y="0" />
<SVG width="24" height="24" viewBox="0 0 24 24" version="1.1">
<Path d="M20 8.40755C19.9969 6.10922 18.2543 4.22555 16.2097 3.54588C13.6708 2.70188 10.3222 2.82421 7.89775 3.99921C4.95932 5.42355 4.03626 8.54355 4.00186 11.6552C3.97363 14.2136 4.2222 20.9517 7.92225 20.9997C10.6715 21.0356 11.0809 17.3967 12.3529 15.6442C13.258 14.3974 14.4233 14.0452 15.8578 13.6806C18.3233 13.0537 20.0036 11.0551 20 8.40755Z" />
</SVG>
);
2 changes: 1 addition & 1 deletion packages/block-library/src/social-link/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function block_core_social_link_services( $service = '', $field = '' ) {
),
'patreon' => array(
'name' => 'Patreon',
'icon' => '<svg width="24" height="24" viewBox="0 0 569 546" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><circle cx="363" cy="205" r="205" /><rect width="100" height="546" x="0" y="0" /></svg>',
'icon' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M20 8.40755C19.9969 6.10922 18.2543 4.22555 16.2097 3.54588C13.6708 2.70188 10.3222 2.82421 7.89775 3.99921C4.95932 5.42355 4.03626 8.54355 4.00186 11.6552C3.97363 14.2136 4.2222 20.9517 7.92225 20.9997C10.6715 21.0356 11.0809 17.3967 12.3529 15.6442C13.258 14.3974 14.4233 14.0452 15.8578 13.6806C18.3233 13.0537 20.0036 11.0551 20 8.40755Z" /></svg>',
),
'pinterest' => array(
'name' => 'Pinterest',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
}

.wp-social-link-patreon {
background-color: #ff424d;
background-color: #000;
color: #fff;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
}

.wp-social-link-patreon {
color: #ff424d;
color: #000;
}

.wp-social-link-pinterest {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:social-link-patreon {"url":"https://example.com/"} /-->
11 changes: 11 additions & 0 deletions test/integration/fixtures/blocks/core__social-link-patreon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"name": "core/social-link",
"isValid": true,
"attributes": {
"url": "https://example.com/",
"service": "patreon"
},
"innerBlocks": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"blockName": "core/social-link-patreon",
"attrs": {
"url": "https://example.com/"
},
"innerBlocks": [],
"innerHTML": "",
"innerContent": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:social-link {"url":"https://example.com/","service":"patreon"} /-->

0 comments on commit 2b608f9

Please sign in to comment.