Skip to content

Instantly share code, notes, and snippets.

View riverofjanuary's full-sized avatar

riverofjanuary

View GitHub Profile
@damiencarbery
damiencarbery / nf-submissions-date-range.php
Created November 5, 2019 11:18
Retrieve Ninja Forms Submissions for date range - Use a direct query to retrieve Ninja Forms submissions for a specified date range. https://www.damiencarbery.com/2019/11/retrieve-ninja-forms-submissions-for-date-range/
<?php
// Restrict who can access this script.
/*$permitted_ips = array( '12.34.56.78' );
if ( false == in_array($_SERVER['REMOTE_ADDR'], $permitted_ips) ) {
header( 'HTTP/1.0 403 Forbidden' );
die();
}*/
header('HTTP/1.1 200 OK');
@hakre
hakre / dl-file.php
Created January 2, 2012 21:41
Wordpress login to download uploaded files
<?php
/*
* dl-file.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+