Skip to content

Instantly share code, notes, and snippets.

View bueltge's full-sized avatar
Always interested

Frank Bültge bueltge

Always interested
View GitHub Profile
@bueltge
bueltge / class_fb_backlink_checker.php
Last active February 18, 2024 14:55
Backlink Checker
@bueltge
bueltge / example.php
Created April 21, 2012 21:24
WordPress Widget Order via CSS; Here is a simple filter to automatically add a class attribute like widget-order-1 to all widgets within sidebars
add_action( 'init', 'add_widget_order_class' );
function add_widget_order_class() {
global $wp_registered_sidebars, $wp_registered_widgets;
$sidebars = wp_get_sidebars_widgets();
if ( empty( $sidebars ) )
return;
foreach ( $sidebars as $sidebar_id => $widgets ) {
@bueltge
bueltge / class-taxonomy-helper.php
Created October 10, 2011 11:36
Helper Class To Add Custom Taxonomy To Post Permalinks
/**
* A helper class for registering and handling a custom rewrite tag for a custom taxonomy.
*
* @version 1.0.0
*/
class Add_Taxonomy_To_Post_Permalinks {
/**
* Stores the taxonomy slug that this class will be handling. Don't edit this.
*
@bueltge
bueltge / is_serialized.php
Created December 1, 2011 10:29 — forked from cs278/is_serialized.php
PHP is_serialized() function.
<?php
/**
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*/
/**
@bueltge
bueltge / http-status-codes-explained.md
Last active June 13, 2023 13:16
HTTP Status Codes Explained

HTTP Status Codes Explained

In a Client-Server architecture, you (the Client end) receives various types of responses and to identify each of them, these HTTP Status Codes are divided into various categories. Each status code is a 3 digit number of which, the first digit determines the category and the rest two digits really gives the meaning to these HTTP Status Codes.

@bueltge
bueltge / gist:6104254
Created July 29, 2013 13:21
A Look at the WordPress HTTP API: A Practical Example of wp_remote_get
<?php
/**
* Plugin Name: Twitter Demo
* Plugin URI: http://wp.tutsplus.com/tutorials/creative-coding/a-look-at-the-wordpress-http-api-a-practical-example-of-wp_remote_get/
* Description: Retrieves the number of followers and latest Tweet from your Twitter account.
* Version: 1.0.0
* Author: Tom McFarlin
* Author URI: http://tommcfarlin.com/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@bueltge
bueltge / post-process.php
Created June 24, 2011 21:08
WordPress Custom Post Type: Insert post via Frontend
<?php
/**
* post-process.php
* make sure to include post-process.php in your functions.php. Use this in functions.php:
*
* get_template_part('post-process');
*
*/
function do_insert() {
if( 'POST' == $_SERVER['REQUEST_METHOD']
@bueltge
bueltge / author-filter-meta-box.php
Created August 1, 2012 11:27
Add a meta box to WordPress edit posts and list only authors
<?php
/**
* Plugin Name: Author Meta Box only with authors
* Plugin URI: http://wordpress.stackexchange.com/questions/60429/stop-loading-collaborators-users-on-add-new-post-or-page
* Description:
* Author: Frank Bültge
* Author URI: http://bueltge.de
* License: GPLv3
*/
add_action( 'admin_menu', 'fb_remove_author_meta_boxes' );
@bueltge
bueltge / keep_me_logged_in_for_1_year.php
Last active January 4, 2023 10:39
WordPress Plugin, that set the time that the cookie will be kept at 1 year and active the 'Rember Me' Checkbox for default
<?php
/**
* Plugin Name: Keep me Logged In for 1 Year
* Plugin URI: https://bueltge.de/wordpress-login-unterbinden/1220/
* Description: Set the time that the cookie will be kept at 1 year.
* Version: 0.0.3
* Author: Frank Bültge
* Author URI: https://bueltge.de/
*/
@bueltge
bueltge / wp-plugin-security-testing-cheatsheet.md
Created August 22, 2016 12:12
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)