Giter VIP home page Giter VIP logo

Comments (4)

helgatheviking avatar helgatheviking commented on September 28, 2024

👍 from me since it was me that opened the original thread at the WP forums.

Here's my modification to the update() method:

/** Accept empty colors */
elseif ( strpos( $key, '_color' ) && '' == trim( $value ) ) {
    $newinstance[$key] = '';
}

/** Validate hex code colors */
elseif ( strpos( $key, '_color' ) && 0 == preg_match( '/^#(([a-fA-F0-9]{3}$)|([a-fA-F0-9]{6}$))/', $value ) ) {
    $newinstance[$key] = $oldinstance[$key];
}

This "works" as is, though as mentioned it is probably a good idea to adjust the CSS output.

from simple-social-icons.

dreamwhisper avatar dreamwhisper commented on September 28, 2024

@nickcernis This works as described.

It is possible to now have transparent icons. I'm not entirely sure there's a use case for that, but if icons aren't showing for someone, they may be transparent. Do we want that here?

from simple-social-icons.

nickcernis avatar nickcernis commented on September 28, 2024

@dreamwhisper Thanks for testing, and I agree — I opened #82 and will address this for 2.1.

from simple-social-icons.

dreamwhisper avatar dreamwhisper commented on September 28, 2024

@nickcernis Thanks! I'll mark this confirmed for the background.

from simple-social-icons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.