Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Searching for talents

Frank Bültge bueltge

:octocat:
Searching for talents
View GitHub Profile
@bueltge
bueltge / restrict-mime-types.php
Created Dec 15, 2011
Restrict list of allowed mime types and file extensions.
View restrict-mime-types.php
<?php
/**
* Plugin Name: Restrict mime types
* Plugin URI: http://wpengineer.com/?p=2369
* Description: Restrict list of allowed mime types and file extensions.
* Version: 1.0.0
* License: GPLv3
* Author: Frank B&uuml;ltge
* Author URI: http://bueltge.de/
*/
@bueltge
bueltge / wpse71248-del-revisions.php
Created Nov 5, 2012
WordPress SE 71248: Delete revisions on post publish
View wpse71248-del-revisions.php
<?php
/**
* Plugin Name: WPSE71248 Delete Revions on Publish Posts
* Plugin URI: http://wordpress.stackexchange.com/questions/71248/
* Description:
* Version: 1.0.0
* Author: Frank Bültge
* Author URI: http://bueltge.de
* License: GPLv3
*/
View adsense-after-more-tag.php
<?php
/**
* Plugin Name: Adsense after more-Tag
* Description: Add content of var $extra_more after more-Tag
* Version: 0.0.1
* Author: Frank Bültge
* Author URI: http://bueltge.de/
*/
! defined( 'ABSPATH' ) and exit;
@bueltge
bueltge / gist:6104254
Created Jul 29, 2013
A Look at the WordPress HTTP API: A Practical Example of wp_remote_get
View gist:6104254
<?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 / Mime-Types.php
Last active Feb 21, 2021
Change and Allow other mime types on upload
View Mime-Types.php
<?php
/**
* Plugin Name: Mime Types
* Description: Allow other mime types on upload
* Plugin URI:
* Version: 1.0.0
* Author: Frank Bültge
* Author URI: http://bueltge.de
* License: GPLv2
* License URI: ./assets/license.txt
@bueltge
bueltge / wp-fix-enqueued-script-style-https.php
Last active Feb 21, 2021
Fix some badly enqueued scripts with no sense of HTTPS for the back end only.
View wp-fix-enqueued-script-style-https.php
<?php
/**
* Plugin Name: https Fix for enqueue scripts/styles
*/
// Fix some badly enqueued scripts with no sense of HTTPS for the back end only.
// Kudos to http://snippets.webaware.com.au/snippets/cleaning-up-wordpress-plugin-script-and-stylesheet-loads-over-ssl/
add_action( 'wp_print_scripts', 'fb_enqueueScriptsFix', 100 );
add_action( 'wp_print_styles', 'fb_enqueueStylesFix', 100 );
@bueltge
bueltge / listing-13-1.php
Last active Feb 21, 2021 — forked from WordPress-Handbuch/listing-13-1.php
Plugin to include only specific plugins in the automatic updates
View listing-13-1.php
<?php
/**
* Plugin Name: Control plugin update.
* Description: xyz
* Plugin URI: https://wpbuch.com/listing-13-1
* Version: 1.0.0
* Author:
* Author URI:
* Licence: GPLv2+
*/
@bueltge
bueltge / attachment-taxononimies.php
Created Dec 6, 2012
WordPress Attachment Taxonomies with WP 3.5*
View attachment-taxononimies.php
<?php
/**
* Plugin Name: Attachment Taxonomies
* Plugin URI: attachment_taxonomies
* Text Domain: addquicktag
* Domain Path: /languages
* Description:
* Version: 1.0.0
* Author: Frank Bültge
* Author URI: http://bueltge.de
@bueltge
bueltge / post-process.php
Created Jun 24, 2011
WordPress Custom Post Type: Insert post via Frontend
View post-process.php
<?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 / wp-i18n-cheatsheet.md
Last active May 20, 2020
WordPress i18n Cheatsheet
View wp-i18n-cheatsheet.md

WordPress i18n CheatSheet

Whenever I write plugins or themes, there is one thing that needs a little extra attention and is quite frankly hard to get right: Translatable text. This list should helps me to find the right way fast.

Props to Alex Kirk, there list it inside a quiz.

You want to output the username in a sentence.

Assume that the $username has been escaped using esc_html().