bobbingwide / oik

OIK Information Kit
https://www.oik-plugins.com/oik-plugins/oik
GNU General Public License v2.0
2 stars 0 forks source link

Change bw_follow_me to support `font=svg` to replace `font=dashicons` or `font=genericons` #187

Closed bobbingwide closed 2 years ago

bobbingwide commented 3 years ago

Google's Page Speed insights, aka Lighthouse, complains about using genericons.css because so little of the CSS is used. Investigate changing [bw_follow_me] to use font=svg. See bw_post() and bw_dash() in oik-bob-bing-wide for ideas.

bobbingwide commented 3 years ago

Couple of other things:

  1. Remove the texticon logic for LinkedIn dashicon. It seems to work now.
  2. Change the [github] shortcode to use the GitHub SVG icon instead of the dashicon.
  3. Find the best way to use the functions that were originally implemented in oik-bob-bing-wide.
bobbingwide commented 3 years ago

Change the [github] shortcode to use the GitHub SVG icon instead of the dashicon.

This shortcode's part of oik-bob-bing-wide

bobbingwide commented 3 years ago

Find the best way to use the functions that were originally implemented in oik-bob-bing-wide.

Implement as a shared library class OIK_SVG_icons in libs/class-oik-svg-icons.php

bobbingwide commented 3 years ago

Update the logic so that [bw_twitter @something] or [bw_twitter #something] defaults to using theme=svg. Also support displaying the target parameter when the value for theme is not dash, gener or svg. ie. for the icon.

bobbingwide commented 2 years ago

I've added the SVG option to the Theme drop down for the Follow me block but when it's set to SVG and you go away and come back to the block the value reverts to None. Why's that?

bobbingwide commented 2 years ago

When [bw_follow_me] is used with theme=svg for SVG icons the inline CSS is only enqueued when the [bw_post] or [bw_page] shortcode has also been used.
The logic for [bw_follow_me] doesn't call bw_dash() so bw_dash_inline_style_svg() isn't run.

Proposed solution

copy bw_dash_inline_style_svg() to OIK_SVG_icons::inline_style_svg()

bobbingwide commented 2 years ago

Fixed in 4.8.0, released in 4.8.1