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
What we see before us is just one tiny part of the world. We get into the habit of thinking, this is the world, but that's not true at all. The real world is a much darker and deeper place than this, and much of it is occupied by jellyfish and things. -- Haruki Murakami |
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 snapshotDiv(snapdiv, snapdest, scale) { | |
// requires html2canvas | |
var spinnerDiv = document.createElement("div"); | |
var spinner = document.body.appendChild(spinnerDiv); | |
$('#snapControl').hide(); | |
$(snapdiv + ' .gm-bundled-control').hide(); | |
$('#hideGoogleUICB').trigger('submit'); | |
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
/* Move yoast meta box to bottom of pages */ | |
add_filter( 'wpseo_metabox_prio', function() { return 'low'; } ); |
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
//https://support.theeventscalendar.com/178892-Change-the-wording-of-any-bit-of-text-or-string | |
function tribe_custom_theme_text ( $translation, $text, $domain ) { | |
// Put your custom text here in a key => value pair | |
// Example: 'Text you want to change' => 'This is what it will be changed to' | |
// The text you want to change is the key, and it is case-sensitive | |
// The text you want to change it to is the value | |
// You can freely add or remove key => values, but make sure to separate them with a comma | |
// This example changes the label "Venue" to "Location", and "Related Events" to "Similar Events" | |
$custom_text = array( |
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
add_shortcode( 'gutenberg_test', 'send_request' ); // for testing | |
function send_request() { | |
trace('GB test underway'); | |
$value=rand(10,100); | |
return 'I ran'; | |
} | |
//* add a trace file | |
$upload_dir = wp_upload_dir(); |
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
// https://deluxeblogtips.com/remove-dashboard-widgets-in-wordpress/ | |
add_action('admin_init', 'rw_remove_dashboard_widgets'); | |
function rw_remove_dashboard_widgets() { | |
remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); // right now | |
remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // recent comments | |
remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // incoming links | |
remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // plugins | |
remove_meta_box('dashboard_quick_press', 'dashboard', 'normal'); // quick press | |
remove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal'); // recent drafts |
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 showLocation(position) { | |
window.location.href ="http://YOURDOMAINHERE/events/map/?action=tribe_list&tribe_paged=1&tribe-bar-geoloc-lat="+ position.coords.latitude +"&tribe-bar-geoloc-lng="+ position.coords.longitude; | |
} | |
function errorHandler(err) { | |
if(err.code == 1) { | |
alert("Error: Access is denied!"); | |
}else if( err.code == 2) { | |
alert("Error: Position is unavailable!"); | |
} |
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
#table-container { | |
overflow-y: scroll; | |
height: 100vh; /* or whatever */ | |
} | |
#table th { | |
position: sticky; | |
position: -webkit-sticky; /* for Safari */ | |
top: 0; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" type="text/javascript"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.js" type="text/javascript"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js" type="text/javascript"></script> | |
<script src="html2canvas.min.js" type="text/javascript"></script> | |
<style> | |
/* Set the size of the div element that contains the map */ |
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 convertasbinaryimage() { | |
html2canvas(document.getElementById("map"), { | |
useCORS: true, | |
onrendered: function (canvas) { | |
var img = canvas.toDataURL("image/png"); | |
img = img.replace('data:image/png;base64,', ''); | |
var finalImageSrc = 'data:image/png;base64,' + img; | |
$('#googlemapbinary').attr('src', finalImageSrc); | |
} | |
}); |