This file contains 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 | |
/** | |
* Register the payment icon | |
*/ | |
function pw_edd_payment_icon($icons) { | |
$icons['url/to/your/image/icon.png'] = 'Name of the Payment Method'; | |
return $icons; | |
} | |
add_filter('edd_accepted_payment_icons', 'pw_edd_payment_icon'); |
This file contains 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 | |
/** | |
* Show license key limit in [purchase_history] shortcode. | |
* | |
* @since 0.1.0 | |
*/ | |
function edd_site_count_downloads_license_limit_th() { | |
echo '<th class="edd-site-count-site-count">' . __( 'Site Count', 'edd-site-count' ) . '</th>'; |
This file contains 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 | |
/** | |
* Template Loader for Plugins | |
* | |
* @package Template_Loader_For_Plugins | |
* @author Gary Jones | |
* @link http://gamajo.com/template-loader | |
* @copyright 2013 Gary Jones | |
* @license GPL-2.0+ | |
*/ |
This file contains 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 # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: T5 Silent Flush | |
* Description: Flushes rewrite rules whenever a custom post type or taxonomy is registered and not already part of these rules. This is a soft flush, the .htaccess will not be rewritten. | |
* Version: 2013.05.04 | |
* Author: Thomas Scholz <info@toscho.de> | |
* Author URI: http://toscho.de | |
* License: MIT | |
* License URI: http://www.opensource.org/licenses/mit-license.php | |
*/ |
This file contains 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 | |
/** | |
* Allow people to specify a coupon code in the URL, and add it to their cart. | |
*/ | |
function yst_edd_discount_link() { | |
if ( isset( $_GET['coupon'] ) ) { | |
// Check whether it's a valid coupon, if so, add it to the cart. | |
if ( edd_is_discount_valid( $_GET['coupon'] ) ) | |
edd_set_cart_discount( $_GET['coupon'] ); |
This file contains 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 | |
/** | |
* Make sure the AJAX URL for EDD uses the protocol for the current page, either http or https, as it doesn't work otherwise. | |
* | |
* @param string $ajaxurl The current ajaxurl | |
* | |
* @return string | |
*/ | |
function yst_filter_edd_ajax_url( $ajaxurl ) { |
This file contains 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 | |
/** | |
* Plugin Name: Infinite WP List Tables | |
* Description: Infinite scroll support for WP List Tables in the WordPress admin panel. | |
* Version: 0.1.0 | |
* Author: Brady Vercher | |
* Author URI: http://www.blazersix.com/ | |
* License: GPL-2.0+ | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ |
This file contains 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_action( 'wp_head', 'tgm_delete_all_orders' ); | |
function tgm_delete_all_orders() { | |
21 | |
$payments = get_posts( array( 'post_type' => 'edd_payment', 'posts_per_page' => -1, 'post_status' => 'any' ) ); | |
$downloads = get_posts( array( 'post_type' => 'download', 'posts_per_page' => -1 ) ); | |
if ( $downloads ) { | |
foreach ( $downloads as $download ) { | |
delete_post_meta( $download->ID, '_edd_download_sales' ); |
This file contains 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 | |
/* | |
Plugin Name: Easy Digital Downloads - Variable Pricing License Activation Limits | |
Plugin URL: http://easydigitaldownloads.com/extension/ | |
Description: Limit the number of license activations permitted based on variable prices | |
Version: 1.0 | |
Author: Pippin Williamson | |
Author URI: http://pippinsplugins.com | |
Contributors: mordauk | |
*/ |
This file contains 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 | |
function ecpt_include_post_types_in_search($query) { | |
if(is_search()) { | |
$post_types = get_post_types(array('public' => true, 'exclude_from_search' => false), 'objects'); | |
$searchable_types = array(); | |
if($post_types) { | |
foreach( $post_types as $type) { | |
$searchable_types[] = $type->name; | |
} |