Skip to content

Instantly share code, notes, and snippets.

View styledev's full-sized avatar

Dewey Bushaw styledev

  • Speak4
  • Arlington, VA
View GitHub Profile
@styledev
styledev / site.js
Created October 29, 2012 08:40
My jQuery file upload call [failing resize]
// Functions Go Here
$(function(){ // on ready code goes here
var form = $('.direct-upload');
form.fileupload({
url: form.attr('action'),
type: 'POST',
// autoUpload: true,
dataType: 'xml', // This is really important as s3 gives us back the url of the file in a XML document
process: [
@styledev
styledev / Wordpress - Range Filter on Post Title
Created October 17, 2012 11:09
This will allow you to use /?range=a,e which will then return all posts with a post title that begins with an A,B,C,D,or E.
public function range_add($aVars) {
$aVars[] = "range";
return $aVars;
}
public function range_where( $where, $args ) {
if( !is_admin() ) {
$range = ( isset($args->query_vars['range']) ? $args->query_vars['range'] : false );
if( $range ) {
$range = split(',',$range);
$where .= "AND LEFT(wp_posts.post_title,1) BETWEEN '$range[0]' AND '$range[1]'";
@styledev
styledev / Parse Tweet Message to Link Entities
Last active March 24, 2016 16:24
This function will linkify your tweet messages from the Twitter API using include_entities=true
2012-05-29 13:22:55.009 osascript[72787:903] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
--- /Users/bushaw/Downloads/gravity-forms-update-post/gravityforms-update-post.php
+++ gravityforms-update-post.php
@@ -126,6 +126,22 @@
}
public function gform_pre_render($form) {
+ ?>
<?php
/**
* @package Order Up!
*/
/*
Plugin Name: Custom Taxonomy Order
Plugin URI: http://drewgourley.com/order-up-custom-ordering-for-wordpress/
Description: Allows for the ordering of categories and custom taxonomy terms through a simple drag-and-drop interface.
Version: 2.0
Author: Drew Gourley
@styledev
styledev / seo-friendly-images.php
Created May 14, 2012 23:50
Updated plugin file [fixes: wp_debug errors, variable misspelling, and code formatting]
<?php
/*
Plugin Name: SEO Friendly Images
Plugin URI: http://www.prelovac.com/vladimir/wordpress-plugins/seo-friendly-images
Description: Automatically adds alt and title attributes to all your images. Improves traffic from search results and makes them W3C/xHTML valid as well.
Version: 2.7.0
Author: Vladimir Prelovac
Author URI: http://www.prelovac.com/vladimir
@styledev
styledev / gfcptaddonbase.diff
Created April 17, 2012 01:57
Gravity Forms + Custom Post Types Plugin - Dropdown Selected Feature
2012-04-18 12:13:43.378 osascript[26429:903] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
--- /Users/bushaw/Desktop/gravity-forms-custom-post-types/gfcptaddonbase.php
+++ gfcptaddonbase.php
@@ -246,21 +246,24 @@
*/
function setup_post_type_field( &$field, $post_type ) {
$first_choice = $field['choices'][0]['text'];
- $field['choices'] = $this->load_post_type_choices( $post_type, $first_choice );