Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
<?php | |
/** | |
* WARNING! THIS SNIPPET MAY BE OUTDATED. | |
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library: | |
* https://github.com/gravitywiz/snippet-library/blob/master/experimental/gw-gravity-forms-to-wp-job-manager.php | |
*/ | |
/** | |
* Gravity Wiz // Gravity Forms // Populate GF Data into WP Job Manager Custom Fields | |
* | |
* Provides support for mapping a GF multiselect field to a WPJM multiselect field. |
<?php | |
add_action( 'woocommerce_thankyou', 'google_trusted_stores_confirmation' ); | |
function google_trusted_stores_confirmation( $order_id ) { | |
// Lets grab the order | |
$order = wc_get_order( $order_id ); | |
$customer = get_current_user_id(); |
<?php | |
/* | |
Plugin Name: Polylang Bulk Translate | |
Plugin URI: | |
Version: 0.1.0 | |
Author: Tyomaa Oy | |
Author URI: https://github.com/tnottu | |
Description: Translate multiple posts with bulk actions | |
License: GPLv2 or later |
<?php | |
/** | |
* Plugin Name: WP Rocket | Clear Additional URLs | |
* Description: Clears an additional URL from cache when a given URL is cleared. | |
* Version: 0.1 | |
* Author: WP Rocket Support Team | |
* Author URI: http://wp-rocket.me/ | |
* Plugin URI: https://gist.github.com/glueckpress/1c49dde98a361ec043fa | |
* License: GNU General Public License v3 or later | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html |
<?php | |
namespace WooCommerce\Tests\New_Customer_Coupon; | |
/** | |
* Class New_Customer_Coupon. | |
* @package WooCommerce\Tests\New_Customer_Coupon | |
*/ | |
class New_Customer_Coupon extends \WC_Unit_Test_Case { |
<?php | |
/* | |
Plugin Name: Purge all WP Rocket cache | |
Plugin URI: http://www.beapi.fr | |
Description: Purge all WP rocket cache when a post is modified/edited | |
Version: 1.0 | |
Author: BeAPI | |
Author URI: http://www.beapi.fr | |
Network: true | |
*/ |
Prerequisites : the letsencrypt CLI tool
This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.
You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge
.
Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.
I redirect all HTTP requests on HTTPS, so my nginx config looks like :
server {
<?php | |
add_action( 'wp_enqueue_scripts', 'jt_enqueue_scripts' ); | |
function jt_enqueue_scripts() { | |
wp_enqueue_script( 'wp-api' ); | |
wp_enqueue_script( 'wp-util' ); | |
} | |
add_action( 'wp_footer', 'jt_print_post_template', 25 ); |
#!/usr/bin/env bash | |
function create_index | |
{ | |
cat <<- __EOF__ | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>$PROJECT</title> |