Skip to content

Instantly share code, notes, and snippets.

View jose-serrao's full-sized avatar

José Serrão jose-serrao

View GitHub Profile
https://www.variantweb.net/blog/wordpress-behind-an-nginx-ssl-reverse-proxy/
/**
* Handle SSL reverse proxy
*/
define('FORCE_SSL_ADMIN', true);
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
$_SERVER['HTTPS']='on';
if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
@jose-serrao
jose-serrao / fn.slugify.sql
Created October 24, 2017 12:18
Slugify function for MySQL
/*
The MIT License (MIT)
Copyright (c) 2014 jose reis<[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
1. Open the CF7 contact form which you want to edit in wordpress Admin area. You set up the [checkbox] snippet which produces the checkbox in the contact form on your website:
[checkbox contact_sendmail "Send me a copy of this message"]
2. Activate Mail(2)
3. Add to functions.php
function check_mail_send_contactform($cf7)
{
$submission = WPCF7_Submission::get_instance();