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: WP REST Blocks – Empty editor fix | |
* Plugin URI: https://gist.github.com/lukasbesch/ed9cdd5c7df0eb620b2b9cb48fd7935c | |
* Description: Fixes the empty editor issue with the »WP REST Blocks« plugin on WordPress 5.9+. See https://github.com/spacedmonkey/wp-rest-blocks/issues/31 | |
* Version: 0.1.0 | |
* | |
* @see https://github.com/spacedmonkey/wp-rest-blocks/issues/31 | |
*/ |
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 displaytime { | |
local T=$1 | |
local D=$((T/60/60/24)) | |
local H=$((T/60/60%24)) | |
local M=$((T/60%60)) | |
local S=$((T%60)) | |
(( $D > 0 )) && printf '%3s' $D && printf ' days ' | |
(( $H > 0 )) && printf '%2s' $H && printf ' hours ' | |
(( $M > 0 )) && printf '%2s' $M && printf ' minutes ' | |
if [ $D -lt 1 -a $H -lt 1 ] |
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
/* For usage with acf_form() */ | |
function my_acf_wysiwyg_character_counter() { | |
?> | |
<script type="text/javascript"> | |
acf.add_filter('wysiwyg_tinymce_settings', function(mceInit) { | |
mceInit.elementpath = false; | |
mceInit.setup = function(ed) { | |
var characterLimit = 800, | |
edContainer, |