Skip to content

Instantly share code, notes, and snippets.

View franz-josef-kaiser's full-sized avatar

Franz Josef Kaiser franz-josef-kaiser

View GitHub Profile
@franz-josef-kaiser
franz-josef-kaiser / get_started_header.html
Last active October 11, 2015 15:07
Example MarkUp for the WP 3.5 »Get started« header
<div class="get-started-container">
<div class="row">
<div class="next-steps edit-front-page"><p><span class="icon"></span>Edit your front page</p></div>
<div class="more-actions learn-more"><p><span class="icon"></span>Learn more about getting started</p></div>
</div>
<hr />
<div class="row">
<div class="next-steps add-pages"><p><span class="icon"></span>Add additional pages</p></div>
@franz-josef-kaiser
franz-josef-kaiser / wpse.md
Created October 18, 2012 17:16
Comments for WPSE
@franz-josef-kaiser
franz-josef-kaiser / paranoia-config.php
Last active July 29, 2022 10:01
WordPress debug - Error Reporting Level: Paranoia
<?php
define( 'DS', DIRECTORY_SEPARATOR );
# ==================================
# PHP errors & log
error_reporting(
E_ALL | E_STRICT | E_CORE_ERROR | E_CORE_WARNING
| E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE
| E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR
);
# OR: shorter and all together
@franz-josef-kaiser
franz-josef-kaiser / wwII_crypted_pigeon_msg.txt
Created November 23, 2012 16:55
WWII crypted message found in a chimney on the leg of a pigeon
# WWII message - crypted.
# @link VIDEO: BBC short intro | http://www.bbc.co.uk/news/uk-20456782
# @link IMAGE: Flattened | http://goo.gl/UbD73
# @link IMAGE: Outtake | http://cdn.themis-media.com/media/global/images/library/deriv/121/121241.jpg
# Britain's top code-breaker experts at the intelligence agency GCHQ say they are stumped.
# They say it may be impossible to decode it without more information - some of which could come from the public.
# "The aluminum ring found on the bird’s leg tells us it was born in 1940 and we know it’s an Allied Forces pigeon because of the red capsule it was carrying, but that’s all we know." - Colin Hill, National Code Center at Bletchley Park
# This might be you.
@franz-josef-kaiser
franz-josef-kaiser / client_admin_notices.php
Last active August 30, 2019 13:04
Gibt für Kunden Notizen über Änderungen zu WordPress im Adminbereich aus.
<?php
/**
* Plugin Name: Info zu WP-Änderungen
* Description: Informiert Kunden über Änderungen im WordPress Core, der Sprachdatei, etc.
* Version: 15122012.1423
* Author: Franz Josef Kaiser <wecodemore@gmail.com>
* Author URI: https://plus.google.com/107110219316412982437/posts
* License: The MIT License (MIT)
* LicenseURI: http://www.opensource.org/licenses/mit-license.php
*/
@franz-josef-kaiser
franz-josef-kaiser / dashboard_widget_recently_edited_files.php
Last active December 10, 2015 01:48
Show the last X recently edited files in a dashboard widget
<?php
defined( 'ABSPATH' ) OR exit;
/**
* Plugin Name: (#64910) (Dashboard Widget) Last edited files
* Description: Lists the last edited files in a dashboard widget
* Author: Franz Josef Kaiser <wecodemore@gmail.com>
* Author URL: https://plus.google.com/107110219316412982437
* License: MIT
*/
@franz-josef-kaiser
franz-josef-kaiser / upgrade_bypass_SSL.php
Created January 19, 2013 10:54
Bypass the SSL check during updates as WordPress MU-Plugin.
<?php
/**
* Plugin Name: Upgrade SSL Bypass
* Description: The DB-Upgrade process for networks does not work if there's an error with your SSL certificate. This plugin bypasses the check by disabling the verification in case of an error.
* Version: 2013-01-02.1502
* Author: Franz Josef Kaiser <wecodemore@gmail.com>
* Author URI: http://unserkaiser.com
* License: The MIT License (MIT)
* LicenseURI: http://www.opensource.org/licenses/mit-license.php
*/
@franz-josef-kaiser
franz-josef-kaiser / iso_639-2.json
Created January 20, 2013 22:55
ISO 639-2 JSON file that contains different international as well as local names for languages. The file is sorted by the ISO 639-2 language codes
{
"aar":
{
"int":["Afar"],
"native":["Afaraf"]
},
"aa":
{
"int":["Afar"],
"native":["Afaraf"]
@franz-josef-kaiser
franz-josef-kaiser / curl_dump.php
Last active May 22, 2022 14:57
Debug and dump a WordPress cURL Request and it's response during a WP HTTP API call.
<?php
/**
* Plugin Name: Dump WP HTTP API cURL Request & Response
* Author: Franz Josef Kaiser
*/
add_action( 'plugins_loaded', array( 'WPSE81791_cURL', 'init' ) );
class WPSE81791_cURL
{
protected static $instance;
@franz-josef-kaiser
franz-josef-kaiser / sys_bot.php
Last active August 4, 2020 06:29
Creates and maintains the SysBot User (which has the role of "editor"). Purpose of this bot user: You're importing data into a WordPress CustomPostType (for e.g.: via a HTTP request). During import/fetch you need a user who is the author of those CPTs posts. You could go with a fake ID, but this will successfully prevent you to use taxonomies, a…
<?php
defined( 'ABSPATH' ) OR exit;
/**
* Plugin Name: SysBot
* Description: Creates and maintains the SysBot User (which has the role of "editor")
* Author: Franz Josef Kaiser
*/
# PUBLIC API #
function get_bot()