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
/** | |
* Filter heading block levels | |
* Gutenberg 19.0+, see https://github.com/WordPress/gutenberg/pull/63535. | |
*/ | |
function example_modify_heading_levels_globally( $args, $block_type ) { | |
if ( 'core/heading' !== $block_type ) { | |
return $args; | |
} | |
// Remove H1. |
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
/** | |
* Migrate media to Azure. | |
* | |
* Updates existing attachment posts to have the necessary metadata so that the Azure plugin can pick them up. | |
* Runs over blocks of 300 media items at a time. | |
* | |
* @package TMA | |
*/ | |
function azure_db_migrate() { |
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-uploads.php | |
* This replaces all accents from your uploads | |
* you can run this with wp-cli: $ php wp-cli.phar eval-file rename-uploads.php | |
* | |
* You may need to run the outputted move commands in order to update the filenames. | |
*/ | |
if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) { |
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
-- Function ("prepared statement") for MySQL, equivalent to PHPs ucwords -- | |
-- base off: https://brianloomis.wordpress.com/2009/10/15/working-with-titlecase-in-mysql/ | |
DROP FUNCTION IF EXISTS proper; | |
SET GLOBAL log_bin_trust_function_creators=TRUE; | |
DELIMITER | | |
CREATE FUNCTION proper( str VARCHAR(128) ) | |
RETURNS VARCHAR(128) | |
BEGIN | |
DECLARE c CHAR(1); |
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
<head> | |
<style> | |
html, | |
body { | |
height: 100%; | |
} | |
body { | |
background: #333; | |
padding: 20px; |
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
/* | |
* From: | |
* https://medium.com/pixel-and-ink/avoiding-jagged-edges-on-gradients-f485cc7401f5 | |
*/ | |
background: linear-gradient(176deg, white, white 75%, black calc(75% + 1px), black 100%); |
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
// Based off: | |
// https://css-tricks.com/snippets/css/shake-css-keyframe-animation/ | |
.shake:hover { | |
animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both; | |
transform: translate3d(0, 0, 0); | |
backface-visibility: hidden; | |
perspective: 1000px; | |
} |
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
.bg-clip { | |
// Make it pretty /////////////////// | |
font-size: 30rem; | |
font-weight: 900; | |
text-transform: uppercase; | |
text-align: center; | |
// The clipping ///////////////////// | |
// Fallback colour | |
color: #000; |
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
// Browser hacks. | |
// ...So MS browser specific styles basically. | |
// IE10 + 11 | |
// @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | |
// IE 10 + 11 | |
html[data-useragent*='MSIE 10'], | |
html[data-useragent*='Trident'][data-useragent*='rv:11.0'] { | |
.star-rating-static { | |
width: auto !important; |
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
// From: https://codepen.io/GeorgePark/pen/EEGJEj | |
.gradient-border { | |
flex-shrink: 0; | |
margin: 20px; | |
height: calc(150px + 6vw); | |
width: calc(150px + 6vw); | |
border: calc(8px + 0.2vw) solid transparent; | |
background-origin: border-box; | |
background-clip: content-box, border-box; |
NewerOlder