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
//Add to functions.php in your WordPress theme file | |
function jquery_from_cdn() { | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', 'https://code.jquery.com/jquery-3.3.1.min.js', false, '3.3.1'); | |
wp_enqueue_script('jquery'); | |
} | |
add_action('init', 'jquery_from_cdn'); |
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
<pre><?php | |
// WordPress - Delete all revisions from all posts greater than 1 year old. | |
// Credit to @mrazzari, 2014. | |
// For context see this thread started by Kitchin at the forums: | |
// http://wordpress.org/support/topic/deleting-post-revisions-do-not-use-the-abc-join-code-you-see-everywhere | |
// HOWTO | |
// This snippet is meant to be called as a standalone script. | |
// Like http://example.com/tmp/wp_delete_revisions.php |
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
@media only screen and (max-width: 480px), only screen and (max-device-width: 480px), only screen and (max-device-height:480px){ | |
.mktoForm,.mktoForm *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-moz-box-sizing:border-box;padding:auto} | |
/* Yes, I know padding:auto isn't a real property - had to break things somehow :( */ | |
.mktoLabel.mktoHasWidth {height: inherit !important;} | |
.mktoForm .mktoGutter,.mktoForm .mktoOffset{display:initial !important} | |
.mktoForm .mktoFormCol .mktoLabel{text-align:left;width:initial !important} | |
.mktoForm .mktoFormCol{float:initial !important} | |
.mktoForm .mktoFieldWrap{float:initial !important} | |
.mktoForm fieldset{padding:initial !important} | |
.mktoForm input[type=url],.mktoForm input[type=text],.mktoForm input[type=date],.mktoForm input[type=tel],.mktoForm input[type=email],.mktoForm input[type=number],.mktoForm textarea.mktoField,.mktoForm select.mktoField{width:100% !important;height:initial !important;line-height:initial !important;font-size:initial !i |
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
$title = str_replace(' ', '', get_the_title()); | |
$title = str_replace('-', '', $title); | |
$permalink = get_the_permalink(); | |
// Set the path to save the data to | |
$cachePath = ABSPATH.'path/to/folder/'.$title.'.txt'; | |
// See if data already exists | |
$getData = file_get_contents($cachePath); | |
$response = json_decode($getData, true); |
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 = "My variable data"; | |
$output = "<script>console.log( 'Debug Objects: " . $data . "' );</script>"; | |
echo $output; |
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
error_reporting(E_ALL); | |
ini_set('display_errors', '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
/* Custom margin & padding styles */ | |
.mr0 { | |
margin-right: 0 !important | |
} | |
.ml0 { | |
margin-left: 0 !important | |
} |
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
/* iPhone 6 landscape */ | |
@media only screen and (min-device-width: 375px) | |
and (max-device-width: 667px) | |
and (orientation: landscape) | |
and (-webkit-min-device-pixel-ratio: 2) | |
{ } | |
/* iPhone 6 portrait */ | |
@media only screen | |
and (min-device-width: 375px) |
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
/* | |
This is a shim that matches the Google Feed API into Superfeedr's feed API. | |
See blog.superfeedr.com/google-feed-api-alternative/ for details. | |
*/ | |
window.google = { | |
feeds: { | |
Feed: { |
NewerOlder