Skip to content

Instantly share code, notes, and snippets.

Avatar
Always interested

Frank Bültge bueltge

Always interested
View GitHub Profile
@GaryJones
GaryJones / big-brother.php
Created Oct 2, 2014
Big Brother eviction of @tarendai's Davina swear.
View big-brother.php
<?php
// Solution for https://github.com/Tarendai/davina
/**
* Remove filter or action method added from an unassigned object.
*
* Solves the immediate case. Not bothered to generalise it.
*
* @global array $wp_filter Storage for all of the filters and actions.
View gist:502421
<?php
/*
Handles URL Rewriting in WordPress 3.0 like this:
fastigheter-spanien/X -> property/X&lang=sv
fastigheter-usa/X -> property/X&lang=sv
properties-spain/X -> property/X&lang=en
properties-usa/X -> property/X&lang=en
@janfabry
janfabry / resize-img-tags.php
Created Nov 13, 2010
WordPress Resize img tags plugin (first public attempt)
View resize-img-tags.php
<?php
/*
Plugin Name: Resize img tags
Plugin URI: http://www.monkeyman.be
Description: Change image src's based on width and height specified in tag
Version: 0.1
Author: Jan Fabry
This plugin rewrites <img> tags so that the src contains width and height information. It is supposed to be used together with a plugin that can generate these resized images on the fly, like monkeyman-on-demand-resizer.
@hakre
hakre / theme-napkin.php
Created Feb 8, 2011
Theme Napkin Wordpress Plugin - Safeguard unintended output generated by theme bootstrap code (functions.php).
View theme-napkin.php
<?php
/**
* Theme Napkin Wordpress Plugin
*
* Safeguard unintended output generated by theme bootstrap code (functions.php).
*
* Copyright 2011 by hakre <http::/hakre.wordpress.com>, some rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@franz-josef-kaiser
franz-josef-kaiser / script_deamon.php
Created Jun 10, 2011
WordPress Plugin to check your DataBase for injected links
View script_deamon.php
<?php
/**
Plugin Name: AntiScript deamon
Plugin URI: https://github.com/franz-josef-kaiser
Description: Removes script-links to spam sites from your post content after your site got hacked. Please go to <a href="tools.php?page=script_deamon.php">Tools &rarr; Remove Hack</a>. Thank you. Proudly brought to you by <a href="http://example.com">Franz Josef Kaiser</a>.
Version: 0.1
Author: Franz Josef Kaiser
Author URI: https://github.com/franz-josef-kaiser
License: GPL2
WP-Version: Tested in 2.7.1, 2.9.2, 3.0
@mikeschinkel
mikeschinkel / TCB_JSON_API.php
Created Nov 2, 2011
Creates JSON class for Tom C. Barret to load tickets via a RESTful API
View TCB_JSON_API.php
<?php
/**
* Creates JSON class for Tom C. Barrett to load tickets via a RESTful API:
*
* @example:
*
* URL: http://example.com/api/ticket/12345
*
* @see:
*
@RalfAlbert
RalfAlbert / testplugin.php
Created Nov 17, 2011
A very (very, very) simple unittest for WordPress
View testplugin.php
<?php
/*
Plugin Name: WordPressTests
Plugin URI:
Description: Automated testing of WordPress
Version: 0.0.1-dev01
Author: Ralf Albert
Author URI: http://yoda.neun12.de
*/
@mikeschinkel
mikeschinkel / root-based-category-urls.php
Created Dec 2, 2011
Enabled Root-based Category URLs in WordPress (Any bugs? Post comments below.)
View root-based-category-urls.php
<?php
/*
* Plugin Name: Root-based Category URLs
* Description: Enables root-based Category URLs, i.e. Makes /category/my-category/ URLs route as /my-category/
* Author: Mike Schinkel
* Author URI: http://about.me/mikeschinkel
* Plugin URI: https://gist.github.com/1421235
* Version: 0.1.1
* License: GPL 2+
*/
View register_custom_post_types.php
<?php
/**
* Meine Dokumentation zu der Funktion xyz die dafuer sorgt das XYZ etwas macht
*
* @autor Rene Reimann
* @package Theme XYZ
*/
if ( ! class_exists( 'register_custom_post_types' ) ) {
@kovshenin
kovshenin / options.php
Created Apr 23, 2012
Reusable Settings API fields
View options.php
<?php
/**
* Text Field
*
* A simple text field callback to use with the Settings API. Don't forget to pass in
* the arguments array. Here's an example call to add_settings_field() :
*
* add_settings_field( 'my_option', __( 'My Option' ), 'foo_field_text', 'theme_options', 'general', array(
* 'name' => 'my_theme_options[my_option]',
* 'value' => $options['my_option'], // assuming $options is declared