Skip to content

Instantly share code, notes, and snippets.

View austinginder's full-sized avatar

Austin Ginder austinginder

View GitHub Profile
@austinginder
austinginder / protected.php
Last active January 29, 2020 16:59 — forked from hakre/dl-file.php
Wordpress login to download uploaded files
<?php
/*
* protected.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+
@austinginder
austinginder / config.ru
Created May 2, 2012 14:18 — forked from brookr/config.ru
Rackup file I use for running WordPress on Pow
# config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/
# added hackery to work around Wordpress issues - Patrick Anderson (patrick@trinity-ai.com)
# added rewrite for Wordpress multisite upload directory - Austin Ginder
# clearly this could be cleaner, but it does work
require 'rack'
require 'rack-legacy'
require 'rack-rewrite'
# patch Php from rack-legacy to substitute the original request so