Skip to content

Instantly share code, notes, and snippets.

Dennis Ploetner lloc

Block or report user

Report or block lloc

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
glueckpress / multisite-custom-my-sites-menu-titles.php
Last active May 6, 2019
[WordPress] Custom site titles for the My Sites network admin bar menu in a multisite network. Configure first function, then auto-activate by saving this file in wp-content/mu-plugins, or network activate as a regular plugin.
View multisite-custom-my-sites-menu-titles.php
* Plugin Name: Custom My Sites Menu Titles
* Description: Custom site titles for the My Sites network admin bar menu. Multisite only.
* Version: 2015.11
* Author: Caspar Hübinger
* Author URI:
* License: GNU General Public License v3 or later
* License URI:
eteubert / wordpress-passwort-reset-unmultisite.php
Last active Feb 24, 2020
Multisite: Passwort Reset on Local Blog
View wordpress-passwort-reset-unmultisite.php
* Plugin Name: Multisite: Passwort Reset on Local Blog
* Plugin URI:
* Description: By default, WordPress Multisite uses the main blog for passwort resets. This plugin enables users to stay in their blog during the whole reset process.
* Version: 1.0.0
* Author: Eric Teubert
* Author URI:
* License: MIT
jubstuff / .htaccess
Last active Aug 29, 2015
wp-cli.yaml for single wordpress install
View .htaccess
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
brianoz / class-virtualthemedpage-bc.php
Created Feb 20, 2014
WordPress Virtual page with theme
View class-virtualthemedpage-bc.php
* Virtual Themed Page class
* This class implements virtual pages for a plugin.
* It is designed to be included then called for each part of the plugin
* that wants virtual pages.
* It supports multiple virtual pages and content generation functions.
lloc /
Last active Apr 26, 2019
Configure GitHub for a connection trough a proxy with a pacfile
#!/usr/bin/env python
The config.ini contains something like:
proxy = http://YOURPROXY/proxy.pac
local = proxy.pac
benbalter /
Last active Mar 28, 2020
Example of how to embed a Gist on GitHub Pages using Jekyll.

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.

kovshenin / plugin.php
Created Oct 26, 2012
Settings API Demo
View plugin.php
* Plugin Name: My Plugin
* Plugin Description: Settings API Demo
add_action( 'admin_menu', 'my_admin_menu' );
function my_admin_menu() {
add_options_page( 'My Plugin', 'My Plugin', 'manage_options', 'my-plugin', 'my_options_page' );
View wp-query-ref.php
// This gist is now maintained on github at
* WordPress Query Comprehensive Reference
* Compiled by luetkemj -
* Source:
lloc / _example.php
Last active Dec 22, 2017
Generic Decorator in PHP
View _example.php
require_once 'bar.php';
require_once 'foo.php';
$foo = new Foo;
$bar = new Bar( $foo );
$foo->set_foo( 123.4 );
$foo->set_bar( 123.4 );
lloc / my_msls_blog_collection_get.php
Last active Sep 27, 2015
Multisite Language Switcher: Howto use the "msls_blog_collection_get"-filter
View my_msls_blog_collection_get.php
function my_msls_blog_collection_get( $objects ) {
$objects = array();
$blogs = array( 1 => 'Override English', 2 => 'Override Deutsch', );
foreach ( $blogs as $id => $description ) {
$details = get_blog_details( $id );
if ( is_object( $details ) ) {
$objects[$id] = new MslsBlog( $details, $description );
You can’t perform that action at this time.