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
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
<?php | |
// Loads Optimizely and sends revenue information on conversion page. | |
// Replace Optimizely script with your own ID. | |
function optimizely_revenue_tracking( $order_id ) { | |
// Lets grab the order | |
$order = new WC_Order( $order_id ); | |
$price = $order->get_total(); | |
?> |
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
// Save as: php-echo-open-html.sublime-snippet | |
<snippet> | |
<content><![CDATA[ | |
echo '<${1:div} ${2:class}="${3:value}">'; | |
]]></content> | |
<description>PHP echo statement with opening html tag with class</description> | |
<tabTrigger>phpechohtmlopen</tabTrigger> | |
<scope>source.php.embedded.block.html</scope> | |
</snippet> |
<?php | |
/** | |
* This changes logging to only log fatal errors. This file should go in your mu-plugins directory. | |
*/ | |
// Set the error logging to only log fatal errors | |
error_reporting( E_ERROR ); | |
// Optional: change the location of your error log, it might be wise to put it outside your WP content dir. | |
// If you don't change it, the default place for this log is debug.log in your WP_CONTENT_DIR. |
<?php | |
// Please see https://github.com/Lewiscowles1986/WordPressSVGPlugin from now on |
<?php | |
/* | |
* Add "Formats" dropdown to TinyMCE Editor | |
*/ | |
function matt2015_mce_formats($buttons) { | |
array_unshift($buttons, 'styleselect'); | |
return $buttons; | |
} | |
add_filter('mce_buttons_2', 'matt2015_mce_formats'); |
<?php | |
function mbn_get_stores_by_location( $zip, $radius ) { | |
global $wpdb; | |
$radius = intval( $radius ); | |
// we first need to get the source coordinates | |
$sql = "SELECT `latitude`, `longitude` FROM `wp_zip_codes` WHERE `zipcode` = '%s'"; | |
$coords = $wpdb->get_row( $wpdb->prepare( $sql, $zip ) ); | |
<?php | |
add_action( 'gform_after_submission', 'tgm_io_remove_form_entry' ); | |
/** | |
* Prevents Gravity Form entries from being stored in the database. | |
* | |
* @global object $wpdb The WP database object. | |
* @param array $entry Array of entry data. | |
*/ | |
function tgm_io_remove_form_entry( $entry ) { | |