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
function debug_404_rewrite_dump( &$wp ) { | |
global $wp_rewrite; | |
echo '<h2>rewrite rules</h2>'; | |
echo var_export( $wp_rewrite->wp_rewrite_rules(), true ); | |
echo '<h2>permalink structure</h2>'; | |
echo var_export( $wp_rewrite->permalink_structure, true ); |
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
/** | |
* Scroll to top of page when lower nav link is clicked in calendar. | |
*/ | |
import { ready } from '../utils/ready'; | |
function fetchButtons() { | |
return document.querySelectorAll( | |
'.tribe-events-c-nav__list-item > a, .tribe-events-c-nav__list-item > button' | |
); | |
} |
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
// Credit: https://www.w3resource.com/javascript-exercises/javascript-basic-exercise-9.php | |
today = new Date(); | |
let cmas = new Date(today.getFullYear(), 11, 25); | |
if (today.getMonth() == 11 && today.getDate() > 25) { | |
cmas.setFullYear(cmas.getFullYear() + 1); | |
} | |
let one_day = 1000 * 60 * 60 * 24; | |
console.log(Math.ceil((cmas.getTime() - today.getTime()) / (one_day)) + " days left until Christmas!"); |
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> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
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
// Rest of code can be found on: | |
// https://codepen.io/Moiety/pen/LaPvWy | |
// | |
// Reworked Check function | |
checkBoundingBox() { | |
let bounds = this.tooltip.getBoundingClientRect() | |
this.moveTooltipHorizontally(bounds) | |
this.moveTooltipVertically(bounds) | |
} |