sudo apt-get update && sudo apt-get upgrade
sudo apt-get install python-software-properties curl
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main'
sudo apt-get update
sudo echo -e "Package: *\nPin: origin ftp.osuosl.org\nPin-Priority: 1000" | tee /etc/apt/preferences.d/mariadb
sudo apt-get install mariadb-server
mysql -uroot -p
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 | |
/** | |
* Send an email each time an order with coupon(s) is completed | |
* | |
* The email contains coupon(s) used during checkout process | |
* | |
* @param int $order_id The ID of the order. | |
*/ | |
function jp_email_order_coupons( $order_id ) { |
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 | |
add_action( 'woocommerce_customer_changed_subscription_to_cancelled', 'customer_skip_pending_cancellation' ); | |
/** | |
* Change 'pending-cancel' status directly to 'cancelled'. | |
* | |
* @param WC_Subscription $subscription | |
*/ | |
function customer_skip_pending_cancellation( $subscription ) { |
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 | |
add_filter( 'mce_css', 'jpry_add_editor_styles' ); | |
/** | |
* Filter the TinyMCE styles. | |
* | |
* @param string $styles The comma-separated list of stylesheets to be loaded by TinyMCE. | |
* | |
* @return string The updated comma-separated list of stylesheets to be loaded by TinyMCE. | |
*/ |
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 | |
// full path to customer log file | |
$log_file = __DIR__.'/../__admin_ajax.log'; | |
// if it's not a POST request, just move along | |
if($_SERVER['REQUEST_METHOD'] != "POST") { | |
return(0); | |
} | |
// if you only want specific files like admin-ajax or xmlrpc, uncomment the next line |
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 | |
/** | |
* WordPress Multisite upgrade script | |
* | |
* IMPORTANT: While a simple safeguard has been added to the script, | |
* you'll want to add another layer that prevents this script from | |
* being called via the browser. | |
* | |
* Usage: | |
* 1) Place in the root of your install (or another place, but modify the wp-load.php path to match) |
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 login link | |
RewriteRule ^login$ http://localhost/whitelabel/wp-login.php [NC,L] |