1 2 3 4 5 6 |
add_action('init', 'pluginStartSession', 1); function pluginStartSession() { if(!session_id()) { session_start(); } } |
1 2 3 4 5 6 |
add_action('wp_logout', 'pluginEndSession'); add_action('wp_login', 'pluginEndSession'); function pluginEndSession() { session_destroy (); } |
Now go ahead and use $_SESSION freely in your plugin. Here a nice additional class to encrypt session data.
“This repository is a community-curated list of flexbox issues and cross-browser workarounds for them. The goal is that if you’re building a website using flexbox and something isn’t working as you’d expect, you can find the solution here.”
HyperDB is a plugin for spreading your websites load across several servers and databases. Its currently used in production on WordPress.com.
Just started experimenting with it :)
1 2 3 |
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L] |
Branded fashion to make brands good looking !
1 2 3 4 |
var el = document.getElementById('YourElementID'); var e = document.createEvent("MouseEvents"); e.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); el.dispatchEvent(e); |
This often comes up, when you work with jQuery and try to do a simple $(“#YourElementID”).trigger(“click”); or similar.
Our SSL setup is final fixed, after some back and forth.
The Certificate formatting was broken and failed to load ;) Its all in the detail ….
Simple SSL certificates are easily obtained and installed these days. Here some simple first steps to get a Comodo SSL certificate installed.
1 2 |
openssl genrsa –des3 –out yourdomain_com.key 2048 openssl req -new -key yourdomain_com.key -out yourdomain_com.csr |
1 |
cat yourdomain_com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > cacert.pem |
Some options to check your SSL setup:
1 |
openssl s_client -showcerts -connect yourdomain.com:443 |
This can be done manually, as shown above or you can use a shell script, which downloads the certificates for you and combines them. SSL certificate chain resolver – This shell script downloads all intermediate CA certificates for a given SSL server certificate. There is even an online version, but I rather do that on my own machine :) … certificatechain.io
Event registration page for Nutricia de VeranderFabriek 2015 (Danone).