Skip to content

Instantly share code, notes, and snippets.

View SeanChDavis's full-sized avatar
👋
Reach out.

Sean Christopher Davis SeanChDavis

👋
Reach out.
View GitHub Profile
@SeanChDavis
SeanChDavis / gist:a29d319b870d7b153151
Created June 23, 2015 17:33
Vendd filter - author sign up date in single download sidebar/
// global
add_filter( 'vendd_show_single_download_author_since', '__return_false' );
// download-specific
function example_vendd_show_single_download_author_since( $show_author_since, $post ) {
if ( $post->ID == 123 ) {
$show_author_since = false;
}
return $show_author_since;
}
@SeanChDavis
SeanChDavis / gist:e4e9aab7ba0f3731092c
Created June 23, 2015 17:31
Vendd filter - author name in single download sidebar
// global
add_filter( 'vendd_show_single_download_author_name', '__return_false' );
// download-specific
function example_vendd_show_single_download_author_name( $show_author_name, $post ) {
if ( $post->ID == 123 ) {
$show_author_name = false;
}
return $show_author_name;
}
@SeanChDavis
SeanChDavis / gist:fb100b44e43fa6938301
Created June 23, 2015 17:30
Vendd filter - author avatar in single download sidebar
// global
add_filter( 'vendd_show_single_download_author_avatar', '__return_false' );
// download-specific
function example_vendd_show_single_download_author_avatar( $show_author_avatar, $post ) {
if ( $post->ID == 123 ) {
$show_author_avatar = false;
}
return $show_author_avatar;
}
@SeanChDavis
SeanChDavis / gist:aa873dcc063be82903fe
Created June 23, 2015 17:27
Vendd filter - author info in single download sidebar
// global
add_filter( 'vendd_show_single_download_author_details', '__return_true' );
// download-specific
function example_vendd_show_single_download_author_details( $show_author_details, $post ) {
if ( $post->ID == 123 ) {
$show_author_details = true;
}
return $show_author_details;
}
@SeanChDavis
SeanChDavis / gist:739cc6f84565a04512f1
Last active August 29, 2015 14:23
Vendd filter - author info on [downloads] shortcode items
// author info on [downloads] shortcode items
add_filter( 'vendd_show_downloads_byline', '__return_true' );
@SeanChDavis
SeanChDavis / partial-checkout_cart.php
Last active January 21, 2016 19:29
EDD Add Checkout Cart Item Permalinks
<?php // DO NOT COPY THIS LINE
/**
* The goal is to link the line items back to their original products from the checkout cart
*
* To override the checkout_cart.php file, see here: https://easydigitaldownloads.com/videos/template-files/
*/
// FIND:
@SeanChDavis
SeanChDavis / gist:02719bbfb3f7d5932a55
Created June 14, 2015 22:25
EDD FES Change Vendor Dashboard Login Form Title
function sd_change_fes_login_form_title( $content ) {
$content = str_replace( 'Login', 'Sign In to your Vendor Dashboard', $content );
return $content;
}
add_action( 'fes_login_form_header', 'sd_change_fes_login_form_title', 999 );
@SeanChDavis
SeanChDavis / gist:acfc51f246c433e729ac
Created June 14, 2015 19:46
EDD Content Before Purchase Submit Button
function sd_before_purchase_submit_button() {
?>
<div>You can place HTML content here.</div>
<?php
}
add_action( 'edd_purchase_form_before_submit', 'sd_before_purchase_submit_button', 9999 );
RewriteRule ^themes/(.*)$ downloads/$1 [R=301,L]
RewriteRule ^extensions/24190.*$ downloads/plugnpay/ [R=301,L]
RewriteRule ^extensions/product-updates.*$ downloads/edd-product-updates/ [R=301,L]
RewriteRule ^extensions/sales-recovery.*$ downloads/edd-sales-recovery/ [R=301,L]
RewriteRule ^extensions/stripe-payment-gateway.*$ downloads/stripe-payment/ [R=301,L]
RewriteRule ^extensions/tenderapp.*$ downloads/tenderapp-single-sign-on/ [R=301,L]
RewriteRule ^extensions/textmagic.*$ downloads/textmagic-integration/ [R=301,L]
RewriteRule ^extensions/upload-file.*$ downloads/edd-upload-file/ [R=301,L]
RewriteRule ^extensions/usaepay.*$ downloads/usaepay-gateway/ [R=301,L]
RewriteRule ^extensions/vertical-respons.*$ downloads/vertical-response/ [R=301,L]
@SeanChDavis
SeanChDavis / gist:1dddf586cb609e386050
Last active August 29, 2015 14:22
Sort Downloads by Last Modified
<?php
/*
Plugin Name: Sort Downloads by Last Modified
Plugin URI: #
Description: Adds sortable Modified Date column to Downloads
Version: 1.0
Author: Sean Davis
Author URI: http://sdavismedia.com
*/