I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
<?php | |
class Example { | |
public function __construct() { | |
$this->instantiate(); | |
} | |
public function instantiate() { | |
static $instance = null; | |
/** | |
* Routes all email from WP installation to specific Mailtrap | |
* account inbox. | |
* | |
* All you need to do is change the "Username" and "Password" | |
* settings to the appropriate box in Mailtrap. Then all | |
* mail **should** be routed to that box. Exceptions would | |
* be other functionality that overwrite the wp_mail() functions | |
* and may not use this filter, or other filters that change | |
* this behavior after we set it, or millions of other things. |
<?php | |
/* | |
Plugin name: GCE Load Polylang on Ajax requests | |
*/ | |
function gce_load_polylang_on_ajax() { | |
?> | |
<script type="text/javascript"> | |
if (typeof jQuery != 'undefined') { | |
jQuery.ajaxSetup({ |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
<?php | |
/** | |
* Callback for saving values from metaboxes. | |
* | |
* @since 1.0.0 | |
* | |
* @param int $post_id The current post ID. | |
* @param object $post The current post object. | |
*/ | |
function tgm_save_meta_boxes( $post_id, $post ) { |
<?php | |
add_action( 'add_meta_boxes', 'tgm_remove_all_the_metaboxes', 100 ); | |
/** | |
* Removes all metaboxes except the ones I WANT ON MY POST TYPE. RAGE. | |
* | |
* This assumes a specific post type. In my case, it is 'envira'. | |
* This function is very aggressive and removes every single metabox minus | |
* the needed submitdiv metabox (which allows you to publish something) and | |
* the metaboxes that I register with my plugin. | |
* |
<?php | |
namespace WCM; | |
/** | |
* Plugin Name: (WCM) Meta Box Order Debug | |
* Description: Temporarily overrides the MetaBox-order by dismissing the user setting. | |
* Author: Franz Josef Kaiser | |
* Author URI: https://unserkaiser.com | |
* Version: 1.0 |
<?php | |
// Jetpack infinite scroll does it's own WP_Query, so we need to hijack it at runtime | |
function searchwp_infinite_scroll_query_args( $query_args ) { | |
if( class_exists( 'SearchWPSearch' ) ) { | |
$query = get_search_query(); | |
if( empty( $query ) ) { | |
if( isset( $_GET['query_args']['s'] ) ) { | |
$query = sanitize_text_field( $_GET['query_args']['s'] ); | |
} |
<?php | |
/** | |
* Integrate Imager.js with WordPress | |
* | |
* Imager.js is BBC's solution for serving responsive and retina images, without | |
* the double payload issues that affect other solutions. For more information: | |
* | |
* https://github.com/BBC-News/Imager.js/ | |
* | |
* This collection of functions modifies the output of WordPress's |
upstream phpfpm { | |
server unix:/var/run/php5-fpm.sock; | |
} | |
upstream hhvm { | |
server unix:/var/run/hhvm/hhvm.sock; | |
} | |
# SSL | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |