This file contains hidden or 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
| ; This script assumes that Alt and Ctrl characters have been swapped using a third-party tool like PowerTools Keyboard Manager | |
| ; If you're using the Microsoft Windows App for MacOS, disable all of the redirected keyboard shortcuts for this connection. | |
| ; -----KEY GUIDE----- | |
| ; # Win. (the key with the Windows logo) therefore `Send #e` would hold down Win and then press E. | |
| ; + Shift. For example, `Send, +abC` would send the text "AbC", and `Send, !+a` would press Alt+Shift+A. | |
| ; ^ Alt (because of remapkey). For example, `Send, This is text!a` would send the keys "This is text" and then press Alt+A. Note: !A produces a different effect in some programs than !a. This is because !A presses Alt+Shift+A and !a presses Alt+A. If in doubt, use lowercase. | |
| ; ! Ctrl (because of remapkey). For example, `Send, ^!a` would press Ctrl+Alt+A, and Send, ^{Home} would send Ctrl+Home. Note: ^A produces a different effect in some programs than ^a. This is because ^A presses Ctrl+Shift+A and ^a presses Ctrl+A. If in doubt, use lower |
This file contains hidden or 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
| --- | |
| eleventyExcludeFromCollections: true | |
| pagination: | |
| data: collections.versions | |
| size: 1 | |
| alias: page | |
| eleventyComputed: | |
| title: "{{ page.data.title }}" | |
| permalink: "/{{ page.data.version | slugify }}/{{ page.data.title | slugify }}/" | |
| --- |
This file contains hidden or 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
| --- | |
| eleventyExcludeFromCollections: true | |
| pagination: | |
| data: collections.stores | |
| size: 1 | |
| alias: store | |
| eleventyComputed: | |
| title: "{{ store.data.title }} Content Manager config" | |
| permalink: "/stores/{{ store.data.slugOverride | slugify }}/admin/config.yml" | |
| --- |
This file contains hidden or 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
| /** | |
| * "Time Ago" vanilla javascript snippet | |
| * | |
| * Lovingly stolen from StackOverflow here: https://stackoverflow.com/a/37802747 | |
| * | |
| * Convert elements like this: | |
| * <time datetime="Thu May 12 2022 21:05:56 GMT+0000 (Coordinated Universal Time)">May 12th, 2022</time> | |
| * | |
| * To This: | |
| * <time datetime="Thu May 12 2022 21:05:56 GMT+0000 (Coordinated Universal Time)">4 days ago</time> |
This file contains hidden or 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
| ... | |
| postsByTag: function (eleventyConfig) { | |
| let _ = require("lodash"); | |
| eleventyConfig.addCollection("postsByTag", function(collection) { | |
| // Get unique list of tags | |
| let tagSet = new Set(); | |
| collection.getAllSorted().map(function(item) { | |
| if( "tags" in item.data ) { |
This file contains hidden or 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
| eleventyConfig.addNunjucksShortcode("youtube", function (youtubeId, aspectRatio) { | |
| return `<div class="aspect-ratio" style="--aspect-ratio: ${aspectRatio}"><iframe class="youtube-player video video--youtube" src="https://www.youtube.com/embed/${youtubeId}/" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>`; | |
| }); |
This file contains hidden or 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 | |
| /** | |
| * Replace FacetWP default HTML output for "Checkboxes" with Bootstrap custom checkbox markup | |
| */ | |
| add_filter('facetwp_facet_html', function ($output, $params) { | |
| // Check that this facet is a "checkboxes" type facet before proceeding. | |
| if ('checkboxes' == $params['facet']['type']) { | |
| // Initialize variables |
This file contains hidden or 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
| $(".gform_wrapper form").on("submit", function(e){ | |
| $(this).find(".gform_button").attr("disabled", true); | |
| }); |
This file contains hidden or 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 | |
| // Apply product categories to newly created or saved tickets that match the The Events Calendar categories of the associated event | |
| add_action('event_tickets_after_save_ticket', function ($event_id, $ticket, $raw_data, $classname) { | |
| if (! empty($ticket) && isset($ticket->ID)) { | |
| // Apply the "event-tickets" category to add tickets so that all tickets have at least this category to start | |
| wp_add_object_terms($ticket->ID, 'event-tickets', 'product_cat'); | |
| // Get all the other "tribe_events_cat" taxonomy terms on the event |
NewerOlder