Skip to content

Instantly share code, notes, and snippets.

View Latz's full-sized avatar
👽
Programming whatever I like

Latz Latz

👽
Programming whatever I like
View GitHub Profile
@johnbillion
johnbillion / install-debug-bar-extensions.sh
Last active September 18, 2019 02:35
Use WP-CLI to install a load of Debug Bar extensions (which work with Query Monitor too) in one go
# wp-cli: http://wp-cli.org/
wp plugin search debug-bar --field=slug --format=csv --per-page=50 \
| grep -F 'debug-bar-' \
| xargs -n 1 wp plugin install
@swissspidy
swissspidy / language-updates-table.php
Last active April 4, 2020 11:20
Display a table with available translation updates on the WordPress update screen
<?php
/**
* Plugin Name: Translation Updates Table
*
* @author Pascal Birchler <pascal@required.ch>
* @license GPL2+
*/
/**
* Displays a table with available translation updates.
@elmahdim
elmahdim / toggleClass.js
Created December 30, 2015 13:51
vanilla javascript toggleClass
function toggleClass(element, className) {
if (!element || !className) { return; }
var classString = element.className, nameIndex = classString.indexOf(className);
if (nameIndex == -1) {
classString += (classString.length) ? ' ' + className : className;
} else {
classString = classString.replace(' '+className, '');
classString = classString.replace(className, '');
}
element.className = classString;
@thefuxia
thefuxia / t5-silent-flush.php
Last active August 11, 2016 11:03
T5 Silent Flush - Flushes rewrite rules whenever a custom post type or taxonomy is registered and not already part of these rules. This is a soft flush, the .htaccess will not be rewritten.
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: T5 Silent Flush
* Description: Flushes rewrite rules whenever a custom post type or taxonomy is registered and not already part of these rules. This is a soft flush, the .htaccess will not be rewritten.
* Version: 2013.05.04
* Author: Thomas Scholz <info@toscho.de>
* Author URI: http://toscho.de
* License: MIT
* License URI: http://www.opensource.org/licenses/mit-license.php
*/