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
// License: GPLv2+ | |
var el = wp.element.createElement, | |
registerBlockType = wp.blocks.registerBlockType, | |
ServerSideRender = wp.components.ServerSideRender, | |
TextControl = wp.components.TextControl, | |
InspectorControls = wp.editor.InspectorControls; | |
/* | |
* Here's where we register the block in JavaScript. |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<templateSet group="WordPress"> | |
<template name="aa" value="add_action( '$hook$', '$callback$' ); $END$" description="add_action" toReformat="false" toShortenFQNames="true"> | |
<variable name="hook" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="callback" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="HTML_TEXT" value="false" /> | |
<option name="HTML" value="false" /> | |
<option name="XSL_TEXT" value="false" /> | |
<option name="XML" value="false" /> |
<?php | |
//hook into the 'shutdown' action and debug some filters... but not on the admin this time | |
if (! is_admin() ) | |
add_action('shutdown', 'use_debug_filters',10); | |
function use_debug_filters(){ | |
echo "<h3>Output hooks and filters that contain the string 'init'</h3>"; | |
debug_filter("/init/i"); |
<?php | |
/* | |
* On first publish set a special date in advance in custom field | |
*/ | |
add_action('transition_post_status','tanc_first_schedule_publish_set',10,3); | |
function tanc_first_schedule_publish_set($new, $old, $post) { | |
// REFERENCE | |
// $new = new post status ('publish') | |
// $old = old post status ('draft') |
<?php | |
// Add all your custom post type counts to 'Right Now' dashboard widget | |
function tanc_admin_post_types_rightnow(){ | |
$post_types = get_post_types(array('_builtin' => false), 'objects'); | |
if (count($post_types) > 0) | |
foreach ($post_types as $pt => $args) { | |
$url = 'edit.php?post_type=' . $pt; | |
echo '<tr><td class="b"><a href="' . $url . '">' . wp_count_posts($pt)->publish . '</a></td><td class="t"><a href="' . $url . '">' . $args->labels->name . '</a></td></tr>'; | |
} |
<?php | |
/** | |
* This program is free software. It comes without any warranty, to | |
* the extent permitted by applicable law. You can redistribute it | |
* and/or modify it under the terms of the Do What The Fuck You Want | |
* To Public License, Version 2, as published by Sam Hocevar. See | |
* http://sam.zoy.org/wtfpl/COPYING for more details. | |
*/ | |
/** |