This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail
/** | |
* WordPress Blocks | |
* | |
* Default block styling included with WordPress core. | |
* Provides a better starting point for WordPress theme developers, | |
* especially when using Sass. | |
* | |
* @link https://github.com/WordPress/WordPress/blob/master/wp-includes/css/dist/block-library/style.css | |
* | |
* Most styles from the above file are included. |
#! /bin/bash | |
# | |
# Script to deploy from Github to WordPress.org Plugin Repository | |
# A modification of a number of different sources: | |
# @link https://github.com/deanc/wordpress-plugin-git-svn | |
# @link https://github.com/GaryJones/wordpress-plugin-svn-deploy | |
# @link https://github.com/thenbrent/multisite-user-management/blob/master/deploy.sh | |
# | |
# Accompanying Tutorial Here: | |
# @link https://ericbusch.net/?p=106 |
/* | |
* This code is for WordPress and should be used in functions.php of the active theme. | |
* | |
* Before using it, replace "ADVERTISER ID" with your own advertiser ID and "SLOT ID" with your own slot ID | |
* (you can get both in Google AdSense). For best results, use a reponsive ad unit. | |
* | |
* If your posts contain "pre", "noscript" or some other type of HTML block, add them to $block_tags. | |
* | |
* You can change the insertion point by changing $after_block. | |
* |
<?php | |
/* | |
* Plugin Name: Rainbow Bar! | |
*/ | |
function rainbow_bar() { | |
?> | |
<style type="text/css"> | |
#wpadminbar { |
<?php | |
/** | |
* Retrieves all post meta data according to the structure in the $config | |
* array. | |
* | |
* Provides a convenient and more performant alternative to ACF's | |
* `get_field()`. | |
* | |
* This function is especially useful when working with ACF repeater fields and | |
* flexible content layouts. |
.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent, | |
#customize-theme-controls .customize-pane-child.current-section-parent { | |
-webkit-transform: translateX(-100%); | |
-ms-transform: translateX(-100%); | |
transform: translateX(-100%); | |
} |
// Add to your functions.php file | |
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' ); | |
add_action( 'woocommerce_before_cart' , 'wc_minimum_order_amount' ); | |
function wc_minimum_order_amount() { | |
// Set this variable to specify a minimum order value | |
$minimum = 50; | |
if ( WC()->cart->subtotal < $minimum ) { |
<?php | |
/** | |
* getRandomWeightedElement() | |
* Utility function for getting random values with weighting. | |
* Pass in an associative array, such as array('A'=>5, 'B'=>45, 'C'=>50) | |
* An array like this means that "A" has a 5% chance of being selected, "B" 45%, and "C" 50%. | |
* The return value is the array key, A, B, or C in this case. Note that the values assigned | |
* do not have to be percentages. The values are simply relative to each other. If one value | |
* weight was 2, and the other weight of 1, the value with the weight of 2 has about a 66% | |
* chance of being selected. Also note that weights should be integers. |
<?php | |
/** | |
* Skip Registration for Logged In Users | |
* http://gravitywiz.com/2012/04/24/skip-user-registration-for-logged-in-users/ | |
* Works for GF User Registration 3.0 and greater. | |
*/ | |
add_filter( 'gform_is_delayed_pre_process_feed', 'maybe_delay_feeds', 10, 4 ); | |
function maybe_delay_feeds( $is_delayed, $form, $entry, $slug ) { | |
if ( is_user_logged_in() && $slug == 'gravityformsuserregistration' ) { | |
return gf_user_registration()->has_feed_type( 'create', $form ); |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This documentation has moved here: https://github.com/johnbillion/wp_mail