This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
// HTML files: try the network first, then the cache. | |
// Other files: try the cache first, then the network. | |
// Both: cache a fresh version if possible. | |
// (beware: the cache will grow and grow; there's no cleanup) | |
const cacheName = 'files'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adds the datepicker settings to the admin footer. | |
* Only loads on the plugin-name settings page | |
*/ | |
function admin_footer() { | |
$screen = get_current_screen(); | |
if ( $screen->id == 'settings_page_plugin-name' ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Better: use nonces, or less obvious query arguments. | |
* http://glueckpress.com/?show_me=💩 | |
*/ | |
if ( isset( $_GET['show_me'] ) && $_GET['show_me'] === '💩') { | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_DISPLAY', true ); | |
} else { | |
define( 'WP_DEBUG', false ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Plugin Name: Where am I? | |
* Description: Adds the current server name and WordPress path to the admin footer. | |
* Version: 2015.07.04 | |
* Author: toscho | |
* Author URI: http://wpkrauts.com/ | |
* License: MIT | |
* License URI: http://opensource.org/licenses/MIT | |
*/ | |
add_filter( 'admin_footer_text', function( $text ) { |