#wordpress 2020-12-14

2020-12-14 UTC
[tantek], [prtksxna], [chrisaldrich], gRegorLove_, Loqi and Oclair joined the channel
#
beko
Oooh, Syndication Links 4.3.1 having syn_link_name and pre_syn_link_ico. This probably scratches an itch I've for a long time already. Will check out later xD
[tantek], [KevinMarks], [Ana_Rodrigues], [jgarber], [jgmac1106], [snarfed] and [chrisaldrich] joined the channel
#
beko
GWG: Can't seem to find apply_filter for syn_link_name in Syndication Links. Did I understand this wrong?
#
GWG
Excuse me, should be title
#
beko
Ah, got it. Thanks :)
#
GWG
I will fix the documentation
#
beko
Hm.. there's a bug in get_icon_svg() where you return null when filter pre_syn_link_icon is applied GWG
#
beko
should probably be `return $icon`;
#
beko
That's awesome :D Now I've Mastodon _and_ Okuna Icons
#
beko
GWG++
#
Loqi
GWG has 33 karma in this channel over the last year (148 in all channels)
#
GWG
I shouldn't be returning null
#
GWG
Only if something is hooked onto the filter should it return, otherwise it runs the regular function
#
beko
it says if ($icon) { return };. So when I override it I get undefined/null.
#
beko
line is 52 in class-syn-link-domain-icon-map.php
#
beko
this results in icon not printed in get_icon().
ben_thatmustbeme joined the channel
#
beko
I changed it locally as it's done in line 59, provide a SVG on the filter and icon shows up as expected.
#
GWG
Oh...the return part...I see the mistake
#
beko
👍
#
beko
If I see this correctly I could also return   as string and do it all in CSS since I'll gain an "svg-icon svg-$title" class in the DOM this way. I've now a hardcoded SVG (inline). That feels wrong especially since I have the same svg in my h-card too.
reed_ and ben_thatmustbeme joined the channel
#
GWG
Inline svg has its advantages for caching
[jgmac1106], [barryf], [tantek], [jeremycherfas], [schmarty] and benterry joined the channel