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
// Get list of text in items for copy-pasting (where each item is in class ".thing") | |
console.log(Array.from(document.querySelectorAll('.thing')).map(t=>t.innerText).join("\n")); | |
// Get multiple strings into a table from a single element | |
console.table(Array.from(document.querySelectorAll('.thing')).map(t=>[p.getAttribute('title'),p.textContent])); |
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
/** | |
* Accessibility fixes for frontend Advanced Custom Fields forms | |
* v1.0.0 | |
* Mark Root-Wiley, MRW Web Design (https://MRWweb.com) | |
* | |
* Fixes 3 issues: | |
* | |
* 1. Replace required asterisk with spelled-out label | |
* 2. Explicitly associate checkbox labels with their inputs using a for and id attribute | |
* 3. Use fieldset and legend to wrap checkbox and group fields |
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
/** | |
* Converts milliseconds to formatted time or seconds. | |
* @param int [$ms] The length of the media asset in milliseconds | |
* @param bool [$seconds] Whether to return only seconds | |
* @return mixed The formatted length or total seconds of the media asset | |
*/ | |
function convertTime($ms, $seconds = false) | |
{ | |
$total_seconds = ($ms / 1000); |
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 | |
/** | |
* The Community Events plugin offers a "Single Geography" mode but no way | |
* to specify the default State and Country to use for venues created when | |
* it's enabled. | |
* | |
* Note: Events Calendar PRO allows specifying a default State and Country | |
* but that shouldn't be required to use Community Events! | |
*/ | |
namespace SiteName\CommunityEvents; |
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
@font-face { font-family: 'helvetica neue'; src: local('Segoe UI'); } | |
@font-face { font-family: 'helvetica neue'; font-weight:bold; src: local('Segoe UI Bold'); } | |
@font-face { font-family: 'helvetica neue'; font-weight:bold; src: local('Segoe UI Bold'); } | |
@font-face { font-family: 'helvetica neue'; font-style: italic; src: local('Segoe UI Italic'); } | |
@font-face { font-family: 'helvetica neue'; font-style: italic; font-weight:bold; src: local('Segoe UI Bold Italic'); } | |
@font-face { font-family: 'helvetica'; src: local('Segoe UI'); } | |
@font-face { font-family: 'helvetica'; font-weight:bold; src: local('Segoe UI Bold'); } | |
@font-face { font-family: 'helvetica'; font-style: italic; src: local('Segoe UI Italic'); } | |
@font-face { font-family: 'helvetica'; font-style: italic; font-weight:bold; src: local('Segoe UI Bold Italic'); } | |
@font-face { font-family: 'HelveticaNeue-Light'; src: local('Segoe UI Light'); } |
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-block-variation-hello-world { | |
display: flex; | |
background: #6fbcac; | |
padding: 0 !important; | |
} | |
.wp-block-variation-hello-world .wp-block-group__inner-container { | |
display: flex; | |
gap: 1em; | |
} |
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 Name: Fix Divi Toggle Module Accessibility | |
* Description: Uses JavaScript to insert button in toggle heading, remove tabindex from container, and correctly toggle aria-expanded on toggle button trigger. ⚠ WARNING: This only works for the Toggle module and *BREAKS* the Accordion module (really, it just breaks it more than it was already broken). Therefore, you are encouraged to entirely remove the Accordion module from the site (and the ability for anyone to use it) and only use Toggle modules. | |
* Author: Mark Root-Wiley, MRW Web Design | |
* Author URI: https://MRWweb.com | |
* Version: 1.2.1 | |
*/ | |
namespace MRW\DiviAccordionAria; |
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
/** | |
* faux-block-editor.css v1.1 | |
* | |
* Styles to make the Classic Editor screen appear more like the Block Editor | |
* | |
* Expects the class "faux-block-editor" on any screen that should use these styles | |
*/ | |
.faux-block-editor { | |
overflow-x: hidden; |
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() { | |
const questions = document.querySelectorAll( '.question-container' ); | |
let result = ''; | |
questions.forEach( ( q ) => { | |
let answerText = ''; | |
let question = q.querySelector( '.question-title-container' ).innerText.replace( '* ', '' ); | |
let answer = q.querySelector( 'label.checked' ); | |
if ( null === answer ) { | |
answer = q.querySelector( 'textarea' ); | |
} |
NewerOlder