Skip to content

Instantly share code, notes, and snippets.

Searching for talents

Frank Bültge bueltge

Searching for talents
Block or report user

Report or block bueltge

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
bueltge /
Last active Nov 9, 2017
Static PHP7 analyses with phan and


Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.

Install via Composer

composer require --dev phan/phan

note: php-ast is necessary (sudo apt install php-ast)


bueltge / PortSwitch.php
Last active Sep 16, 2019
Port switch to get an workaround to use WordPress Multisite also without the default port 80.
View PortSwitch.php
<?php # -*- coding: utf-8 -*-
declare( strict_types = 1 );
* Plugin Name: Port Switch
* Plugin URI:
* Description: Port switch to get an workaround to use WordPress Multisite also without the default port 80.
* Version: dev
* Author: Frank Bültge
* Author URI:
* License: MIT
bueltge / plugin.php
Last active Aug 18, 2017
Get WP Posts via REST API
View plugin.php
class foo {
* Return sites of MU.
* $sites object
public function get_sites() {
$sites = get_sites();
bueltge / php.ini
Last active Feb 21, 2017
Active Xdebug for profiling
View php.ini
;XAMPP Win example
;zend_extension = "c:\xampp\php\ext\php_xdebug32.dll"
;xdebug.trace_output_dir ="\xampp\tmp"
;Linux Path
xdebug.profiler_output_dir = /var/local/xdebug
xdebug.default_enable = 1
xdebug.profiler_enable = 0
bueltge / add-rel-nofollow-checkbox.php
Created Feb 14, 2017 — forked from danielbachhuber/add-rel-nofollow-checkbox.php
Add a 'Add rel="nofollow" to link' checkbox to the WordPress link editor
View add-rel-nofollow-checkbox.php
* Add a 'Add rel="nofollow" to link' checkbox to the WordPress link editor
* @see
add_action( 'after_wp_tiny_mce', function(){
bueltge /
Created Aug 22, 2016
WordPress Plugin Security Testing Cheat Sheet

WordPress Plugin Security Testing Cheat Sheet

This cheat sheet was compiled by Dewhurst Security to record the knowledge gained when testing WordPress plugins for security issues for our clients. The security documentation provided by WordPress and found online for plugin security is sparse, outdated or unclear. This cheat sheet is intended for Penetration Testers who audit WordPress plugins or developers who wish to audit their own WordPress plugins.

This is a living document, feedback in the form of Issues or Pull Requests is very much welcomed.

Cross-Site Scripting (XSS)

bueltge /
Last active Aug 18, 2016

Keybase proof

I hereby claim:

  • I am bueltge on github.
  • I am bueltge ( on keybase.
  • I have a public key whose fingerprint is 5EA5 319F D531 1C84 7094 2FE4 1A56 7625 5969 6D2D

To claim this, I am signing this object:

View clipboard.js
function detectIE() {
var ua = window.navigator.userAgent;
var msie = ua.indexOf('MSIE ');
if (msie > 0) {
// IE 10 or older => return version number
return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
bueltge / metabox-register.php
Last active Apr 21, 2016
WordPress Antipattern, no good classes
View metabox-register.php
// @see
class MetaBoxRegistrar {
private $metaBox;
public function __construct( MetaBoxInterface $metaBox ) {
$this->metaBox = $metaBox;
bueltge / change-read-access-posts.php
Created Mar 31, 2016
WP Members Add-on, that block read access for the role Author after login.
View change-read-access-posts.php
* Plugin Name: WP Members Add-on, Change Read Access for role author
! defined( 'ABSPATH' ) && exit;
register_activation_hook( __FILE__, function() {
if ( ! function_exists( 'wpmem_block' ) ) {
You can’t perform that action at this time.