Skip to content

Instantly share code, notes, and snippets.

@tosinafolabi
tosinafolabi / Extend Recent Posts
Created March 23, 2018 14:41 — forked from paulruescher/Extend Recent Posts
Used this to change the output of WordPress' Recent Posts Widget
/**
* Extend Recent Posts Widget
*
* Adds different formatting to the default WordPress Recent Posts Widget
*/
Class My_Recent_Posts_Widget extends WP_Widget_Recent_Posts {
function widget($args, $instance) {
@tosinafolabi
tosinafolabi / download.php
Last active September 1, 2018 19:48 — forked from brasofilo/download.php
Force File Download with PHP
<?php
/*
* Force File Download
* Usage: http://example.com/download.php?file=./uploads/image.jpg
*
* There are a couple of *ninja* exit() as security guarantee, adapt as necessary
*
*/
// grab the requested file's name
@tosinafolabi
tosinafolabi / envira-standalone-enable-archives.php
Last active November 25, 2016 14:55 — forked from n7studios/envira-standalone-enable-archives.php
Envira Gallery - Standalone Addon - Enable Archives and Featured Images
<?php
/**
* Plugin Name: Envira Gallery - Standalone Addon - Enable Archives and Featured Image
* Plugin URI: http://enviragallery.com
* Version: 1.0
* Author: Tim Carr
* Author URI: http://www.n7studios.co.uk
* Description: Enables archives for Envira CPT
*/