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
/// Simple fade-in/out animation | |
/// @param {String} $type - "show" or "hide", defaults to "show" | |
/// @param {Number} $delay - Animation delay in seconds | |
/// @param {Number} $duration - Animation duration in seconds | |
/// @param {String} $timing-function - Animation timing function, defaults to "ease-in" | |
@mixin fade( | |
$type: "show", | |
$delay: 0s, | |
$duration: 0.5s, | |
$timing-function: ease-in, |
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 | |
/** | |
* Get an SVG file from the imgs/ folder in the theme, update its attributes if necessary and return it as a string. | |
* | |
* @author Aurooba Ahmed | |
* @see https://aurooba.com/inline-svgs-in-your-wordpress-code-with-this-helper-function/ | |
* | |
* @param string $filename The name of the SVG file to get. | |
* @param array $attributes (optional) An array of attributes to add/modify to the SVG file. |
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
var domReady = (callback) => { | |
if (document.readyState != "loading") callback(); | |
else document.addEventListener("DOMContentLoaded", callback); | |
}; | |
// usage | |
domReady(() => { | |
// Do things after DOM has loaded completely | |
}); |
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
/* plain JS slideToggle with display option, untested. for tested version, use the gist below */ | |
HTMLElement.prototype.slideToggle = function ( | |
duration, | |
display = "block", | |
callback, | |
) { | |
if (this.clientHeight === 0) { | |
_vanilla_slide_effect(this, duration, display, callback, true); | |
} else { |
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
import { addFilter } from '@wordpress/hooks'; | |
import { select } from '@wordpress/data'; | |
/** | |
* Disable text color controls on Heading blocks | |
* when placed inside of Media & Text blocks. | |
*/ | |
addFilter( | |
'blockEditor.useSetting.before', | |
'myPlugin/useSetting.before', |
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
[data-type="yourblock/block"] { | |
.block-list-appender { | |
button.block-list-appender__toggle { | |
width: auto; | |
height: auto; | |
padding: 0.5rem !important; | |
&:after { | |
content: attr(aria-label); | |
} | |
} |
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
/* After switching stackingthebricks.com to ConvertKit in the last few months, I found a handful of things */ | |
/* that seemed to slow me down/force additional scrolling, so I tried hiding them from the UI with these UserStyles */ | |
/* Obviously, these are without warrantee and could potentially break, so don't blame me if they do. */ | |
/* Also, I am not a designer so these may not make the UI better in _your_ eyes, but they make it better for me. 😅 */ | |
/* Hide the dashboard graph (not useful enough to be there taking up 3/4 of the screen real estate every time I log in) */ | |
.subscribers-index div[data-component='ReportsContainer'] { | |
min-height: 100px !important; | |
background: transparent; |
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: Convert ACF PHP to JSON | |
* Description: Convert Advanced Custom Fields Pro configuration from PHP to JSON. | |
* Author: Ollie Treend | |
* Author URI: https://gist.github.com/ollietreend/df32c5cbe2914f6fc407332bf6cbfca5 | |
*/ | |
namespace ConvertAcfPhpToJson; |
NewerOlder