Skip to content

Instantly share code, notes, and snippets.

View shawmanz32na's full-sized avatar

Kevin Shaw shawmanz32na

  • G2 Software Systems, Inc.
  • Issaquah, WA
View GitHub Profile
@shawmanz32na
shawmanz32na / dl-file.php
Last active June 26, 2019 10:08 — forked from hakre/dl-file.php
Multisite implementation of @hakre 's dl-file.php. All the credit goes to him.
<?php
/*
* dl-file.php
*
* Protect uploaded files with login. Handles the case when a multisite user is valid but doesn't have access to this blog/site.
*
* @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+