This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does β either from the creator's website or your own thoughts.
β Erik
//does not work with colors containing alpha | |
@function encodecolor($string) { | |
@if type-of($string) == 'color' { | |
$hex: str-slice(ie-hex-str($string), 4); | |
$string:unquote("#{$hex}"); | |
} | |
$string: '%23' + $string; | |
@return $string; | |
} |
I have made this function using the WP_Image_Editor class and I have filtered through the "wp_generate_attachment_metadata" hook. You can modify the "theme" namespace into function names with your theme name or in anyway you like.
Applying the filter directly to wp_generate_attachment_metadata the image placeholders are auto added into WordPress metadata, so when your add/modify/delete an image (or regenerate it via a plugin), it accomplishes to modify also to the image placeholders.
The use of the native theme support can prevent the generation of lqip or target specific image sizes to generate.
It contains an hook filter lqip_quality to modify the quality without have to modify the function.
<?php | |
/** | |
* Plugin Name: Dev Plugins | |
*/ | |
add_action( 'muplugins_loaded', function() { | |
// Plugins to activate automatically. | |
$auto_activate = [ | |
'debug-bar/debug-bar.php', | |
'debug-bar-extender/debug-bar-extender.php', |