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
@kevinkace
kevinkace / screen.css
Created December 21, 2010 20:39
Add varying amounts of padding or margin to elements.
/* --------------------------------------------------------------
screen.css
* Add varying amounts of padding or margin to elements.
* Naming convention:
- First letter denotes padding (p) or margin (m).
- Second letter denotes where spacing is applied:
a - all sides
t - top
r - right
@mikeschinkel
mikeschinkel / wp-post-counts-for-user-by-post-type.php
Created October 24, 2010 07:06
Adds Post Counts by Post Type per User in the User List withing WordPress' Admin console (URL path => /wp-admin/users.php)
<?php
/*
Adds Post Counts by Post Type per User in the User List withing WordPress' Admin console (URL path => /wp-admin/users.php)
Written for: http://wordpress.stackexchange.com/questions/3233/showing-users-post-counts-by-custom-post-type-in-the-admins-user-list
By: Mike Schinkel (http://mikeschinkel.com)
Date: 24 October 2010
*/
@scribu
scribu / gist:642361
Created October 23, 2010 16:04
get_ascii_array()
<?php
/**
* Returns an array containing the ASCII codes of a string (useful for decomposition)
* Example: print_r(get_ascii_array('ș'))
*
* @param string $str
* @return array
*/
function get_ascii_array($str) {
@scribu
scribu / category-custom-fields.php
Created October 8, 2010 13:24
Category Custom Fields
<?php
/*
Plugin Name: Category Custom Fields
Author: scribu
*/
class Category_Custom_Fields {
function init() {