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
// Author: Ross Patton (abbreviated by KV) | |
// Link to WIRED json feed | |
var apiUrl = 'http://' + location.host + '/wp-json/wp/v2/posts/'; | |
// Fallback if OBR not available | |
if ( typeof OBR === 'undefined' ) { | |
$( getAll('poweredByOutbrain') ).remove(); | |
return $.getJSON( apiUrl, function(res) { |
<?php | |
add_filter( 'searchwp_license_key', function(){ | |
return 'MJqNKfmhT3gVG6kpeyjXvM'; // your license key (found on your payment receipt) | |
}); |
<?php | |
/* | |
Add back Schema.org/blogPosting microdata to post entries. | |
Replace all instances of "themedemo" with something unique to your site. | |
User input is required in the last function. Be sure to fill these fields in with your own information. | |
Instances where you need to fill in information will be marked with a comment that indicates so. | |
*/ |
<?php | |
/** | |
* If post goes from "future" (scheduled) or "draft" to "publish" then alert facebook to (re)crawl it. | |
* @see https://codex.wordpress.org/Post_Status_Transitions#transition_post_status_Hook | |
*/ | |
function chuck_notify_facebook_scraper( $new_status, $old_status, $post ) { | |
if ( $new_status != 'publish' ) { | |
return; | |
} |
public function get_remote_posts() { | |
$posts = get_transient( 'remote_posts' ); | |
if( empty( $posts ) ) { | |
$response = wp_remote_get( 'http://mysite.com/wp-json/wp/v2/posts/' ); | |
if( is_wp_error( $response ) ) { | |
return array(); | |
} | |
$posts = json_decode( wp_remote_retrieve_body( $response ) ); |
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 // <~ keep me in | |
add_action('genesis_entry_content','themeprefix_team_slider' ); | |
//Fields | |
//team_portfolio = Gallery Field | |
function themeprefix_team_slider() { | |
$images = get_field('team_portfolio');//add your correct filed name | |
if( $images ): ?> | |
<div class="team-items"> |
The ability to use PHP 4 style constructors is getting removed from PHP. Without an update, many plugins will eventually no longer work (this is PHP breaking this backwards compatibility, not WordPress)
One of the more common uses of the PHP 4 style constructor (as opposed to PHP 5 style __construct()
) are plugins with widgets calling WP_Widget::WP_Widget()
and/or parent::WP_Widget()
and/or {object}->WP_Widget()
Note: Starting in WordPress 4.3, regardless of the PHP version in use on a server, WordPress will throw a deprecated notice when one of the PHP 4 style constructors is called specifically for widgets.
Basically instead of doing these:
<?php | |
//create our mega query with post data, meta fields, and taxonomies | |
function get_posts_terms_fields($params=null){ | |
global $wpdb; | |
$defaults=array( | |
'posts_per_page' => 5, | |
'offset' => 0, | |
'category' => '', | |
'category_name' => '', |