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
const path = require('path') | |
export default function plugins(_moduleOptions) { | |
this.nuxt.hook('build:templates', ({ templateVars }) => { | |
templateVars.middleware.push({ | |
name: 'authenticated', | |
src: path.resolve(__dirname, 'middleware/authenticated.js'), | |
fileName: path.join('authenticated.js'), |
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_action( 'wp_head', function() { | |
?> | |
<link rel="preload" href="" as="font" type="font/woff2" /> | |
<?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
$exception->getResponse()->getBody()->getContents(); |
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
Woocommerce Subscription WP CLI Cheatsheet | |
Reviews | |
Enable Reviews on all | |
wp db query 'UPDATE wp_posts SET comment_status="open" WHERE post_type="product" AND comment_status="closed"' | |
Query disabled reviews | |
wp db query 'SELECT ID FROM wp_posts WHERE post_type="product" AND comment_status="closed" AND post_status="publish"' |
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
*.site.com/*&preview=true | |
*.site.com/wp-login.php* | |
*.site.com/wp-admin* |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTPS} =on | |
RewriteCond %{HTTP_HOST} ^benjaminheller.net | |
# Start WPFC Exclude | |
# End WPFC Exclude | |
# Start_WPFC_Exclude_Admin_Cookie | |
RewriteCond %{HTTP:Cookie} !wordpress_logged_in_[^\=]+\=benheller |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |