(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// just pass in the attribute and the attribute slug | |
// and the return value is the attribute's name | |
// example : (assuming attribute size has the option of "Extra Small" withe the slug of "extra-small") | |
// echo attribute_slug_to_title('attribute_pa_size', 'extra-small'); | |
// returns | |
// "Extra Small" | |
// code reworked from woocommerce/classes/class-wc-cart.php |
This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.
This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.
If you experience any difficulties or have any feedback, leave a comment. 🐬
Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.
<?php | |
[select member-1-state "Alabama" "Alaska" "Arizona" "Arkansas" "California" "Colorado" "Connecticut" "Delaware" "Florida" "Georgia" "Hawaii" "Idaho" "Illinois" "Indiana" "Iowa" "Kansas" "Kentucky" "Louisiana" "Maine" "Maryland" "Massachusetts" "Michigan" "Minnesota" "Mississippi" "Missouri" "Montana" "Nebraska" "Nevada" "New Hampshire" "New Jersey" "New Mexico" "New York" "North Carolina" "North Dakota" "Ohio" "Oklahoma" "Oregon" "Pennsylvania" "Rhode Island" "South Carolina" "South Dakota" "Tennessee" "Texas" "Utah" "Vermont" "Virginia" "Washington" "West Virginia" "Wisconsin" "Wyoming" "--" "District of Columbia" "Puerto Rico" "Guam" "American Samoa" "U.S. Virgin Islands" "Northern Mariana Islands"] |
<?php | |
// Add the action setting | |
add_filter( 'wc_points_rewards_action_settings', 'points_rewards_newsletter_action_settings' ); | |
function points_rewards_newsletter_action_settings( $settings ) { | |
$settings[] = array( | |
'title' => __( 'Points earned for newsletter signup' ), | |
'desc_tip' => __( 'Enter the amount of points earned when a customer signs up for a newsletter via MailChimp.' ), |
<?php | |
/** | |
* WooCommerce Extra Feature | |
* -------------------------- | |
* | |
* Change number of related products on product page | |
* Set your own value for 'posts_per_page' | |
* | |
*/ | |
function woo_related_products_limit() { |
require 'bundler/capistrano' | |
default_run_options[:pty] = true | |
ssh_options[:forward_agent] = true | |
set :user, "<<your webfaction user>>" | |
set :domain, "#{user}@<<your domain>>" | |
set :application, "<<your application>>" | |
set :repository, "<< your ssh repository link >>" | |
set :deploy_to, "/home/#{user}/webapps/#{application}" |
<? | |
public function rsa_verify_sign($key, $signature, $package) { | |
$rsa = new Crypt_RSA(); | |
$rsa->setHash("sha256"); | |
$rsa->setSignatureMode(CRYPT_RSA_SIGNATURE_PKCS1); | |
$rsa->loadKey($key); | |
$verify = $rsa->verify(base64_decode($package), $signature); | |
return $verify; | |
} | |
?> |