Skip to content

Instantly share code, notes, and snippets.

View wp-entwickler-at's full-sized avatar

wp-entwickler.at wp-entwickler-at

View GitHub Profile
@wp-entwickler-at
wp-entwickler-at / minimal-serviceworker.js
Created March 15, 2018 11:18 — forked from adactio/minimal-serviceworker.js
An attempt at a minimal viable service worker.
// 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';
@wp-entwickler-at
wp-entwickler-at / jquery-datepicker-wp-admin
Created May 5, 2017 15:00 — forked from slushman/jquery-datepicker-wp-admin
How to Add the jQuery UI Datepicker to the WordPress Admin
/**
* 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' ) {
@wp-entwickler-at
wp-entwickler-at / wp-config.php
Created December 18, 2015 16:04 — forked from glueckpress/wp-config.php
[WordPress] Enable debug mode via URL. Props @bueltge.
<?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 );
<?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 ) {