Skip to content

Instantly share code, notes, and snippets.

View sibaberpollo's full-sized avatar

José Pino sibaberpollo

View GitHub Profile
@isGabe
isGabe / wordpress-force-login.php
Created June 21, 2013 16:10
WordPress: force log in to view any page, with redirect to requested URL#snippet #WordPress
<?php
/*
* Password protect a WordPress site, with a redirect to the requested URL after successful login
*
* Based on:
* http://wordpress.stackexchange.com/a/64999
* http://kovshenin.com/2012/current-url-in-wordpress/
*
**/
@svensson-david
svensson-david / traffic-source 1.1.js
Last active July 11, 2016 10:22
Tweaked utm-alternative that adds each visit to the cookie. Automatically removes referrals from your own site. Skips addition if new hit is same as previous. Original here: https://github.com/dm-guy/utm-alternative
(function(cookieName, domain){
var traffic_source_COOKIE_TOKEN_SEPARATOR = ">>"; //separating between concatenated lead source
var traffic_source_meta_SEPARATOR = ">";
var traffic_source_date_SEPARATOR = "|";
var NONE = "(none)";
domain = domain || window.location.hostname;
function getCookie(cookieName){