Skip to content

Instantly share code, notes, and snippets.

View naomicbush's full-sized avatar

Naomi C. Bush naomicbush

View GitHub Profile
<?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
@bueltge
bueltge / gist:757903
Created December 28, 2010 23:27
This WordPress Plugin demonstrates how you can build your own plugin pages using the WordPress provided draggable metaboxes, requires WordPress 2.7 version, supports WordPress 2.8 changed boxing layout engine
<?php
/*
Plugin Name: HowTo Plugin
Plugin URI:
Description: This Plugin demonstrates how you can build your own plugin pages using the WordPress provided draggable metaboxes, requires WordPress 2.7 version, supports WordPress 2.8 changed boxing layout engine
Author: Heiko, Frank
Author URI: http://bueltge.de
Version: 0.1
License:
@bueltge
bueltge / wp-hooks-filter.php
Created May 31, 2011 08:07
Instruments Hooks for a Page of WordPress. Outputs during the Shutdown Hook after add get-params: ?instrument=hooks
<?php
/*
Plugin Name: Instrument Hooks for WordPress
Plugin URI: http://bueltge.de/
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook after add get-params <code>?instrument=hooks</code>.
Version: 0.0.1
Author: Frank B&uuml;ltge
Author URI: http://bueltge.de/
*/
@scribu
scribu / plugin-deploy.sh
Created August 4, 2011 12:18
Plugin deploy
#!/usr/bin/env bash
# args
MSG=${1-'deploy from git'}
BRANCH=${2-'trunk'}
# paths
SRC_DIR=$(git rev-parse --show-toplevel)
DIR_NAME=$(basename $SRC_DIR)
DEST_DIR=~/svn/$DIR_NAME/$BRANCH
@jasonrudolph
jasonrudolph / about.md
Last active January 6, 2024 07:40
Programming Achievements: How to Level Up as a Developer
@boonebgorges
boonebgorges / gist:1331676
Created November 1, 2011 19:39
Display BuddyPress group content in the context of the associated groupblog
<?php
/**
* Does the grunt work
*/
function bbg_test_groupblog_idea2() {
global $wpdb, $bp, $current_blog;
// Never do this on the root blog
if ( bp_is_root_blog() )
# custom login link
RewriteRule ^login$ http://localhost/whitelabel/wp-login.php [NC,L]
@mikeschinkel
mikeschinkel / parks-and-features.php
Created November 5, 2011 23:16
Plugin demonstrates how to route parent post/child post URLs WordPress 3.3
<?php
/**
* Plugin Name: MMC Parks and Features
* Description: This plugin demonstrates how to route parent/child URLs like http://example.com/parks/yosemite/half-dome/in WordPress 3.3
* Author: Mike Schinkel
* Author URL: http://about.me/mikeschinkel
* Notes:
* To answer http://lists.automattic.com/pipermail/wp-hackers/2011-November/041486.html
* Assumes a metabox that sets $post->post_parent field for a park feature with it's park's $post->ID.
*
@Rarst
Rarst / deprecated.md
Last active February 21, 2023 11:21
WordPress coding standards configuration for PhpStorm

Now Native

PhpStorm now bundles WordPress coding style natively, starting from version 8.

  1. Go to Project Settings > Code Style > PHP.
  2. Select Set From... (top right of window) > Predefined Style > WordPress.

No longer need to muck with this import! :)

@mikeschinkel
mikeschinkel / Sunrise_for_WordPress.xml
Created December 1, 2011 23:50
Sunrise for WordPress Coding Standards for PhpStorm
<?xml version="1.0" encoding="UTF-8"?>
<code_scheme name="Sunrise for WordPress">
<option name="USE_SAME_INDENTS" value="true" />
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
<option name="USE_TAB_CHARACTER" value="true" />
<option name="SMART_TABS" value="false" />