First create global variables (in functions.php or as a mu-plugin):
<?php
/*
* CUSTOM GLOBAL VARIABLES
*/
function wtnerd_global_vars() {
<?php | |
/* | |
Usage: | |
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL | |
if ( !$frag->output() ) { // NOTE, testing for a return of false | |
functions_that_do_stuff_live(); | |
these_should_echo(); | |
// IMPORTANT | |
$frag->store(); | |
// YOU CANNOT FORGET THIS. If you do, the site will break. |
function translate_text( $translated ) { | |
// The first parameter is the original text, the second parameter is the changed text. | |
$translated = str_ireplace( 'Choose and option', 'Select', $translated ); | |
// Returns the translated text | |
return $translated; | |
} | |
add_filter( 'gettext', 'translate_text' ); |
<?php | |
/** | |
* Plugin Name: Email Confirmation | |
* Description: Send an email to the user with confirmation code and store form data in database until user confirms. | |
* Author: Cedric Ruiz | |
*/ | |
class EmailConfirmation | |
{ | |
const PREFIX = 'email-confirmation-'; |
<?php | |
/** | |
* AJAX call for parsing HTML | |
* | |
*/ | |
public function parse_html() { | |
// get content from textarea | |
$text = $_POST['content']; |
First create global variables (in functions.php or as a mu-plugin):
<?php
/*
* CUSTOM GLOBAL VARIABLES
*/
function wtnerd_global_vars() {
source: https://savedlog.com/uncategorized/letsencrypt-ssl-certificate-namecheap-hosting/
The “Positive SSL” certificate I bought along with my domain is invalid with any of my subdomains and cannot be used with wildcards. One annoying thing is that namecheap doesn’t offer auto installation of free let’s encrypt certificates, even though, they are saying “Namecheap is dedicated to data security and privacy for all internet users. We believe the movement to encrypt nearly all web traffic is a positive direction. As more sites embrace HTTPS and use of security products, providers of free SSL are beginning to come online.”
Let me show you what it needs to be done in order to “encrypt nearly all web traffic”.
First, not required but it’s helpful to enable ssh access, it is not enabled by default on the base hosting plans, just go an start a live chat and request ssh access.