Skip to content

Instantly share code, notes, and snippets.

edlefebvre

Block or report user

Report or block edlefebvre

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@edlefebvre
edlefebvre / maintenance-mode.php
Last active Jan 22, 2020
WP Maintenance mu-plugin - redirect to login page
View maintenance-mode.php
<?php
// Exit if accessed directly
if ( !defined('ABSPATH') ) exit;
/**
* Plugin Name: Maintenance mode
* Description: maintenance mode.
* Author: EDL
* Author URI:
* Version: 1.1
@edlefebvre
edlefebvre / fragment-caching.php
Created Oct 8, 2019
Fragment caching function
View fragment-caching.php
<?php
/**
* Fragment caching function
* see: https://css-tricks.com/wordpress-fragment-caching-revisited/
*
* Usage:
* <?php fragment_cache('frc_footer', DAY_IN_SECONDS, function() { ?>
* code to cache (loops etc)
* <?php }); // end fragment_cache ?>
*/
You can’t perform that action at this time.