Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"
Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"
| <?php | |
| /* | |
| * This code goes into theme functions.php or a custom plugin | |
| */ | |
| /** | |
| * Add product to cart on page load | |
| */ | |
| function add_product_to_cart() { |
| //Display Images From A Folder with PHP | |
| <?php | |
| $files = glob("images/*.*"); | |
| for ($i=1; $i<count($files); $i++) | |
| { | |
| $num = $files[$i]; | |
| echo '<img src="'.$num.'" alt="random image">'." "; | |
| } | |
| ?> |
| <?php | |
| /* | |
| Add this code to your functions.php | |
| */ | |
| add_action('woocommerce_checkout_update_order_review', 'get_customer_details'); | |
| function get_customer_details($post_data){ | |
| global $woocommerce; | |
| // Details you want injected into WooCommerce session. |
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
| function register_watermarked_size() { | |
| add_image_size( 'watermarked', 550, 550, true ); // This is what should be uploaded | |
| } | |
| add_action( 'init', 'register_watermarked_size' ); | |
| class Watermark_Image { | |
| // The attachment meta array | |
| public $meta = array(); |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This is accurate as of WordPress 4.8, and includes some upcoming changes in WordPress 4.9.
There are a few TODOs left. Please bear with me.
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.com | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
| */ | |
| $args = array( |