Comments (4)
👍 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.
@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.
@dreamwhisper Thanks for testing, and I agree — I opened #82 and will address this for 2.1.
from simple-social-icons.
@nickcernis Thanks! I'll mark this confirmed for the background.
from simple-social-icons.
Related Issues (20)
- Equal identifiers when widget is used multiple times on one page HOT 4
- Obfuscate email address when entered with mailto prefix
- Consider adding rel=noopener if links are opened in a new window HOT 2
- Multiple instances of the widget on the same page breaks styling HOT 2
- Limit transparent colors to icon background only HOT 7
- Add ability to set per widget area defaults HOT 3
- Consider dropping Google+ icon HOT 1
- Invalid css output on transparent background HOT 6
- CSS output is within body tags / Validation error
- Themes should be able to set SSI default styles via a config file
- Fix AMP validation error for svgxuse.js HOT 2
- Only enqueue scripts/styles if a widget is actually on the page
- GitHub Icon is outdated HOT 1
- Add alt attribute to svg tag in HTML HOT 1
- Warning: sprintf(): Too few arguments in simple-social-icons.php on line 458 HOT 1
- Warning: sprintf(): Too few arguments in simple-social-icons.php on line 458
- Add TikTok to Default Settings HOT 14
- Add Patreon
- Add Mastodon and Bluesky HOT 1
- Add Flipboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple-social-icons.