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 / edd-featured-image.php
Last active December 5, 2015 22:12
EDD Add Featured Image Support for Downloads
@SeanChDavis
SeanChDavis / fes-add-dashboard-tab.php
Created September 9, 2015 15:45
EDD FES New Dashboard Tab
<?php // DO NOT COPY THIS LINE
function sd_vendor_dashboard_menu( $menu_items ) {
$menu_items['tax_form'] = array(
"icon" => "earnings",
"task" => array( 'tax_form', '' ),
"name" => __( 'Tax Form', 'edd_fes' ),
);
return $menu_items;
}
@SeanChDavis
SeanChDavis / fes-vendor-store-title.php
Last active September 4, 2015 17:10
EDD FES Vendor Store Title
<?php // DO NOT COPY THIS LINE
function sd_fes_vendor_title( $vendor_title ) {
$append = ' Gallery';
return $vendor_title . $append;
}
add_filter( 'fes_change_the_title', 'sd_fes_vendor_title' );
@SeanChDavis
SeanChDavis / disable-commissions-email.php
Last active August 31, 2015 15:04
EDD Commissions Disable Email (site-wide)
<?php // DO NOT COPY THIS LINE
/**
* Disable commissions email from EDD Commissions extension
*/
remove_action( 'eddc_insert_commission', 'eddc_email_alert', 10 );
@SeanChDavis
SeanChDavis / remove-profile-tab.php
Created August 25, 2015 17:58
EDD FES Remove Vendor Dashboard Profile Tab
<?php // DO NOT COPY THIS LINE
function sd_fes_remove_profile_tab( $menu_items ) {
unset( $menu_items['profile'] );
return $menu_items;
}
add_filter( 'fes_vendor_dashboard_menu', 'sd_fes_remove_profile_tab' );
@SeanChDavis
SeanChDavis / cfm-receipt.php
Created August 21, 2015 17:23
EDD Checkout Fields Manager Receipt Values
<?php // DO NOT COPY THIS LINE
function sd_cfm_receipt_field( $payment ) {
?>
<tr>
<td><strong><?php _e( 'Custom Field', 'edd' ); ?>:</strong></td>
<td><?php echo get_post_meta( $payment->ID, 'custom_field', true ); ?></td>
</tr>
<?php
@SeanChDavis
SeanChDavis / vendd-show-purchase-button.css
Created August 6, 2015 16:45
Vendd Display Purchase Button by Default
.vendd-download-information .vendd-price-button-container {
position: static;
display: block;
border-top: none;
box-shadow: none;
}
.vendd-download-information .product-link {
display: none;
}
@SeanChDavis
SeanChDavis / vendd-image-dimensions.php
Created August 5, 2015 19:25
Vendd Resize Product Images
<?php // DO NOT COPY THIS LINE - start at line 4
// add Vendd product images square
function custom_ward_kelley_product_images() {
add_image_size( 'vendd_product_image', 722, 722, true );
}
add_action( 'init', 'custom_ward_kelley_product_images' );
@SeanChDavis
SeanChDavis / fes-registration.php
Last active September 3, 2015 17:40
EDD FES Registration Redirect
<?php // DO NOT COPY THIS LINE
// vendor registration redirect
function sd_fes_vendor_registration_redirect( $response, $post_id, $form_id ) {
$response['redirect_to'] = 'http://google.com/';
return $response;
}
add_filter( 'fes_register_form_pending_vendor', 'sd_fes_vendor_registration_redirect', 10, 3 );
add_filter( 'fes_register_form_frontend_vendor', 'sd_fes_vendor_registration_redirect', 10, 3 );
@SeanChDavis
SeanChDavis / gist:e2d12f4b737e33943515
Created July 14, 2015 16:05
EDD Comments on Downloads
/*
* Adds comment support to the download post type
*/
function pw_edd_comments() {
add_post_type_support( 'download', 'comments' );
}
add_action( 'init', 'pw_edd_comments', 999 );