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 | |
| // check for expired licenses | |
| $license_args = array( | |
| 'posts_per_page' => -1, | |
| 'post_type' => 'edd_license', | |
| 'post_status' => 'any', | |
| 'meta_query' => array( | |
| 'relation' => 'AND', | |
| array( |
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 | |
| /* | |
| * Disables renewal discount for specific product | |
| */ | |
| function pw_edd_disable_product_renewal_discount( $renewal_discount, $license_id ) { | |
| $license = edd_software_licensing()->get_license( $license_id ); | |
| // replace 40 with relevant ID | |
| if( 40 == $license->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 // DO NOT COPY THIS LINE | |
| function sd_checkout_account_creation_notice() { | |
| ?> | |
| <div class="checkout-account-notice" style="color: #8a6d3b; background: #fcf8e3; border-color: #faebcc; padding: 10px; margin-bottom: 1.6em;">This is a warning message for account creation.</div> | |
| <?php | |
| } | |
| add_action( 'edd_register_account_fields_before', 'sd_checkout_account_creation_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 // DO NOT COPY THIS LINE | |
| // replace the default WordPress login link in Auto Register | |
| function custom_edd_auto_register_login( $login_url ) { | |
| $login_url = str_replace( | |
| 'http://yoursite.com/wp-login.php', | |
| 'http://yoursite.com/sign-in', | |
| $login_url | |
| ); |
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 | |
| /** | |
| * theme-updater.php | |
| */ | |
| // Find this block of code (at the top of the class) | |
| $config = array( | |
| 'remote_api_url' => 'https://easydigitaldownloads.com', // Site where EDD is hosted | |
| 'item_name' => 'Theme Name', // Name of theme |
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 | |
| function custom_edd_sl_override_history_content( $content ) { | |
| if( empty( $_GET['action'] ) || 'manage_licenses' != $_GET['action'] ) { | |
| return $content; | |
| } | |
| if( empty( $_GET['payment_id'] ) ) { | |
| return $content; | |
| } | |
| if( ! in_the_loop() ) { |
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 | |
| function custom_edd_auto_register_email_body( $email ) { | |
| $new_email = $email . "\n(Your password is temporary. Please change immediately.)"; | |
| return $new_email; | |
| } | |
| add_filter( 'edd_auto_register_email_body', 'custom_edd_auto_register_email_body' ); |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 15 columns, instead of 16 in line 1.
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
| discount_name,code,type,starts,ends,status,uses,max uses,amount,min price,product requirements,product condition,is not global,is single use, | |
| Discount 1,TESTCODE1,percentage,2012-11-01 01:01:01,2014-11-01 01:01:01,active,1,100,20,$10.00,0,0,0,1, , | |
| Discount 2,TESTCODE2,percentage,2012-11-01 01:01:01,2014-11-01 01:01:01,active,1,100,20%,10,8,0,0, , |
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 | |
| function custom_vendd_excerpt_more( $more ) { | |
| return '</p><p class="continue-reading"><a class="more-link" href="' . get_permalink( get_the_ID() ) . '">' . get_theme_mod( 'vendd_read_more', __( 'Continue reading', 'vendd' ) ) . ' →</a></p>'; | |
| } | |
| add_filter( 'excerpt_more', 'custom_vendd_excerpt_more', 99 ); |
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 | |
| function vol_setup_thumb_dimensions() { | |
| $width = get_option( 'thumbnail_size_w' ); | |
| $height = get_option( 'thumbnail_size_h' ); | |
| $crop = get_option( 'thumbnail_crop' ) ? true : false; | |
| add_image_size( 'post-thumbnail', $width, $height, $crop ); | |
| } | |
| add_action( 'after_setup_theme', 'vol_setup_thumb_dimensions', 20 ); |