View default.conf
# Directives to send expires headers and turn off 404 error logging. | |
location ~* .(js|css|png|jpg|jpeg|gif|ico|mp3|mov|tif|tiff|swf|txt|html)$ { | |
expires 24h; | |
log_not_found off; | |
try_files $uri $uri/ @production; | |
} | |
location @production { | |
resolver 8.8.8.8; | |
# replace www.livesite.com with the production site URL |
View exclude-list.txt
/vendor/ | |
.gitignore | |
composer.* | |
readme.md | |
/.git/ | |
uploads/ | |
upgrade/ | |
*node_modules* | |
*.gitignore | |
*.gitmodules |
View jw-shortcode-scraper.php
<?php | |
namespace JW\CLI; | |
use WP_CLI; | |
use WP_CLI_Command; | |
/** | |
* A shortcode scraper class. | |
*/ |
View shortcode-scraper.php
<?php | |
namespace JW\CLI; | |
use WP_CLI; | |
use WP_CLI_Command; | |
/** | |
* A shortcode scraper class. | |
*/ |
View resource-pool
# This sets up a resource pool for the user. | |
# By setting up a resource pool you are basically separating server reources between users. | |
# Author: Jay Wood | |
# http://github.com/JayWood | |
[%USER%] | |
prefix = /home/$pool | |
user = %USER% |
View class-admin.php
<?php | |
/** | |
* WooCommerce Order Generator Admin Options Page | |
* | |
* @since NEXT | |
* @package WooCommerce Order Generator | |
*/ | |
/** | |
* WooCommerce Order Generator Admin. |
View finding-registered-post-types.php
function my_registered_type( $post_type ) { | |
if ( 'shop_order' !== $post_type ) { | |
return; | |
} | |
$backtrace = debug_backtrace(); | |
$iterator = count( $backtrace ) - 1; | |
if ( $iterator <= 0 ) { | |
return; |
View jays-fix-serialization.php
<?php | |
/** | |
* Jays Fix Serialization | |
* | |
* Fixes serialization in SQL files after replacements are done. | |
* License: GPL version 3 or later - http://www.gnu.org/licenses/gpl.txt | |
* By: Jay Wood ( jjwood2004@gmail.com ) | |
* http://plugish.com | |
* | |
* Usage: |
View local-delivery.php
<?php | |
function fb_lp_to_local_delivery( $translated_text ) { | |
if ( 'Local Pickup' == $translated_text ) { | |
$translated_text = 'Local Delivery'; | |
} | |
} | |
add_filter( 'gettext', 'fb_lp_to_local_delivery' ); |
View widget-to-cpt.php
<?php | |
/** | |
* Plugin Name: Widget to CPT | |
* Plugin URI: http://plugish.com | |
* Description: A simple how-to for migrating widgets to a CPT | |
* Author: JayWood | |
* Author URI: http://plugish.com | |
* Version: 0.1.0 | |
*/ |
NewerOlder