Make WordPress Core

Opened 22 months ago

Closed 15 months ago

Last modified 3 months ago

#48713 closed enhancement (fixed)

Twenty Twenty: Social Icons Filter

Reported by: JarretC Owned by: ianbelanger
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.3
Component: Bundled Theme Keywords: has-patch commit has-dev-note dev-feedback
Focuses: Cc:


Over on Github there was a filter set for the social icons where you could add more:


However, I believe this was added after the code freeze so the feature was reverted for a later version. I wasn't able to find a ticket for that feature on Trac here so adding it to make sure it doesn't get lost.

Attachments (1)

48713.diff (2.7 KB) - added by desrosj 15 months ago.

Download all attachments as: .zip

Change History (16)

#1 @nielslange
22 months ago

@acosmin As you created the PR for https://github.com/WordPress/twentytwenty/pull/770 could you create a patch for this issue or shall @JarretC or I do that on your behalf? 😀

#2 follow-up: @acosmin
22 months ago

@nielslange I'll let you do it :) thank you

#3 in reply to: ↑ 2 @nielslange
22 months ago

Replying to acosmin:

@nielslange I'll let you do it :) thank you

Yeah, happy to implement it! 🙌

#4 @ianbelanger
22 months ago

  • Milestone changed from Awaiting Review to 5.3.1
  • Version set to 5.3

#5 @ianbelanger
22 months ago

  • Milestone changed from 5.3.1 to Future Release

#7 @desrosj
16 months ago

  • Keywords needs-dev-note added
  • Milestone changed from Future Release to 5.5

Hi @acosmin,

Are you still interested in patching this? There have been a large handful of requests for different icons to be added, but it has definitely passed into plugin territory.

I would like to get this into the next version of Twenty Twenty, and accompany it with a dev note or equivalent documentation somewhere so that we can close new icon requests as wontfix and direct folks to a way to add their own.

#8 @desrosj
16 months ago

#49034 was marked as a duplicate.

#9 @desrosj
16 months ago

Closed out the following tickets as wontfix in favor of adding a filter instead:

15 months ago

#10 @desrosj
15 months ago

  • Keywords has-patch added; needs-patch removed

48713.diff copies over the filters in the original PR on GitHub linked above.

I removed the second and third parameters for the twentytwenty_svg_icons_social and twentytwenty_svg_icons_{$group} filters, though. They are called in two functions, but have different parameters available. get_social_link_svg() has no color available, and get_svg() has no $uri. This would have resulted in inconsistent data being passed.

I also added a filter for the icon to domain mapping, and the color being used.

#11 @ianbelanger
15 months ago

  • Keywords commit added
  • Owner set to ianbelanger
  • Status changed from new to reviewing

Reviewing for commit.

#12 @ianbelanger
15 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 48180:

Bundled Themes: Twenty Twenty Social Icons Filter.

Adds a Social Icons Filter to Twenty Twenty that allows for new icons to be added to the theme by filter.

Props JarretC, nielslange, acosmin, desrosj.
Fixes #48713.

#13 @SergeyBiryukov
15 months ago

In 48181:

Twenty Twenty: Correct parameter types and @since version for twentytwenty_svg_icon_color filter.

Follow-up to [48180].

See #48713.

#14 @justinahinon
14 months ago

  • Keywords has-dev-note added; needs-dev-note removed

#15 @d3v4n5h
3 months ago

  • Keywords dev-feedback added

Hi. I read the themes field guide, a big thank you for the same. I could not find a similar guide or documentation for this for Twenty Twenty One theme. I had to search and figure out the names of the functions myself. But that's fine. I have this dark icon for Telegram and I am trying to change its colour to white. And I could not find a function to change the colour of the SVG icon. Looks like the --global--color-primary is making it --global--color-dark-gray which is "#28303d" hex code right now. But I'm not really sure, as I'm not a PHP developer. As far as I can tell, there is corresponding filter from Twenty Twenty theme's twentytwenty_svg_icon_color in the Twenty Twenty One theme such as twentytwentyone_svg_icon_color. You can see this on my website https://DVNSH.com as I'll be keeping the testing child theme activated so that you can help me troubleshoot this.

Note: See TracTickets for help on using tickets.