Theorically bulletproof CSS class for visually hide anything and keep it accessible to ATs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin initialization file | |
* | |
* @package WP_Plugin_MU_Loader | |
* @since 1.0.0 | |
* | |
* @wordpress-plugin | |
* Plugin Name: WP Plugin MU Loader | |
* Plugin URI: https://gist.github.com/felixarntz/daff4006112b60dfea677ca08fc0b31c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// return array of [r,g,b,a] from any valid color. if failed returns undefined | |
function colorValues(color) | |
{ | |
if (!color) | |
return; | |
if (color.toLowerCase() === 'transparent') | |
return [0, 0, 0, 0]; | |
if (color[0] === '#') | |
{ | |
if (color.length < 7) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const randomInterval = (() => { | |
const random = (min, max) => Math.random() * (max - min) + min; | |
return (callback, min, max) => { | |
const time = { | |
start: performance.now(), | |
total: random(min, max) | |
}; | |
const tick = now => { | |
if (time.total <= now - time.start) { | |
time.start = now; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp core language list --field=language | xargs -n 1 wp core language install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('pll_get_post_types', 'wearewp_add_acf_pll', 10, 2); | |
function wearewp_add_acf_pll( $post_types, $is_settings ) { | |
$post_types[] = 'acf-field-group'; | |
return $post_types; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<meta charset="utf-8"> | |
<title>Example</title> | |
<style> | |
div { | |
width: 100px; | |
height: 100px; | |
background: black; | |
animation-duration: .5s; |
Looking for support tables for HTML/CSS/JavaScript features or details on their implementation status in major browsers?
- Chrome Platform Status (covers Chromium and thus includes Opera)
- Firefox Platform Status
- Microsoft Edge Platform Status
- WebKit Feature Status
- API Catalog
And then there’s Can I use…?.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Easy steps for cloning a live WordPress site for local development with MAMP. Am I missing anything? | |
1. add new MAMP server | |
2. download all files | |
3. export MySQL database | |
4. import SQL to MAMP via command line: | |
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -p dbname < ~/Downloads/database.sql | |
5. update: wp-config.php |
NewerOlder