Skip to content

Instantly share code, notes, and snippets.

@RalfAlbert
RalfAlbert / gist:846666
Created February 27, 2011 23:01
help.xml & xml.php
help.xml
========
<?xml version="1.0" encoding="utf-8" ?>
<help_context>
<screen>
<object>example a</object>
<name>testname a</name>
<id>_testid_a</id>
@RalfAlbert
RalfAlbert / ExtendedHelp.php
Created March 8, 2011 02:04
Extended Help
<?php # -*- coding: utf-8 -*-
/*
Plugin Name: Extended Help
Description: Help texts for super heroes
Version: 0.1
Author: Thomas Scholz
Author URI: http://toscho.de
License: GPL
*/
@RalfAlbert
RalfAlbert / gist:865951
Created March 11, 2011 14:35
WordPress - cipher user_nicename when using get_author_posts_url
<?php
/*
Plugin Name: Cipher Author in get_author_posts_url
Plugin URI: http://yoda.neun12.de/artikel-29/2
Description: Cipher the author nicename when using get_author_posts_url()
Version: 1.0
Author: Ralf Albert
Author URI: http://neun12.de
*/
@RalfAlbert
RalfAlbert / gist:1090596
Created July 18, 2011 20:41
Google+ Button Datenschutzkonform
$(document).ready( function(){
$('#gplus').click( function(){
jQuery.getScript( 'https://apis.google.com/js/plusone.js' );
$('#gplus').remove();
});
});
@RalfAlbert
RalfAlbert / gist:1090650
Created July 18, 2011 21:04
Google+ Button Datenschutzkonform mit iFrame
$(document).ready( function(){
$('#gplus').click( function(){
var l = window.location;
var url = encodeURIComponent( l.href );
var parent = encodeURIComponent( l.href.replace( l.pathname, '' ) );
var gframe = '<iframe src="https://plusone.google.com/u/0/_/+1/button?'
+ 'url=' + url
+ '&amp;size=standard' +
@RalfAlbert
RalfAlbert / figure.htm
Created September 13, 2011 19:41
figure-Tag Demo
<!DOCTYPE html>
<html>
<head>
<title>figure-Tag</title>
<style type="text/css">
.container, .links, .rechts { float:left; padding:5px; margin: 2px }
.container { width:600px }
.links { border:1px solid red }
.rechts { border:1px solid blue }
@RalfAlbert
RalfAlbert / class-wordpress-breadcrumb.php
Created September 25, 2011 08:55 — forked from ocean90/class-wordpress-breadcrumb.php
Breadcrumb Navigation for WordPress
<?php
/**
* Breadcrumb Navigation for WordPress.
*
* @author Dominik Schilling
* @author Ralf Albert
* @license GPLv2
* @link http://wpgrafie.de/204/
*
* @version 0.2
@RalfAlbert
RalfAlbert / codeeditor.php
Created November 14, 2011 03:06
WP Advanced Code Editor (new version)
<?php
/*
Plugin Name: WP Advanced Code Editor
Plugin URI: http://www.techlyzer.com/wp-advanced-code-editor
Description: Integrates the EasyArea advanced code editor to WordPress, complete with syntax hilighting, line numbering, and full screen editing! Not compatabile with the WYSIWYG editor. Turn it off!
Author: John Kolbert
Version: 1.0
Author URI: http://www.techlyzer.com/
Copyright Notice
@RalfAlbert
RalfAlbert / testplugin.php
Created November 17, 2011 21:31
A very (very, very) simple unittest for WordPress
<?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
*/
@RalfAlbert
RalfAlbert / is_serialized.php
Created December 3, 2011 14:17
test on serialized data
<?php
error_reporting(E_ALL);
$data = array();
$data[] = serialize( array( 1, 2, 3, array( 'een', 'twee', 'tree' ) ) );
$data[] = 'a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;a:3:{i:0;s:3:"een";i:1;s:4:"twee";i:2;s:4:"tree";}}';
$data[] = 'a:{i0;i1;i1;i2;i2;i3;i3;a:{i0;s:"een";i1;s:"twee";i2;s:"tree";}}';
$data[] = serialize( 'blah' );
$data[] = 'blah';