Skip to content

Instantly share code, notes, and snippets.

@bryceadams
bryceadams / EDD Add to Cart + Checkout
Created September 7, 2012 03:07
Easy Digital Downloads - Add to Cart and redirect to Checkout Page
<a href="<?php echo edd_get_checkout_uri(); ?>?edd_action=add_to_cart&download_id=<?php echo get_the_ID(); ?>">Add to Cart</a>
@bryceadams
bryceadams / gist:3704174
Created September 12, 2012 03:49
Type Taxonomy (Breaks Media Uploader)
register_taxonomy( 'type', array('portfolio') );
@bryceadams
bryceadams / gist:3704185
Created September 12, 2012 03:52
Type Taxonomy - Stops Media Library Breaking
register_taxonomy( 'portfolio_type', array('portfolio') );
@bryceadams
bryceadams / gist:3705492
Created September 12, 2012 09:20
Hide Wordpress calendar widget title
// hide calendar widget title when no title has been added
function bryce_widget_title($title) {
return $title == '&nbsp;' ? '' : $title;
}
add_filter('widget_title', 'bryce_widget_title');
@bryceadams
bryceadams / gist:3710044
Created September 12, 2012 21:25
Child Theme Header
Theme Name: Your child theme name
Description: Your child theme description
Author: Your name here
Template: digigit
(optional values you can add: Theme URI, Author URI, Version)
*/
@import url("../digigit/style.css");
@bryceadams
bryceadams / gist:3712917
Created September 13, 2012 08:37
Just Gist Link
https://gist.github.com/3056893
@bryceadams
bryceadams / gist:3727064
Created September 15, 2012 09:12
Doci - edd_get_download_earnings_stats()
$earnings = edd_get_download_earnings_stats( $download_id );
@bryceadams
bryceadams / gist:3727079
Created September 15, 2012 09:16
Doci - edd_update_discount
apply_filters( 'edd_insert_discount', $discount_details);
@bryceadams
bryceadams / gist:3727095
Created September 15, 2012 09:23
Doci - edd_post_insert_discount
do_action( 'edd_post_insert_discount', $discount_details );
@bryceadams
bryceadams / gist:3727582
Created September 15, 2012 12:27
Doci - edd_price()
edd_price($download_id); // will output something like $10