Improved .visually-hidden
Theorically bulletproof CSS class for visually hide anything and keep it accessible to ATs.
<?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 |
// 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) |
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; |
wp core language list --field=language | xargs -n 1 wp core language install |
<?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; | |
} |
<!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?
And then there’s Can I use…?.
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 |