This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: KD Example! | |
* Version: v0.1 | |
* Author: Kelly Dwan | |
* Author URI: http://redradar.net/ | |
* Description: Using Chosen + Custom Meta Boxes | |
*/ | |
class KD_Example_Class { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Initialize the metabox class | |
function be_initialize_cmb_meta_boxes() { | |
if ( !class_exists( 'cmb_Meta_Box' ) ) { | |
require_once( 'libs/cmb-library/init.php' ); | |
} | |
} add_action( 'init', 'be_initialize_cmb_meta_boxes', 9999 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BIND=/tmp/php.socket | |
USER=www-data | |
PHP_FCGI_CHILDREN=5 | |
PHP_FCGI_MAX_REQUESTS=50 | |
PHP_CGI=/usr/bin/php-cgi | |
PHP_CGI_NAME=`basename $PHP_CGI` | |
PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND" | |
RETVAL=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.photo { | |
position: absolute; | |
right: 30px; | |
top: 50px; | |
} | |
.photo img { | |
padding: 10px; | |
background-color: white; | |
.box-shadow(2px 2px 4px rgba(0,0,0,.3)); | |
.rotate(3deg); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function vs_meetup_bp_fields($user, $meetup) { | |
global $wpdb; | |
$wpdb->insert( | |
$wpdb->prefix.'bp_xprofile_data', | |
array( | |
'field_id' => 2, // meetup ID | |
'user_id' => $user->id, | |
'value' => $meetup->id | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DRUPAL-TO-WORDPRESS CONVERSION SCRIPT | |
# Changelog | |
# 10.02.2012 - Updated by Kelly Dwan !! THIS VERSION HAS NOT BEEN TESTED !! | |
# 07.29.2010 - Updated by Scott Anderson / Room 34 Creative Services http://blog.room34.com/archives/4530 | |
# 02.06.2009 - Updated by Mike Smullin http://www.mikesmullin.com/development/migrate-convert-import-drupal-5-to-wordpress-27/ | |
# 05.15.2007 - Updated by D’Arcy Norman http://www.darcynorman.net/2007/05/15/how-to-migrate-from-drupal-5-to-wordpress-2/ | |
# 05.19.2006 - Created by Dave Dash http://spindrop.us/2006/05/19/migrating-from-drupal-47-to-wordpress/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function display_meta_box( $post, $args ) { | |
// Get the date (if this is a post) we're editing | |
$archive_date = get_post_meta( $post->ID, '_guns-archive-date', true ); | |
if ( ! $archive_date ) | |
$archive_date = date( 'F d, Y' ); | |
else | |
$archive_date = date( 'F d, Y', $archive_date ); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add Press Custom Post Type Metaboxes | |
*/ | |
add_action( 'add_meta_boxes', 'add_press_metaboxes' ); | |
// Add the Press Meta Boxes | |
function add_press_metaboxes() { | |
add_meta_box('press_publish_date', 'Published Date', 'press_publish_date', 'press', 'normal', 'high'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Use WP_Query, not query_posts. | |
* get_posts is an OK alternative, but is basically a | |
* wrapper for WP_Query; and using WP_Query directly lets us | |
* use `$my_query->the_post();` which sets up the global $post | |
* object -- so that we can use the `the_*` functions. | |
* http://codex.wordpress.org/Class_Reference/WP_Query#Usage | |
*/ | |
$my_query = new WP_Query(array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: MP6 Color Scheme | |
*/ | |
function kd_mp6_add_colors() { | |
// Check that MP6 exists and that our new function exists | |
if ( ! defined( 'MP6' ) || ! function_exists( 'mp6_add_admin_colors' ) ) | |
return; | |
mp6_add_admin_colors( 'sunset', array( |
OlderNewer