Skip to content

Instantly share code, notes, and snippets.

jQuery(function($){
$('.gform_fields input[type="text"], .gform_fields input[type="email"], .gform_fields input[type="tel"], .gform_fields textarea').fadeLabel();
});
@solepixel
solepixel / wave-drag-drop.js
Last active September 16, 2015 16:30
Drag and Drop Script for Wave
(function($) {
var waveDragDrop = {
init: function(){
this.setupInvoiceDragDrop();
this.setupEstimateDragDrop();
},
setupInvoiceDragDrop: function(){
<?php
/**
* Plugin Name: PluginName
* Plugin URI: http://websiteurl
* Description: Description
* Version: 1.0
* Author: Brian DiChiara
* Author URI: http://www.briandichiara.com
*/
<?php
if(class_exists('Plugin')) return;
class Plugin {
var $debug = false;
var $admin_page = 'plugin';
var $settings = array();
var $errors = array();
<?php
$start_section = array();
$my_section = array();
$end_section = array();
$started = false;
foreach ($arr as $item) {
if (strpos($item, '?param=my_val') !== false) {
$my_section[] = $item;
$started = true;
@solepixel
solepixel / CTXPS_Security.php
Last active December 16, 2015 08:39
PHP warnings fix
<?php
// ...
/* Line 91 */
public static function filter_loops($content){
global $current_user;
//Get plugin options
$dbOpts = get_option('contexture_ps_options');
@solepixel
solepixel / get-page-shortcode.php
Last active December 16, 2015 10:29
WordPress shortcode to get a page's content
<?php
add_shortcode('get-page', 'mytheme_get_page');
function mytheme_get_page($atts=array(), $content=NULL){
extract(shortcode_atts(array(
'page' => NULL
), $atts));
if(!$page){
return '';
}
@solepixel
solepixel / delete-them-all.php
Last active December 17, 2015 23:19
Delete Them All Plugin for WordPress
<?php
/**
* Plugin Name: Delete Them All!
* Plugin URI: http://infomedia.com
* Description: Delete ALL posts and associated data, leaving your database nice and clean!
* Version: 1.0
* Author: Brian DiChiara
* Author URI: http://www.briandichiara.com
*/
@solepixel
solepixel / stacked-date.php
Last active December 19, 2015 00:49
Stacked Date
$prefix = hybrid_get_prefix();
add_filter( "{$prefix}_byline", 'wwon_byline');
function wwon_byline($byline){
if(!is_single()){
$byline = '<div class="post-date">
<span class="post-date-month">'.get_the_date('M').'</span>
<span class="post-date-day">'.get_the_date('d').'</span>
</div>
@solepixel
solepixel / image-widget.php
Created August 25, 2013 14:48
Suggested change for Tri.be Image Widget plugin, image-widget/image-widget.php, See line 32 and 84 for changes.
<?php
class Tribe_Image_Widget extends WP_Widget {
// ...
private function get_image_html( $instance, $include_link = true ) {
// Backwards compatible image display.
if ( $instance['attachment_id'] == 0 && $instance['image'] > 0 ) {