JavaScript module for a generic toggler. Main element is '.js-toggler
, clicking child element .js-toggler__header
adds and .is-open
class to open the content (control this with CSS). Escape key and outside clicks close the most recently opened item.
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 small = useMediaQuery('900px'); | |
// return ( <h3>{small ? 'Small' : 'Large'}</h3> ); | |
const useMediaQuery = (size, bound = 'max') => { | |
const query = `(${bound}-width: ${size})`; | |
const [matches, setMatches] = useState(window.matchMedia(query).matches); | |
useEffect(() => { | |
const mediaQuery = window.matchMedia(query); |
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
Show hidden characters
{ | |
"bootstrapped": true, | |
"in_process_packages": | |
[ | |
], | |
"installed_packages": | |
[ | |
"AutoWrap", | |
"Color Highlighter", | |
"EditorConfig", |
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
{ | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ofv", | |
"*.ttf", | |
"*.tga", |
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 | |
function d7_add_acf_to_json_api_v2($object, $field_name, $request){ | |
if ( function_exists('get_fields') ) { | |
return get_fields($object['id']); | |
} | |
} | |
if ( is_plugin_active('rest-api/plugin.php') ) { | |
add_filter('rest_api_init', function(){ |
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 | |
/** | |
* @file | |
* Drupal site-specific configuration file. | |
* | |
* IMPORTANT NOTE: | |
* This file may have been set to read-only by the Drupal installation | |
* program. If you make changes to this file, be sure to protect it again | |
* after making your modifications. Failure to remove write permissions |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
apigen generate -s wp-content/themes/mount-baker-theatre/includes -s wp-content/plugins/mount-baker-theatre/includes/ -d docs --todo --deprecated --internal --template-theme=bootstrap --title='Mount Baker Theatre' |
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
/** | |
* Generates markup for the show highlight tile, used on the homepage and | |
* show single pages. | |
* | |
* @uses mbt_show_single_date | |
* @uses mbt_get_acf_image | |
* @uses mbt_get_show_badges | |
* @uses mbt_get_show_venue_link | |
* @uses mbt_get_show_dates | |
* @uses mbt_get_show_presenter |
NewerOlder