This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function sd_edd_download_details_widget_thumbnail( $instance ) { | |
| // get the ID of the current post | |
| $post_id = get_the_ID(); | |
| // grab featured image of the appropriate download | |
| if ( 'current' == $instance['download_id'] ) { | |
| echo get_the_post_thumbnail( $post_id ); | |
| } else { | |
| echo get_the_post_thumbnail( $instance['download_id'] ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Mark address field required except for free downloads | |
| */ | |
| function pw_edd_purchase_form_required_fields( $required_fields ) { | |
| $cart_total = edd_get_cart_total(); | |
| $required_fields['card_address'] = array( | |
| 'error_id' => 'invalid_adress', | |
| 'error_message' => __( 'Please enter your address.', 'edd' ) | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php remove_action( 'edd_after_download_content', 'edd_append_purchase_link' ); ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * remove the default [downloads] shortcode from Easy Digital Downloads | |
| * and then rebuild it with full control | |
| */ | |
| // remove default EDD [downloads] shortcode | |
| remove_shortcode( 'downloads' ); | |
| // rebuild [downloads] shortcode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php // DON'T COPY THIS LINE | |
| /* | |
| * Remove Billing State from required list | |
| */ | |
| function custom_edd_purchase_form_required_fields( $required_fields ) { | |
| unset( $required_fields['card_state'] ); | |
| return $required_fields; | |
| } | |
| add_filter( 'edd_purchase_form_required_fields', 'custom_edd_purchase_form_required_fields' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * If the license is not entered or is not valid, show notice. For use with EDD Software Licensing | |
| * | |
| * CHANGE sample_ TO YOUR FUNCTION PREFIX | |
| * | |
| * https://easydigitaldownloads.com/extensions/software-licensing/?ref=184 | |
| */ | |
| function sample_admin_notice() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * This template is used to display the purchase summary with [edd_receipt] | |
| */ | |
| global $edd_receipt_args, $edd_options; | |
| $payment = get_post( $edd_receipt_args['id'] ); | |
| $meta = edd_get_payment_meta( $payment->ID ); | |
| $cart = edd_get_payment_meta_cart_details( $payment->ID, true ); | |
| $user = edd_get_payment_meta_user_info( $payment->ID ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * custom function for footer icons | |
| */ | |
| function custom_lattice_icons() { | |
| $twitter = get_theme_mod( 'lattice_twitter' ); | |
| $facebook = get_theme_mod( 'lattice_facebook' ); | |
| $instagram = get_theme_mod( 'lattice_instagram' ); | |
| $gplus = get_theme_mod( 'lattice_gplus' ); | |
| if ( $twitter || $facebook || $instagram || $gplus ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * override single download template | |
| */ | |
| global $options; | |
| // Custom filter | |
| $single_tags_text = apply_filters('single_tags_text', __('Tags: ', 'volatyl')); | |
| get_header(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ( class_exists( 'EDD_Points_Renderer' ) ) { | |
| global $edd_points_render; | |
| remove_action( 'edd_before_download_content', array( $edd_points_render, 'edd_points_message_content' ), 10 ); | |
| add_action( 'edd_after_download_content', array( $edd_points_render, 'edd_points_message_content' ), 0 ); | |
| function custom_add_instructions() { ?> | |
| <p><strong><span style="color: #ff0000;">2. Use the drop down below to select the template you desire.</span></strong></p> | |
| <?php | |
| } | |
| add_action( 'edd_after_download_content', 'custom_add_instructions', 1 ); | |
| } |