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(e,t){"use strict";function n(e){var t=e.length,n=K.type(e);return!K.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)))}function r(e,n,r,i){if(K.acceptData(e)){var a,o,s=K.expando,u="string"==typeof n,l=e.nodeType,c=l?K.cache:e,d=l?e[s]:e[s]&&s;if(d&&c[d]&&(i||c[d].data)||!u||r!==t)return d||(l?e[s]=d=$.pop()||K.guid++:d=s),c[d]||(c[d]={},l||(c[d].toJSON=K.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[d]=K.extend(c[d],n):c[d].data=K.extend(c[d].data,n)),a=c[d],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[K.camelCase(n)]=r),u?(o=a[n],null==o&&(o=a[K.camelCase(n)])):o=a,o}}function i(e,t,n){if(K.acceptData(e)){var r,i,a,s=e.nodeType,u=s?K.cache:e,l=s?e[K.expando]:K.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){K.isArray(t)?t=t.concat(K.map(t,K.camelCase)):t in r?t=[t]:t=(t=K.camelCase(t))in r?[t]:t.split(" ");for(i=0,a=t.length;a>i;i++)delete r[t[i]];if(!(n?o:K.isEmptyObject)(r))return}(n||(delete u[l].data,o(u[l])))&&(s?K.cleanData([ |
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
<Directory /var/www/html/> | |
<IfModule mod_mime.c> | |
AddType application/x-javascript .js | |
AddType text/css .css | |
</IfModule> | |
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/plain text/xml application/javascript | |
<IfModule mod_setenvif.c> | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4.0[678] no-gzip |
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
# Enable Compression | |
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf | |
AddOutputFilterByType DEFLATE application/x-font-truetype | |
AddOutputFilterByType DEFLATE application/x-font-ttf |
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
# Thank you to this gist for some edits (check history! lol) https://gist.github.com/Zodiac1978/3145830 | |
# Leverage Browser Caching | |
# Fonts | |
# Add correct content-type for fonts | |
AddType application/vnd.ms-fontobject .eot | |
AddType application/x-font-ttf .ttf | |
AddType application/x-font-opentype .otf | |
AddType application/x-font-woff .woff | |
AddType image/svg+xml .svg |
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
echo "<pre>"; print_r( get_defined_functions() ); |
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
// Checks if on mobile device | |
// Changes link to go to Google Maps | |
// Which should open automatically in Apple or Google Maps on Android/iOS device ~mj | |
function mobileMapClicker() { | |
console.log(navigator.userAgent); | |
// Checks userAgent if mobile device | |
if (/Mobi/.test(navigator.userAgent)) { | |
console.log('Mobile Device Detected!'); | |
/* if we're on iOS, open in Apple Maps */ |
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 | |
// Put this in your functions.php file | |
// Changes wp-login.php page title | |
// Here I'm removing the default "WordPress" at the end of it ~mj | |
function custom_login_title( $login_title ) { | |
return str_replace(array( ' ‹', ' — WordPress'), array( ' ‹', ''),$login_title ); | |
} | |
add_filter( 'login_title', 'custom_login_title' ); |
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
// thank you https://ariasthompson.com/2018/02/08/adding-instagram-feed-website-without-plugin/ | |
// for the basis of this feed grab | |
var getInstagramFeed = function () { | |
var request = new XMLHttpRequest(); | |
var token = 'ACCESS_TOKEN'; | |
var count = 3; | |
request.open('GET', 'https://api.instagram.com/v1/users/self/media/recent/?access_token='+token+'&count='+count, true); | |
request.onload = function(container) { |
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 the JS file that needs theme images | |
// append rest of directory | |
// could add multiple variables if wanted inside array | |
// ~mj | |
wp_localize_script( | |
'main', // $handle | |
'WPURLS', | |
array( | |
'siteurl' => print_dir('images') // instead of custom function print_dir(), you can put the path of your images directory |
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
RENAME table `wp_commentmeta` TO `wp_localapi_commentmeta`; | |
RENAME table `wp_comments` TO `wp_localapi_comments`; | |
RENAME table `wp_links` TO `wp_localapi_links`; | |
RENAME table `wp_options` TO `wp_localapi_options`; | |
RENAME table `wp_postmeta` TO `wp_localapi_postmeta`; | |
RENAME table `wp_posts` TO `wp_localapi_posts`; | |
RENAME table `wp_terms` TO `wp_localapi_terms`; | |
RENAME table `wp_termmeta` TO `wp_localapi_termmeta`; | |
RENAME table `wp_term_relationships` TO `wp_localapi_term_relationships`; | |
RENAME table `wp_term_taxonomy` TO `wp_localapi_term_taxonomy`; |