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
| /** | |
| * Fix for vw, vh, vmin, vmax on iOS 7. | |
| * http://caniuse.com/#feat=viewport-units | |
| * | |
| * This fix works by replacing viewport units with px values on known screen sizes. | |
| * | |
| * iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix. | |
| * Target devices running iOS 8+ will incidentally execute the media query, | |
| * but this will still produce the expected result; so this is not a problem. | |
| * |
| <?php | |
| /** | |
| * Allows visitors to log in using e-mail address | |
| * | |
| * @param string username passed by reference | |
| */ | |
| function prefix_authenticate_by_email( &$username ) { | |
| $user = get_user_by( 'email', $username ); |
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 | |
| // minimal version | |
| define( 'SHORTINIT', true ); | |
| require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' ); | |
| // medium version (With lots of overhead) | |
| require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' ); | |
| // full version (including functions and 200 header) | |
| define( 'SHORTINIT', true ); |
This is a really basic "todo list" demo built with Mithril.
It's largely an ES6/ES2015 port of the Mithril's Getting Started guide, with a bit of sugar and opinion thrown in to make it look and feel a lot like React.
In this case we're using Babel's JSX transform to convert inline XML into hyperscript (just nested calls to Mithral's m() function).
A Pen by Jason Miller on CodePen.
| <?php | |
| /** | |
| * "Friendlier, Safer WordPress Admin Areas" | |
| * Presented by Cliff Seal at WordCamp Atlanta 2015 and Asheville 2016 | |
| * Slides: http://www.slideshare.net/cliffseal/wp-admin | |
| * | |
| * Plugin Name: A Better Admin Experience | |
| * Plugin URI: http://evermoresites.com | |
| * Description: Cleans up and sanitizes the WordPress admin area | |
| * Version: 1.0 |
| download curl from http://ftp.sunet.se/pub/www/utilities/curl/curl-7.40.0.tar.bz2 | |
| Configure it with ./configure --prefix=/Applications/MAMP/Library/ | |
| make && make install |
| <?php | |
| /** | |
| * Custom WordImpress RSS2 Feed | |
| * Integrates Featured Image as "Enclosure" | |
| * See http://www.rssboard.org/rss-2-0-1#ltenclosuregtSubelementOfLtitemgt | |
| * for RSS 2.0 specs | |
| * @package WordPress | |
| */ | |
| header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); |
| // Normalize Carousel Heights - pass in Bootstrap Carousel items. | |
| $.fn.carouselHeights = function() { | |
| var items = $(this), //grab all slides | |
| heights = [], //create empty array to store height values | |
| tallest; //create variable to make note of the tallest slide | |
| var normalizeHeights = function() { | |
| items.each(function() { //add heights to array |
| <?php | |
| function load_js_template(){ | |
| get_template_part( 'sample-template' ); | |
| } | |
| add_action( 'wp_footer', 'load_js_template' ); | |
| function render_template( $template_name, $tmpl_data ) { | |
| // "/" should not be present, but let's sanitize just in case | |
| $template_name = str_replace( '/', '_', $template_name ); |