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 | |
| /* | |
| * Convert variable prices from radio buttons to a dropdown | |
| * | |
| * === JUST COPY THE CODE STARTING ON LINE 7 === | |
| */ | |
| function edd_purchase_variable_pricing_dropdown( $download_id ) { | |
| $variable_pricing = edd_has_variable_prices( $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 | |
| /** | |
| * adds "view details" link to [downloads] shortcode | |
| */ | |
| function custom_view_details_link() { ?> | |
| <a title="<?php the_title_attribute(); ?>" itemprop="url" href="<?php the_permalink(); ?>">View Details</a> | |
| <?php } | |
| add_action( 'edd_download_after', 'custom_view_details_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 // DO NOT COPY THIS LINE | |
| // remove payment gateway icon from above purchase form | |
| remove_action( 'edd_checkout_form_top', 'edd_show_payment_icons' ); | |
| // add message below purchase button | |
| function custom_payment_icon_message() { ?> | |
| <span class="payment-icon-message">This is a special message.</span> | |
| <?php } |
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 | |
| /** | |
| * @package WordPress | |
| * @subpackage Smartbox | |
| */ | |
| get_header(); ?> | |
| <?php |
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 custom_edd_admin_footer_for_thickbox() { | |
| global $pagenow, $typenow; | |
| // Only run in post/page creation and edit screens | |
| if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) && $typenow != 'download' ) { ?> | |
| <script type="text/javascript"> | |
| function insertDownload() { | |
| var id = jQuery('#products').val(), | |
| direct = jQuery('#select-edd-direct').val(), | |
| style = jQuery('#select-edd-style').val(), |
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 | |
| /** | |
| * Checkout Registrition Form | |
| */ | |
| function custom_edd_get_login_fields() { | |
| global $edd_options; | |
| $color = isset( $edd_options[ 'checkout_color' ] ) ? $edd_options[ 'checkout_color' ] : 'gray'; | |
| $color = ( $color == 'inherit' ) ? '' : $color; | |
| $style = isset( $edd_options[ 'button_style' ] ) ? $edd_options[ 'button_style' ] : 'button'; |
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 | |
| /** | |
| * add "Buy Now" button below Add to Cart button on single downloads | |
| */ | |
| function custom_buy_now_button() { ?> | |
| <a href="<?php echo edd_get_checkout_uri() . '?edd_action=add_to_cart&download_id=' . get_the_ID(); ?>">Buy Now</a> | |
| <?php } | |
| add_action( 'edd_purchase_link_end', 'custom_buy_now_button' ); |
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 | |
| /** | |
| * Use "download_category" for categories and "download_tag" for tags | |
| */ | |
| the_terms( $post->ID, 'download_category', '<span class="download-categories-title">Categories:</span> ', ', ', '' ); |
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 | |
| /* | |
| * Use "download_category" for categories and "download_tag" for tags | |
| */ | |
| function custom_display_download_cats() { | |
| the_terms( $post->ID, 'download_category', '<span class="download-categories-title">Categories:</span> ', ', ', '' ); | |
| } | |
| add_action( 'edd_download_after', 'custom_display_download_cats' ); |
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 echo edd_currency_filter( edd_format_amount( edd_get_download_earnings_stats( get_the_ID() ) ) ); ?> |