Skip to content

Instantly share code, notes, and snippets.

View curtismchale's full-sized avatar

Curtis McHale curtismchale

View GitHub Profile
@curtismchale
curtismchale / remove-poll-daddy.php
Created February 10, 2012 20:37
remove polldaddy from content
/**
* Removing the poll from the main content since
* we push it in to the sidebar
*
* @since 1.0
*/
function sfn_remove_poll_daddy( $content = null ){
global $post;
$content = $post->post_content;
@curtismchale
curtismchale / remove-images.php
Created February 10, 2012 20:38
remove images from content
function sfn_remove_the_images( $content = null ){
global $post;
if( $post->post_type == 'post' && !empty( $post->post_content ) ){
$content = $post->post_content;
$content = preg_replace('/<img[^>]+./','', $content);
}
@curtismchale
curtismchale / comment_form.php
Last active June 20, 2016 22:19
Adds required inside labels
/**
* Changes the default WordPress comment form fields to match the way I like them, with the required * inside
* the label.
*
* @param array $fields req The default fields for WordPress comment forms
* @return array The fields the way we want them to look
*
* @uses wp_get_current_user
* @uses get_option
*
@curtismchale
curtismchale / woocommerce-stars.less
Created July 10, 2013 23:33
LESS for giving us star ratings in WooCommerce.
/* === star ratings === */
.woocommerce, .woocommerce-page{
.star-rating{
float: right;
overflow: hidden;
position: relative;
height: 1em;
line-height: 1em;
font-size: 1em;

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@curtismchale
curtismchale / mastermind-format
Created September 4, 2013 19:55
Basic format for mastermind notes
Billy Bob Thorton wasn't here because he was abducted by aliens again.
### $name
- point form covering what they talk about during the call
- include goals that are accomplished
**Goals from last week**
**Goals**
@curtismchale
curtismchale / Three Wise Monkeys.md
Last active November 12, 2021 20:15 — forked from malarkey/Three Wise Monkeys.md
The NDA I use.

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

/**
* Builds out the custom post types for the site
*
* @uses register_post_type
*
* @since 1.0
* @author SFNdesign, Curtis McHale
*/
function add_cpt(){
@curtismchale
curtismchale / edd-purchase-links-top-of-content.php
Created June 24, 2014 17:36
Moves the EDD Purchase button (and variations) to the top of the content instead of placing it at the bottom. Removes the original purchase links so they don't show up twice. Blogged: http://wp.me/p1Fud2-1of June 26, 2014
<?php
function demo_shortcode(){
$args = array(
'post_type' => 'product',
'meta_query'=> array(
'relation' => 'OR',
array(
'key' => 'some_key',
'value' => '42',
'compare' => 'IN',